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
+11 -2
View File
@@ -131,10 +131,10 @@
<script setup>
import { computed, ref } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
import { onLoad, onShareAppMessage } from '@dcloudio/uni-app'
import { getShareData } from '@/api'
const defaultAvatar = '/static/icons/profile.png'
const defaultAvatar = 'https://linghu-wmr.oss-cn-beijing.aliyuncs.com/smt/avatar.png'
const loading = ref(true)
const loadingMore = ref(false)
@@ -307,6 +307,15 @@ onLoad(async (options) => {
shareToken.value = String(options?.share_token || '').trim()
await fetchShare(true)
})
onShareAppMessage(() => {
return {
title: '戒烟助手 - 查看我的戒烟记录',
path: shareToken.value
? `pages/share/index?share_token=${shareToken.value}`
: 'pages/index/index'
}
})
</script>
<style scoped>