Commit d0494edf authored by wangzhujun's avatar wangzhujun

埋点

parent 09966e6f
<!doctype html> <!doctype html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="#000000"> <meta name="theme-color" content="#000000">
<link rel="dns-prefetch" href="//yun.duiba.com.cn" /> <link rel="dns-prefetch" href="//yun.duiba.com.cn" />
<link rel="preconnect" href="//embedlog.duiba.com.cn"> <link rel="preconnect" href="//embedlog.duiba.com.cn">
<title>开瓶窖龄 粽情贪吃</title> <title>开瓶窖龄 粽情贪吃</title>
<script type="text/javascript"> <script type="text/javascript">
if (localStorage && localStorage.isWebp) { if (localStorage && localStorage.isWebp) {
document document
.getElementsByTagName('html')[0] .getElementsByTagName('html')[0]
.setAttribute('duiba-webp', 'true'); .setAttribute('duiba-webp', 'true');
} }
</script> </script>
<script src="//yun.duiba.com.cn/js-libs/rem/1.1.3/rem.min.js"></script> <script src="//yun.duiba.com.cn/js-libs/rem/1.1.3/rem.min.js"></script>
<script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script> <script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
<script> <script>
var CFG = CFG || {}; var CFG = CFG || {};
CFG.projectId = location.pathname.split('/')[2] || '1'; CFG.projectId = location.pathname.split('/')[2] || '1';
function getUrlParam(name) { function getUrlParam(name) {
var search = window.location.search; var search = window.location.search;
var matched = search var matched = search
.slice(1) .slice(1)
.match(new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i')); .match(new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i'));
return search.length ? matched && matched[2] : null; return search.length ? matched && matched[2] : null;
} }
CFG.appID = '${APPID}'; CFG.appID = '${APPID}';
if (!getUrlParam("appID")) { if (!getUrlParam("appID")) {
// 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/1747037610358/assets/index-EMsnwL7J.js"></script> <script type="module" crossorigin src="https://yun.duiba.com.cn/db_games/spark/v3/1747040621577/assets/index-B9wOsf9S.js"></script>
<link rel="modulepreload" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1747037610358/assets/vendor-IYPCtoxR.js"> <link rel="modulepreload" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1747040621577/assets/vendor-DqpZpHri.js">
<link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1747037610358/assets/vendor-CWeaUrOh.css"> <link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1747040621577/assets/vendor-CWeaUrOh.css">
<link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1747037610358/assets/index-B9y9C6CZ.css"> <link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1747040621577/assets/index-CqNAGPXk.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>
<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/1747037610358/assets/polyfills-legacy-C2MhNPfJ.js"></script> <script nomodule crossorigin id="vite-legacy-polyfill" src="https://yun.duiba.com.cn/db_games/spark/v3/1747040621577/assets/polyfills-legacy-C2MhNPfJ.js"></script>
<script nomodule crossorigin id="vite-legacy-entry" data-src="https://yun.duiba.com.cn/db_games/spark/v3/1747037610358/assets/index-legacy-Bq3vyjjM.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/1747040621577/assets/index-legacy-BK9pcPxn.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
</body> </body>
</html> </html>
......
...@@ -22,6 +22,7 @@ import Rankpage from '../rankpage/rankpage'; ...@@ -22,6 +22,7 @@ import Rankpage from '../rankpage/rankpage';
import Rulepop from '@/components/rulepop/rulepop'; import Rulepop from '@/components/rulepop/rulepop';
import Prizepage from '../prizepage/prizepage'; import Prizepage from '../prizepage/prizepage';
import WxOpenModule from '@/components/wxOpenModule/wxOpenModule'; import WxOpenModule from '@/components/wxOpenModule/wxOpenModule';
import { handleLogClick } from '@/MD';
@observer @observer
class HomePage extends React.Component<any, any> { class HomePage extends React.Component<any, any> {
...@@ -76,9 +77,11 @@ class HomePage extends React.Component<any, any> { ...@@ -76,9 +77,11 @@ class HomePage extends React.Component<any, any> {
if (!store.judgeActTime()) return; if (!store.judgeActTime()) return;
if (item.code == "invite") { if (item.code == "invite") {
// 分享 // 分享
handleLogClick(10, 1)
ModalCtrl.showModal(Posterpop) ModalCtrl.showModal(Posterpop)
return; return;
} else if (item.code == "scan") { } else if (item.code == "scan") {
handleLogClick(11, 1)
miniGoUrl(store.frontVariable.scanUrl) miniGoUrl(store.frontVariable.scanUrl)
return; return;
} }
...@@ -86,6 +89,13 @@ class HomePage extends React.Component<any, any> { ...@@ -86,6 +89,13 @@ class HomePage extends React.Component<any, any> {
getTaskPrize = _asyncThrottle(async (item) => { getTaskPrize = _asyncThrottle(async (item) => {
if (!store.judgeActTime()) return; if (!store.judgeActTime()) return;
if (item.code == 'login') {
handleLogClick(9)
} else if (item.code == 'invite') {
handleLogClick(10, 2)
} else if (item.code == 'scan') {
handleLogClick(11, 2)
}
const { success, data } = await API.sendPrize({ const { success, data } = await API.sendPrize({
prizePendingCode: item.prizePendingCode, prizePendingCode: item.prizePendingCode,
taskId: item.id, taskId: item.id,
......
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