fix: index page
This commit is contained in:
@@ -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}`,
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user