This commit is contained in:
zzc
2026-02-02 14:59:34 +08:00
parent 1ce775436d
commit 526e2aad70
12 changed files with 89 additions and 80 deletions

View File

@@ -12,7 +12,7 @@
class="avatar-selector custom-button"
>
<image v-if="avatarUrl" :src="avatarUrl" class="avatar-preview" />
<text v-else>获取头像</text>
<text v-else>点击获取头像</text>
</button>
<input
class="nickname-input"
@@ -45,6 +45,19 @@ const userStore = useUserStore();
const emit = defineEmits(["logind"]);
const festivalNames = [
'春意','福星','小福','新禧','瑞雪','花灯','喜乐','元宝','春芽','年年',
'花灯','月圆','灯影','小灯','星灯','彩灯',
'清风','微风','小晴','碧波','流泉',
'月光','玉轮','桂香','秋叶','星河','小月','露华','秋水',
'雪落','冰晶','暖阳','小雪','冬影','雪花','松影'
];
const getFestivalName = () => {
const idx = Math.floor(Math.random() * festivalNames.length);
return festivalNames[idx];
}
const open = () => {
popupRef.value.open();
};
@@ -62,11 +75,11 @@ const confirmLogin = async () => {
const platform = getPlatformProvider();
if (platform === "mp-weixin") {
const code = await wxLogin();
const imageUrl = await uploadImage(avatarUrl.value);
const imageUrl = avatarUrl.value ? await uploadImage(avatarUrl.value) : "";
const loginRes = await apiLogin({
code,
nickname: nickname.value,
nickname: nickname.value || getFestivalName(),
avatarUrl: imageUrl,
platform: "wx",
});

View File

@@ -54,7 +54,8 @@
"setting": {
"urlCheck": false
},
"usingComponents" : true
"usingComponents": true,
"lazyCodeLoading": "requiredComponents"
},
"mp-alipay": {
"usingComponents": true,

View File

@@ -178,10 +178,5 @@
}
]
},
"uniIdRouter": {},
"permission": {
"scope.userLocation": {
"desc": "用于获取您的当前位置,以显示附近景点和打卡功能"
}
}
"uniIdRouter": {}
}

View File

@@ -517,7 +517,7 @@ const targetName = ref("祝您");
const signatureName = ref(userStore?.userInfo?.nickName || "xxx");
const userAvatar = ref(
userStore?.userInfo?.avatarUrl ||
"https://file.lihailezzc.com/resource/b48c41054c2633c478463ac1b1f1ca23.png",
"https://file.lihailezzc.com/resource/96023631c6ab9c3496b7620097af3d6f.png",
);
const blessingText = ref({});

View File

@@ -18,7 +18,7 @@
<view class="user-card" @tap="handleUserClick">
<view class="avatar-box">
<image :src="userInfo.avatarUrl" class="avatar" mode="aspectFill" />
<view class="red-badge"><text class="fire">🔥</text></view>
<!-- <view class="red-badge"><text class="fire">🔥</text></view> -->
</view>
<view class="user-info">
<view class="row-1">

Binary file not shown.

Before

Width:  |  Height:  |  Size: 135 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB