feat: 支持多页面分享与统一默认头像

Made-with: Cursor
This commit is contained in:
nepiedg
2026-03-10 23:00:37 +08:00
parent 585b0a203f
commit bdb8d425eb
9 changed files with 128 additions and 68 deletions
+9 -1
View File
@@ -97,6 +97,7 @@
<script setup>
import { ref, computed, onMounted, onUnmounted } from 'vue'
import { onShareAppMessage } from '@dcloudio/uni-app'
import { useProfileStore } from '@/stores/profile'
import { useUserStore } from '@/stores/user'
import { useLogin } from '@/hooks/useLogin'
@@ -133,7 +134,7 @@ const userName = computed(() => {
})
const userAvatar = computed(() => {
return homeData.value?.greeting?.avatar_url || userStore.user?.avatar_url || '/static/images/default-avatar.png'
return homeData.value?.greeting?.avatar_url || userStore.user?.avatar_url || 'https://linghu-wmr.oss-cn-beijing.aliyuncs.com/smt/avatar.png'
})
const greetingTitle = computed(() => {
@@ -352,6 +353,13 @@ onMounted(() => {
onUnmounted(() => {
stopTimer()
})
onShareAppMessage(() => {
return {
title: '戒烟助手 - 记录与分析我的戒烟之路',
path: 'pages/index/index'
}
})
</script>
<style scoped>