Commit e5ed2221 authored by cc's avatar cc

update

parent f695df36
...@@ -102,10 +102,10 @@ ...@@ -102,10 +102,10 @@
// alert("【警告】检测到活动url中没有appID参数\n缺少该参数会导致埋点、分享、app信息获取错误。") // alert("【警告】检测到活动url中没有appID参数\n缺少该参数会导致埋点、分享、app信息获取错误。")
} }
</script> </script>
<script type="module" crossorigin src="https://yun.duiba.com.cn/db_games/spark/v3/1748424929284/assets/index-DR54XGhQ.js"></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/1748424929284/assets/vendor-BYv2yB96.js"> <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/1748424929284/assets/vendor-NZxPxbcK.css"> <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/1748424929284/assets/index-BDzBqyw2.css"> <link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1748425197630/assets/index-CTzjUCWK.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">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> <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> </head>
...@@ -113,8 +113,8 @@ ...@@ -113,8 +113,8 @@
<body> <body>
<div id="root"></div> <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>!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/1748424929284/assets/polyfills-legacy-C2MhNPfJ.js"></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/1748424929284/assets/index-legacy-BQQSsfol.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</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>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -52,15 +52,15 @@ class App extends Component { ...@@ -52,15 +52,15 @@ class App extends Component {
this.showDefaultPage(); this.showDefaultPage();
await store.getFrontVariable(); await store.getFrontVariable();
// await waitTime(0)
// shareStore.initShare()
setTimeout(async()=>{
await onInitShare();
await ensureDomain(); await ensureDomain();
CFG.domain = domain; CFG.domain = domain;
if(isMiniprogram()){ //小程序域名写死 if(isMiniprogram()){ //小程序域名写死
CFG.domain = "https://96094-2-activity.dexfu.cn"; CFG.domain = "https://96094-2-activity.dexfu.cn";
} }
// await waitTime(0)
// shareStore.initShare()
setTimeout(()=>{
const shareInfo = JSON.parse(store.frontVariable.shareInfo); const shareInfo = JSON.parse(store.frontVariable.shareInfo);
if (skinId == 'index') { // 首页 if (skinId == 'index') { // 首页
console.info('首页'); console.info('首页');
...@@ -74,7 +74,7 @@ class App extends Component { ...@@ -74,7 +74,7 @@ class App extends Component {
url: `${CFG.domain}${CFG.indexLogin}${encodeURIComponent(shareUrl)}` url: `${CFG.domain}${CFG.indexLogin}${encodeURIComponent(shareUrl)}`
}); });
} else { } else {
console.info('首页'); console.info('首页');
const inviteCode = getUrlParam("inviteCode"); const inviteCode = getUrlParam("inviteCode");
let shareUrl = `${CFG.domain}${CFG.shareUrl}${getUrlParam("inviteCode") ? '&inviteCode=' + getUrlParam("inviteCode") : ""}`; let shareUrl = `${CFG.domain}${CFG.shareUrl}${getUrlParam("inviteCode") ? '&inviteCode=' + getUrlParam("inviteCode") : ""}`;
shareUrl += `&ykCode=${CFG.workerCode || CFG.agentCode || ""}` shareUrl += `&ykCode=${CFG.workerCode || CFG.agentCode || ""}`
...@@ -86,7 +86,7 @@ class App extends Component { ...@@ -86,7 +86,7 @@ class App extends Component {
url: `${CFG.domain}${CFG.indexLogin}${encodeURIComponent(shareUrl)}` url: `${CFG.domain}${CFG.indexLogin}${encodeURIComponent(shareUrl)}`
}); });
} }
},2000) },0)
} }
componentWillUnmount() { componentWillUnmount() {
......
...@@ -21,6 +21,7 @@ import { CHANNEL_PARAMS, extranceName } from '@/utils/constants.js'; ...@@ -21,6 +21,7 @@ import { CHANNEL_PARAMS, extranceName } from '@/utils/constants.js';
import gameStore from "@/store/gameStore.ts"; import gameStore from "@/store/gameStore.ts";
import GamePage from "@/pages/GamePage/GamePage.tsx"; import GamePage from "@/pages/GamePage/GamePage.tsx";
import MusicBtn from '@/core/components/MusicBtn/MusicBtn.tsx'; import MusicBtn from '@/core/components/MusicBtn/MusicBtn.tsx';
import { onInitShare } from '@/utils/share.ts';
@observer @observer
class Homepage extends React.Component { class Homepage extends React.Component {
...@@ -34,6 +35,7 @@ class Homepage extends React.Component { ...@@ -34,6 +35,7 @@ class Homepage extends React.Component {
if (isWeiXin()) { if (isWeiXin()) {
if (!await store.checkBindStatus()) return; if (!await store.checkBindStatus()) return;
} }
await onInitShare();
await shareStore.doAssist(); await shareStore.doAssist();
await store.updateIndex(); await store.updateIndex();
this.initSensor(); this.initSensor();
......
...@@ -39,9 +39,9 @@ import { ...@@ -39,9 +39,9 @@ import {
await start([Weixin], function (success) { await start([Weixin], function (success) {
console.log("share result:----", success) console.log("share result:----", success)
cb && cb() cb && cb()
// if(!success){ if(!success){
onInitShare()
// } }
}, { }, {
isMiniApp: true, isMiniApp: true,
apk: '4AoRyTuR6XNfjNa4w5exe1bPmqDS' 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