feat: 支持多页面分享与统一默认头像
Made-with: Cursor
This commit is contained in:
+11
-2
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user