Commit 3879dfd7 authored by wjf's avatar wjf

Merge branch 'dev' of gitlab2.dui88.com:wanghongyuan/xiaoxiaole into dev

parents e1f2e312 87da6aa7
...@@ -40,61 +40,61 @@ ...@@ -40,61 +40,61 @@
</head> </head>
<body> <body>
<div style="margin: auto;width: 100%;height: 100%;" class="egret-player" data-entry-class="Main" <div style="margin: auto;width: 100%;height: 100%;" class="egret-player" data-entry-class="Main"
data-orientation="auto" data-scale-mode="showAll" data-frame-rate="60" data-content-width="750" data-orientation="auto" data-scale-mode="showAll" data-frame-rate="60" data-content-width="750"
data-content-height="1624" data-multi-fingered="2" data-show-fps="false" data-show-log="true" data-content-height="1624" data-multi-fingered="2" data-show-fps="false" data-show-log="true"
data-show-fps-style="x:0,y:0,size:12,textColor:0xffffff,bgAlpha:0.9"> data-show-fps-style="x:0,y:0,size:12,textColor:0xffffff,bgAlpha:0.9">
</div> </div>
<script src="libs/modules/egret/egret.js"></script> <script src="libs/modules/egret/egret.js"></script>
<script src="libs/modules/egret/egret.web.js"></script> <script src="libs/modules/egret/egret.web.js"></script>
<script src="libs/modules/eui/eui.js"></script> <script src="libs/modules/eui/eui.js"></script>
<script src="libs/modules/assetsmanager/assetsmanager.js"></script> <script src="libs/modules/assetsmanager/assetsmanager.js"></script>
<script src="libs/modules/tween/tween.js"></script> <script src="libs/modules/tween/tween.js"></script>
<script src="libs/zepto.min.js"></script> <script src="libs/zepto.min.js"></script>
<script src="libs/security.js"></script> <script src="libs/security.js"></script>
<script src="libs/downloadApp.js"></script> <script src="libs/downloadApp.js"></script>
<script src="libs/svga.egret.min2.js"></script> <script src="libs/svga.egret.min2.js"></script>
<script src="libs/aes.js"></script> <script src="libs/aes.js"></script>
<script src="libs/pad-zeropadding.js"></script> <script src="libs/pad-zeropadding.js"></script>
<!-- 复制口令苏宁提供的js,线上需要添加 --> <!-- 复制口令苏宁提供的js,线上需要添加 -->
<script src="https://yun.dui88.com/DS-tech/dtt_tech/suning/snShare.min.js"></script> <script src="https://yun.dui88.com/DS-tech/dtt_tech/suning/snShare.min.js"></script>
<!-- //线上不需要 --> <!-- //线上不需要 -->
<script src="libs/fileSave.js"></script> <script src="libs/fileSave.js"></script>
<img id="pic" style="width:100%;position: absolute;z-index: 999;display: none;"/> <img id="pic" style="width:100%;position: absolute;z-index: 999;display: none;" />
<script> <script>
window.fresp=0.00001; window.fresp = 0.00001;
// localStorage.clear(); // localStorage.clear();
window['testUrl'] = 'http://cuxiaoprexg.m.cnsuning.com/scms/cx521.html?activityId=SL446689024459878400&subactivityId=SUB446689681678090240&businessid=cx521'; window['testUrl'] = 'http://cuxiaoprexg.m.cnsuning.com/scms/cx521.html?activityId=SL446689024459878400&subactivityId=SUB446689681678090240&businessid=cx521';
window['hbRainTime'] = 30; // 红包雨倒计时 window['hbRainTime'] = 30; // 红包雨倒计时
window['plugs'] = [1, 2, 3]; window['plugs'] = [1, 2, 3];
// localStorage.clear(); // localStorage.clear();
window['isInvitePage'] = 0; window['isInvitePage'] = 0;
var targetUrl = 'https://gameact.suning.com/sngame-web/api/duiba/private/v1/getLoginUrl.do?appCode=duiba&activityCode=3651404'; var targetUrl = 'https://gameact.suning.com/sngame-web/api/duiba/private/v1/getLoginUrl.do?appCode=duiba&activityCode=3651404';
/* /*
* 邀请有礼分享 * 邀请有礼分享
*/ */
function inviteShare(shareCode) { function inviteShare(shareCode) {
let title = "求求你可以帮我点一下吗?还差一点点就可以领红包了~"; let title = "求求你可以帮我点一下吗?还差一点点就可以领红包了~";
let content = "我在狮狮连萌等你,一起天天领福利哦"; let content = "我在狮狮连萌等你,一起天天领福利哦";
let targetUrl = "https://gameact.suning.com/duiba/customShare/share?id=3531" + "&shareCode=" + shareCode; // 待修改 let targetUrl = "https://gameact.suning.com/duiba/customShare/share?id=3531" + "&shareCode=" + shareCode; // 待修改
let iconUrl = "http://yun.duiba.com.cn/db_games/xiaoxiaole2.jpg"; let iconUrl = "http://yun.duiba.com.cn/db_games/xiaoxiaole2.jpg";
let shareWays = "1,2"; let shareWays = "1,2";
console.log("AppReady"); console.log("AppReady");
if (isIphone()) { if (isIphone()) {
console.log("IOS"); console.log("IOS");
console.log(window.SNNativeClient); console.log(window.SNNativeClient);
window.callNativeShareResult = function () { window.callNativeShareResult = function () {
}; };
window.SNNativeClient.callNativeShare(title, content, targetUrl, iconUrl, shareWays); window.SNNativeClient.callNativeShare(title, content, targetUrl, iconUrl, shareWays);
} else { } else {
console.log("安卓"); console.log("安卓");
console.log(shareApi); console.log(shareApi);
console.log(shareApi.callMediaShare); console.log(shareApi.callMediaShare);
shareApi.callNativeShare(title, content, targetUrl, iconUrl, shareWays); shareApi.callNativeShare(title, content, targetUrl, iconUrl, shareWays);
}
} }
}
function isIphone() { function isIphone() {
var ua = navigator.userAgent.toLocaleLowerCase(); var ua = navigator.userAgent.toLocaleLowerCase();
if (ua.match(/iphone|ipad/)) { if (ua.match(/iphone|ipad/)) {
...@@ -209,8 +209,10 @@ ...@@ -209,8 +209,10 @@
<script src="output.js"></script> <script src="output.js"></script>
<script> <script>
const SAUP = () => { window['SAUP'] = {
sendLogData: (click,p) => {
console.log('发送买点',p.sapmodid,p.eleid)
}
} }
</script> </script>
</body> </body>
......
...@@ -10,6 +10,8 @@ import { IExposureData } from '../data/common/IExposureData'; ...@@ -10,6 +10,8 @@ import { IExposureData } from '../data/common/IExposureData';
import { GDispatcher } from '../../tc/util/GDispatcher'; import { GDispatcher } from '../../tc/util/GDispatcher';
import onNotSuccess from '../../new_wx/onNotSuccess'; import onNotSuccess from '../../new_wx/onNotSuccess';
import { showToast } from '../../new_wx/ctrls/toastCtrl'; import { showToast } from '../../new_wx/ctrls/toastCtrl';
import SAUP_sendLogData from '../../../src/SAUP_sendLogData';
import SAMap from '../../../src/SAMap';
// import { IExposureData } from '..'; // import { IExposureData } from '..';
...@@ -1953,6 +1955,8 @@ export class NetManager extends ABNetManager { ...@@ -1953,6 +1955,8 @@ export class NetManager extends ABNetManager {
* @param {IExposureData} exposure * @param {IExposureData} exposure
*/ */
public clickLog(exposure: IExposureData): void { public clickLog(exposure: IExposureData): void {
const __area__ = exposure['__area__'];
delete exposure['__area__'];
const net: INetData = { const net: INetData = {
name: 'clickLog', name: 'clickLog',
uri: window['duiba'] + '/log/click', uri: window['duiba'] + '/log/click',
...@@ -1963,6 +1967,11 @@ export class NetManager extends ABNetManager { ...@@ -1963,6 +1967,11 @@ export class NetManager extends ABNetManager {
hideMsg: true hideMsg: true
}; };
this.send(net); this.send(net);
if (SAMap[__area__])
SAUP_sendLogData(SAMap[__area__]);
else
console.warn('苏宁埋点未配置')
} }
/** /**
......
...@@ -7,7 +7,9 @@ class Main extends MainBase { ...@@ -7,7 +7,9 @@ class Main extends MainBase {
export const getlogItem = (i) =>{ export const getlogItem = (i) =>{
const Dpm = Buried.connectDpm(110, i, 1); // 点击埋点 const Dpm = Buried.connectDpm(110, i, 1); // 点击埋点
const Dcm = Buried.connectDcm(202, 0, 0); // 曝光埋点 const Dcm = Buried.connectDcm(202, 0, 0); // 曝光埋点
return Buried.createExposure(Dpm, Dcm); const obj = Buried.createExposure(Dpm, Dcm);
obj['__area__'] = i;
return obj;
} }
window['Main'] = Main; window['Main'] = Main;
......
export default () => {
try {
window['SAUP'].sendLogData("click", {
tag: '',   // 必传;如果需要传拓展的信息,在tag中加一个sa-data,将需要传的内容用json格式传到sa-data
sapmodid: "请写入产品提供的 modid",    // 必传;区块编码
eleid: "请写入产品提供的 eleid"        // 必传;坑位编码
});
//这里的this必须传dom节点
} catch (e) { }
}
export default {
'1': ['bingoMapIndex', 'bingoBox'],
'2': ['bingoMapIndex', 'bingoLife'],
'5': ['bingoMapIndex', 'bingoProp'],
'19': ['bingoMapIndex', 'bingoLevel'],
'32': ['bingoMapIndex', 'bingoIndexAd'],
'33': ['bingoMapIndex', 'bingoInvite'],
'67': ['bingoMapIndex', 'bingoCoin'],
'62': ['bingoMapIndex', 'bingoGetCoin'],
'77': ['bingoMapIndex', 'bingoRedBattle'],
'57': ['bingoMapIndex', 'bingoRedPacket'],
'74': ['bingoMapIndex', 'bingoRedBoom'],
'888001': ['bingoMapIndex', 'bingoLottery'],
'888006': ['bingoMapIndex', 'bingoGetRed'],
'3': ['bingoDialog', 'bingoLifeBuy'],
'4': ['bingoDialog', 'bingoLifeAsk'],
'6': ['bingoDialog', 'bingoBoomBuy'],
'8': ['bingoDialog', 'bingoBoomCfm'],
'9': ['bingoDialog', 'bingoHammerBuy'],
'11': ['bingoDialog', 'bingoHammerCfm'],
'12': ['bingoDialog', 'bingoStepBuy'],
'14': ['bingoDialog', 'bingoStepCfm'],
'17': ['bingoDialog', 'bingoBoxGetRewd'],
'18': ['bingoDialog', 'bingoLevelExit'],
'22': ['bingoDialog', 'bingoSign'],
'23': ['bingoDialog', 'bingoSignGet'],
'24': ['bingoDialog', 'bingoSignAd'],
'25': ['bingoDialog', 'bingoGroupAd'],
'26': ['bingoDialog', 'bingoLevelAd'],
'27': ['bingoDialog', 'bingoBoxAd'],
'28': ['bingoDialog', 'bingoRankAd'],
'29': ['bingoDialog', 'bingoBeginAd'],
'30': ['bingoDialog', 'bingoExchangeLife'],
'31': ['bingoDialog', 'bingoExchangeCfm'],
'34': ['bingoDialog', 'bingoInviteShare'],
'35': ['bingoDialog', 'bingoInviteAsist'],
'37': ['bingoDialog', 'bingoInviteCfm'],
'38': ['bingoDialog', 'bingoInviteAd'],
'39': ['bingoDialog', 'bingoExchangeProp'],
'40': ['bingoDialog', 'bingoShopExchCash'],
'41': ['bingoDialog', 'bingoShopExchCfm'],
'42': ['bingoDialog', 'bingoShopExchCont'],
'44': ['bingoDialog', 'bingoLifeGoLottery'],
'45': ['bingoDialog', 'bingoLotteryStart'],
'46': ['bingoDialog', 'bingoLotteryAgain'],
'47': ['bingoDialog', 'bingoLotterGetRed'],
'48': ['bingoDialog', 'bingoLotteryAd'],
'50': ['bingoDialog', 'bingoGetRedShare'],
'51': ['bingoDialog', 'bingoGetRedAssist'],
'53': ['bingoDialog', 'bingoGetRedCfm'],
'54': ['bingoDialog', 'bingoGetRedAd'],
'55': ['bingoDialog', 'bingoBackReward'],
'56': ['bingoDialog', 'bingoBackAd'],
'59': ['bingoDialog', 'bingoRedpackCont'],
'68': ['bingoDialog', 'bingoShopInvest'],
'70': ['bingoDialog', 'bingoShopInvest10'],
'71': ['bingoDialog', 'bingoShopInvest500'],
'72': ['bingoDialog', 'bingoShopInvest1000'],
'73': ['bingoDialog', 'bingoShopCoinCfm'],
'7': ['bingoDialog', 'bingoBoom'],
'10': ['bingoDialog', 'bingoHammer'],
'13': ['bingoDialog', 'bingoStep'],
}
\ No newline at end of file
import { elementMonsterResMap } from "./something/enum/ElementType";
const elem = document.createElement('div');
/**
* @param sapmodid 区块编码
* @param eleid 坑位编码
*/
export default ([sapmodid, eleid], saData = {}) => {
try {
elem.setAttribute('sa-data', JSON.stringify(saData));
if (window['SAUP'] && window['SAUP'].sendLogData) {
window['SAUP'].sendLogData("click", {
tag: elem,   // 必传;如果需要传拓展的信息,在tag中加一个sa-data,将需要传的内容用json格式传到sa-data
sapmodid: sapmodid,    // 必传;区块编码
eleid: eleid       // 必传;坑位编码
});
}else {
console.warn('苏宁买点api错误')
}
elem.setAttribute('sa-data', '{}');
} catch (e) { }
}
...@@ -309,7 +309,7 @@ export default class MapScene extends Scene { ...@@ -309,7 +309,7 @@ export default class MapScene extends Scene {
console.log('必须通关前面的关卡才能开启本关'); console.log('必须通关前面的关卡才能开启本关');
} else } else
PanelCtrl.instance.show('StartPanel', key); PanelCtrl.instance.show('StartPanel', key);
NetManager.ins.clickLog(getlogItem(19)) NetManager.ins.clickLog(getlogItem(19));
}, this); }, this);
} }
} }
...@@ -1001,6 +1001,7 @@ export default class MapScene extends Scene { ...@@ -1001,6 +1001,7 @@ export default class MapScene extends Scene {
this['musicBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_music, this); this['musicBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_music, this);
this['recordBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => { this['recordBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
PanelCtrl.instance.show('bag'); PanelCtrl.instance.show('bag');
NetManager.ins.clickLog(getlogItem(5));
}, this); }, this);
// 消消乐查询信息 // 消消乐查询信息
...@@ -1128,7 +1129,7 @@ export default class MapScene extends Scene { ...@@ -1128,7 +1129,7 @@ export default class MapScene extends Scene {
onTap_shopBtn() { onTap_shopBtn() {
PanelCtrl.instance.show('Shop'); PanelCtrl.instance.show('Shop');
NetManager.ins.clickLog(getlogItem(5)); // NetManager.ins.clickLog(getlogItem(5));
} }
toggleSettings() { toggleSettings() {
......
...@@ -71,6 +71,7 @@ export default class ScratchIcon extends IconBase { ...@@ -71,6 +71,7 @@ export default class ScratchIcon extends IconBase {
*/ */
protected onTouchBtn(e: egret.TouchEvent) { protected onTouchBtn(e: egret.TouchEvent) {
super.onTouchBtn(e); super.onTouchBtn(e);
NetManager.ins.clickLog(getlogItem(888006));
NetManager.ins.showLog(getlogItem(49)); NetManager.ins.showLog(getlogItem(49));
NetManager.ins.scratchGetTaskInfo((success, res) => { NetManager.ins.scratchGetTaskInfo((success, res) => {
if(!success) { if(!success) {
......
...@@ -30,7 +30,7 @@ export default class TurntableIcon extends IconBase { ...@@ -30,7 +30,7 @@ export default class TurntableIcon extends IconBase {
updateIcon(){ updateIcon(){
NetManager.ins.hc_turnableBaseInfo((success, res)=>{ NetManager.ins.hc_turnableBaseInfo((success, res)=>{
NetManager.ins.clickLog(getlogItem(43)); NetManager.ins.showLog(getlogItem(43));
if(!success){ if(!success){
this.visible = false; this.visible = false;
GDispatcher.dispatchEvent('updateScratchPosition'); GDispatcher.dispatchEvent('updateScratchPosition');
...@@ -58,7 +58,8 @@ export default class TurntableIcon extends IconBase { ...@@ -58,7 +58,8 @@ export default class TurntableIcon extends IconBase {
super.onTouchBtn(e); super.onTouchBtn(e);
loadSvga(getResPath() + 'resource/assets/svgas/turntable.svga').then(async (mv: any) => { loadSvga(getResPath() + 'resource/assets/svgas/turntable.svga').then(async (mv: any) => {
// await wait(100); // await wait(100);
PanelCtrl.instance.show('turnTable', {mv:mv}) PanelCtrl.instance.show('turnTable', {mv:mv});
NetManager.ins.clickLog(getlogItem(888001));
}) })
} }
......
...@@ -38,7 +38,7 @@ export default class SignItem extends eui.ItemRenderer { ...@@ -38,7 +38,7 @@ export default class SignItem extends eui.ItemRenderer {
this['btn'+this.data.btn].visible=true; this['btn'+this.data.btn].visible=true;
if(this.data.btn ==1) { if(this.data.btn ==1) {
NetManager.ins.clickLog(getlogItem(22)); NetManager.ins.showLog(getlogItem(22));
} }
console.log(this.data); console.log(this.data);
......
...@@ -40,7 +40,7 @@ export default class SignPanel extends Panel { ...@@ -40,7 +40,7 @@ export default class SignPanel extends Panel {
} }
item['btn1'].enabled=false; item['btn1'].enabled=false;
NetManager.ins.doSign((s)=>{ NetManager.ins.doSign((s)=>{
NetManager.ins.showLog(getlogItem(22)); NetManager.ins.clickLog(getlogItem(22));
item['btn1'].enabled=true; item['btn1'].enabled=true;
wait(300).then(()=>{ wait(300).then(()=>{
NetManager.ins.getSignInfo(() => { NetManager.ins.getSignInfo(() => {
......
...@@ -5,8 +5,18 @@ ...@@ -5,8 +5,18 @@
"timestamp": 1573210800000, "timestamp": 1573210800000,
"data": { "data": {
"currentRemainTimes": 0, "currentRemainTimes": 0,
"currentSession": null, "currentSession": {
"nextSession": null, "sessionIndex": 6,
"canJoin": false "startTime": 1573210800000,
"endTime": 1573299903000,
"limitScore": 10
},
"nextSession": {
"sessionIndex": 10,
"startTime": 1573440915952,
"endTime": 1573299903000,
"limitScore": 10
},
"canJoin": true
} }
} }
\ No newline at end of file
This diff is collapsed.
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"desc":"OK", "desc":"OK",
"timestamp":1566546925981, "timestamp":1566546925981,
"data":{ "data":{
"option": { "opt1ion": {
"id": "41", "id": "41",
"day": null, "day": null,
"realValue":999, "realValue":999,
......
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