fix: share token

This commit is contained in:
zzc
2026-02-09 22:31:01 +08:00
parent 87a2383d0f
commit 85bbf9d8ac
11 changed files with 282 additions and 133 deletions

View File

@@ -130,6 +130,7 @@ import {
getShareToken,
saveRemoteImageToLocal,
saveRecordRequest,
saveViewRequest,
} from "@/utils/common.js";
import NavBar from "@/components/NavBar/NavBar.vue";
@@ -155,7 +156,11 @@ audioContext.onEnded(() => {
}
});
onLoad(() => {});
onLoad((options) => {
if (options.shareToken) {
saveViewRequest(options.shareToken, "fortune_draw");
}
});
onShow(() => {
checkDrawStatus();
@@ -176,9 +181,11 @@ onShareAppMessage(async () => {
};
});
onShareTimeline(() => {
onShareTimeline(async () => {
const shareToken = await getShareToken("fortune_timeline");
return {
title: "新春到,抽灵签!快来测测你的新年运势 🏮",
query: `shareToken=${shareToken}`,
imageUrl:
"https://file.lihailezzc.com/resource/8dd026d76ef7a63d123b7fd698fb989b.png",
};