更新分享图片

This commit is contained in:
YZ\249929363 2025-08-06 14:33:47 +08:00
parent c15ea4d981
commit b52fdb1385

View File

@ -1357,12 +1357,16 @@ export namespace MiniGameSdk {
// 获取关卡信息和 UID
const level = helpLevel;
const uid = cc.fx.GameConfig.GM_INFO.uid;
let img = "https://mmocgame.qpic.cn/wechatgame/OiaWk33I6QjgWiatrb5YVUq2p0QRmQgO6rLUWxEQDZ4ib9Ny4Pr8iaHnHI6WdxibY2nPL/0";
if (Math.random() < 0.5) {
img = "https://mmocgame.qpic.cn/wechatgame/CG5xBibollws251aYD4msEPWCiafrcn4Fgtic4T2wME6sWmdfAUtfibgsWoxm59VadDD/0";
}
// const title =
// 构建分享参数
const shareParams = {
title: '如果你突然打了个喷嚏,那一定是我在等你帮忙过关!', // 分享标题
path: `/pages/index/index?level=${level}&uid=${uid}`, // 分享路径,带上关卡信息和 UID
imageUrl: 'https://example.com/share-image.png' // 分享图片链接
imageUrl: img // 分享图片链接
};
// 调用微信分享 API