fix: index page

This commit is contained in:
zzc
2026-03-03 22:41:00 +08:00
parent fee3b05c9e
commit b39ac7cb24
2 changed files with 25 additions and 9 deletions

View File

@@ -148,6 +148,7 @@ import { ref, getCurrentInstance, computed } from "vue";
import calendar from "@/utils/lunar.js";
import { useUserStore } from "@/stores/user";
import { onShareAppMessage, onShareTimeline } from "@dcloudio/uni-app";
import { getShareToken } from "@/utils/common.js";
const { proxy } = getCurrentInstance();
const userStore = useUserStore();
@@ -607,10 +608,19 @@ const onShareMoments = () => {
uni.showToast({ title: "请点击右上角分享", icon: "none" });
};
onShareAppMessage(() => {
onShareAppMessage(async () => {
const shareToken = await getShareToken("lucky_card");
return {
title: "开启你的每日好运!",
path: "/pages/index/index",
path: `/pages/index/index?shareToken=${shareToken}`,
};
});
onShareTimeline(async () => {
const shareToken = await getShareToken("lucky_card_timeline");
return {
title: "开启你的每日好运!",
query: `shareToken=${shareToken}`,
};
});