This commit is contained in:
zzc
2026-01-16 15:09:19 +08:00
parent 67684572da
commit 9d5b9b6812
6 changed files with 148 additions and 109 deletions

View File

@@ -98,30 +98,36 @@
class="hidden-canvas"
style="width: 600px; height: 600px"
/>
<!-- Login Popup -->
<LoginPopup ref="loginPopupRef" @logind="handleLogind" />
</view>
</template>
<script setup>
import { ref } from "vue";
import { ref, computed } from "vue";
import { getBavBarHeight } from "@/utils/system";
import { useUserStore } from "@/stores/user";
const userStore = useUserStore();
const loginPopupRef = ref(null);
const isLoggedIn = computed(() => !!userStore.userInfo.nickName);
const systemAvatars = [
"https://file.lihailezzc.com/resource/1463f294244c11cf274a5eaae115872a.jpeg",
"https://file.lihailezzc.com/20260109082842_666_1.jpg",
"https://file.lihailezzc.com/20260108222141_644_1.jpg",
"https://file.lihailezzc.com/9a929a32-439f-453b-b603-fda7b04cbe08.png",
];
const frames = [
"https://file.lihailezzc.com/resource/0f8e6a78c1b04a4fb3a6fa1c66f1f7b3.png",
"https://file.lihailezzc.com/resource/4a4f0c9e6e1b4c0b9f6f7a1b2c3d4e5f.png",
"https://file.lihailezzc.com/resource/aa77f0b45b2e4a0f91c4fda74f3f1123.png",
"https://file.lihailezzc.com/resource/bb88f0b45b2e4a0f91c4fda74f3f1199.png",
"https://file.lihailezzc.com/6.png",
"https://file.lihailezzc.com/7.png",
"https://file.lihailezzc.com/yunshi.png",
"https://file.lihailezzc.com/x_CURXRzG4wHF2dp_zu_r-removebg-preview.png",
];
const decors = [
"https://file.lihailezzc.com/resource/horse_decor_01.png",
"https://file.lihailezzc.com/resource/horse_decor_02.png",
"https://file.lihailezzc.com/resource/horse_decor_03.png",
"https://file.lihailezzc.com/resource/horse_decor_04.png",
"https://file.lihailezzc.com/6.png",
"https://file.lihailezzc.com/7.png",
];
const currentAvatar = ref(systemAvatars[0]);
@@ -129,8 +135,16 @@ const selectedFrame = ref("");
const selectedDecor = ref("");
const activeTab = ref("frame");
const handleLogind = async () => {
// Logic after successful login if needed
};
const useWeChatAvatar = () => {
uni.showToast({ title: "已应用微信头像", icon: "none" });
if (!isLoggedIn.value) {
loginPopupRef.value.open();
} else {
currentAvatar.value = userStore.userInfo.avatarUrl;
}
};
const goBack = () => {