Commit 466829ea authored by haiyoucuv's avatar haiyoucuv

1

parent 32145380
......@@ -62,8 +62,7 @@
iqiyi && iqiyi.share({
title: '尖叫之夜门票、现金红包限时抢,手慢无!',//标题
desc: '立即参与',//描述
imgUrl: '',//图片
link: 'https://www.baidu.com/',//链接
link: 'http://activity.m.duibatest.com.cn/hdtool/index?id=23282&appKey=jlg88lyxz7siqtmr&openBs=openbs'+'&signEnt='+ encodeURIComponent(5),//链接
success: function (res) {
resolve(res);
},
......@@ -77,15 +76,11 @@
});
}
// 初始化分享数据(native右上角分享)
iqiyi.onShare({
title: '尖叫之夜门票、现金红包限时抢,手慢无!',
desc: '立即参与',
// imgUrl: 'http://partner.vip.qiyi.com/mobact2rd/public/img/default.jpg',
// link: 'https://m.iqiyi.com/',
link: window.location.href,
// dialogTitle: 'onShare 分享选择浮层在这里',
// gifUrl: 'http://qq.yh31.com/tp/zjbq/201711142021166458.gif',
link: 'http://activity.m.duibatest.com.cn/hdtool/index?id=23282&appKey=jlg88lyxz7siqtmr&openBs=openbs'+'&signEnt='+ encodeURIComponent(5),
dialogTitle: 'onShare 分享选择浮层在这里',
success: function () {
setResult('分享成功');
},
......@@ -96,7 +91,6 @@
setResult('分享取消');
}
});
</script>
<script>
// 网鱼网咖图标额外奖励插件
......
This diff is collapsed.
This diff is collapsed.
......@@ -23,7 +23,7 @@ export default class HbNoPrize extends Panel {
protected start() {
super.start();
NetManager.ins.showLog(getlogItem(13));
NetManager.ins.showLog(getlogItem(35));
this.initUI();
}
......@@ -42,7 +42,7 @@ export default class HbNoPrize extends Panel {
}
private onTouchTap(e: egret.TouchEvent) {
NetManager.ins.clickLog(getlogItem(13));
NetManager.ins.clickLog(getlogItem(35));
PanelCtrl.instance.btnDelay(e.target);
switch(e.target) {
case this.ok_btn: // 去我的奖品页
......
......@@ -22,6 +22,7 @@ import HbPrize from "./HongbaoRain/HbPrize";
import HbNoPrize from "./HongbaoRain/HbNoPrize";
import HbGame from "./HongbaoRain/HbGame";
import NoNetWorkPanel from "./Panels/NoNetWorkPanel";
import { initstatistics } from "./statistics";
//////
......@@ -122,6 +123,7 @@ class Main extends eui.UILayer {
// this.getGameRes();
// });
this.getGameRes();
initstatistics();
}
//加载游戏中的资源
......
import { NetManager } from "../libs/tw/manager/NetManager";
let startTimer = new Date().getTime();
let endTimer;
//设置隐藏属性和改变可见属性的事件的名称
let hidden, visibilityChange;
if (typeof document.hidden !== 'undefined') {
hidden = 'hidden';
visibilityChange = 'visibilitychange';
} else if (typeof document['msHidden'] !== 'undefined') {
hidden = 'msHidden';
visibilityChange = 'msvisibilitychange';
} else if (typeof document['webkitHidden'] !== 'undefined') {
hidden = 'webkitHidden';
visibilityChange = 'webkitvisibilitychange';
}
const handleVisibilityChange = (e) => {
if (document.visibilityState == "visible") {
startTimer = new Date().getTime();
console.log('starttimer', startTimer)
}
if (document.visibilityState == "hidden") {
endTimer = new Date().getTime();
console.log('endTimer', endTimer)
sendData();
}
};
const sendData = () => {
const t0 = endTimer - startTimer;
console.log('停留时间是', t0);
// if (localStorage.getItem('xxl_first_statistics') == null) {
// NetManager.ins.remainDuration(t0, true);
// localStorage.setItem('xxl_first_statistics', '1');
// } else {
NetManager.ins.remainDuration(t0, false);
// }
}
export const initstatistics = () => {
document.addEventListener(
visibilityChange,
handleVisibilityChange,
false
);
document.body['onbeforeunload']=()=>{
endTimer = new Date().getTime();
return sendData();
}
}
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