Commit a14df1ee authored by cc's avatar cc

update

parent e5ed2221
......@@ -102,10 +102,10 @@
// alert("【警告】检测到活动url中没有appID参数\n缺少该参数会导致埋点、分享、app信息获取错误。")
}
</script>
<script type="module" crossorigin src="https://yun.duiba.com.cn/db_games/spark/v3/1748425197630/assets/index-DqB_LzPR.js"></script>
<link rel="modulepreload" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1748425197630/assets/vendor-DvLFc5g7.js">
<link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1748425197630/assets/vendor-NZxPxbcK.css">
<link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1748425197630/assets/index-CTzjUCWK.css">
<script type="module" crossorigin src="https://yun.duiba.com.cn/db_games/spark/v3/1748425527217/assets/index-0ld5wZej.js"></script>
<link rel="modulepreload" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1748425527217/assets/vendor-Br3V5CZV.js">
<link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1748425527217/assets/vendor-NZxPxbcK.css">
<link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1748425527217/assets/index-B7DksSQS.css">
<script type="module">import.meta.url;import("_").catch(()=>1);(async function*(){})().next();if(location.protocol!="file:"){window.__vite_is_modern_browser=true}</script>
<script type="module">!function(){if(window.__vite_is_modern_browser)return;console.warn("vite: loading legacy chunks, syntax error above and the same error below should be ignored");var e=document.getElementById("vite-legacy-polyfill"),n=document.createElement("script");n.src=e.src,n.onload=function(){System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))},document.body.appendChild(n)}();</script>
</head>
......@@ -113,8 +113,8 @@
<body>
<div id="root"></div>
<script nomodule>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script>
<script nomodule crossorigin id="vite-legacy-polyfill" src="https://yun.duiba.com.cn/db_games/spark/v3/1748425197630/assets/polyfills-legacy-C2MhNPfJ.js"></script>
<script nomodule crossorigin id="vite-legacy-entry" data-src="https://yun.duiba.com.cn/db_games/spark/v3/1748425197630/assets/index-legacy-DaRtJGQh.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
<script nomodule crossorigin id="vite-legacy-polyfill" src="https://yun.duiba.com.cn/db_games/spark/v3/1748425527217/assets/polyfills-legacy-C2MhNPfJ.js"></script>
<script nomodule crossorigin id="vite-legacy-entry" data-src="https://yun.duiba.com.cn/db_games/spark/v3/1748425527217/assets/index-legacy-W2UolhL2.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
</body>
</html>
\ No newline at end of file
......@@ -51,42 +51,17 @@ class App extends Component {
}
this.showDefaultPage();
// if(skinId != 'index'){
await store.getFrontVariable();
await onInitShare();
await ensureDomain();
CFG.domain = domain;
if(isMiniprogram()){ //小程序域名写死
CFG.domain = "https://96094-2-activity.dexfu.cn";
}
// await waitTime(0)
// shareStore.initShare()
setTimeout(()=>{
const shareInfo = JSON.parse(store.frontVariable.shareInfo);
if (skinId == 'index') { // 首页
console.info('首页');
let shareUrl = `${CFG.domain}${CFG.shareUrl}`;
shareUrl += `&ykCode=${CFG.workerCode || CFG.agentCode || ""}`
shareUrl += `&channel=${CFG.defaultChannel}&agentCode=${CFG.agentCode || ""}&actPlatforms=${CFG.actPlatforms || ""}&actId=${CFG.actId || ""}`
onUpdateShare({
title: shareInfo?.title,
content: shareInfo?.content,
thumbnail: shareInfo?.thumbnail,
url: `${CFG.domain}${CFG.indexLogin}${encodeURIComponent(shareUrl)}`
});
} else {
console.info('首页');
const inviteCode = getUrlParam("inviteCode");
let shareUrl = `${CFG.domain}${CFG.shareUrl}${getUrlParam("inviteCode") ? '&inviteCode=' + getUrlParam("inviteCode") : ""}`;
shareUrl += `&ykCode=${CFG.workerCode || CFG.agentCode || ""}`
if (CFG.channel) shareUrl += `&channel=${CFG.defaultChannel}&agentCode=${CFG.agentCode || ""}&actPlatforms=${CFG.actPlatforms || ""}&actId=${CFG.actId || ""}`
onUpdateShare({
title: inviteCode && inviteCode != '' ? shareInfo?.titleInvite : shareInfo?.title,
content: inviteCode && inviteCode != '' ? shareInfo?.contentInvite : shareInfo?.content,
thumbnail: shareInfo?.thumbnail,
url: `${CFG.domain}${CFG.indexLogin}${encodeURIComponent(shareUrl)}`
});
}
},0)
await waitTime(5)
shareStore.initShare()
// }
}
componentWillUnmount() {
......
......@@ -35,7 +35,6 @@ class Homepage extends React.Component {
if (isWeiXin()) {
if (!await store.checkBindStatus()) return;
}
await onInitShare();
await shareStore.doAssist();
await store.updateIndex();
this.initSensor();
......
......@@ -207,7 +207,7 @@ const shareStore = makeAutoObservable({
Toast.show("助力成功~")
}
sessionStorage.setItem("inviteCode", CFG.inviteCode);
history.replaceState({}, "", location.href.replace(new RegExp(`[?&]inviteCode=[^&]*`), ""));
// history.replaceState({}, "", location.href.replace(new RegExp(`[?&]inviteCode=[^&]*`), ""));
},
/** 奖品页唤端 */
......
......@@ -39,9 +39,9 @@ import {
await start([Weixin], function (success) {
console.log("share result:----", success)
cb && cb()
if(!success){
onInitShare()
}
// if(!success){
// onInitShare()
// }
}, {
isMiniApp: true,
apk: '4AoRyTuR6XNfjNa4w5exe1bPmqDS'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment