Commit cad4de05 authored by wjf's avatar wjf

l

parent 146bebe8
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -61,89 +61,22 @@ ...@@ -61,89 +61,22 @@
<!-- //线上不需要 --> <!-- //线上不需要 -->
<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>
window['testUrl'] = 'http://cuxiaoprexg.m.cnsuning.com/scms/cx521.html?activityId=SL446689024459878400&subactivityId=SUB446689681678090240&businessid=cx521';
window['hbRainTime'] = 30; // 红包雨倒计时
window['plugs'] = [1, 2, 3]
// localStorage.clear();
var targetUrl = 'https://gameact.suning.com/sngame-web/api/duiba/private/v1/getLoginUrl.do?appCode=duiba&activityCode=3651404';
/*
* 邀请有礼分享
*/
function inviteShare(shareCode) {
let title = "求求你可以帮我点一下吗?还差一点点就可以领红包了~";
let content = "我在狮狮连萌等你,一起天天领福利哦";
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 shareWays = "1,2";
console.log("AppReady");
if (isIphone()) {
console.log("IOS");
console.log(window.SNNativeClient);
window.callNativeShareResult = function () {
};
window.SNNativeClient.callNativeShare(title, content, targetUrl, iconUrl, shareWays);
} else {
console.log("安卓");
console.log(shareApi);
console.log(shareApi.callMediaShare);
shareApi.callNativeShare(title, content, targetUrl, iconUrl, shareWays);
}
}
function share() {
let title = "";
let content = "";
let targetUrl = "";
let iconUrl = "http://yun.duiba.com.cn/db_games/xiaoxiaole.jpg";
let shareWays = "";
console.log("AppReady");
if (isIphone()) {
console.log("IOS");
console.log(window.SNNativeClient);
window.callNativeShareResult = function () {
};
window.SNNativeClient.callNativeShare(title, content, targetUrl, iconUrl, shareWays);
} else {
console.log("安卓");
console.log(shareApi);
console.log(shareApi.callMediaShare);
shareApi.callNativeShare(title, content, targetUrl, iconUrl, shareWays);
}
}
function isIphone() {
var ua = navigator.userAgent.toLocaleLowerCase();
if (ua.match(/iphone|ipad/)) {
return true;
} else if (ua.match(/android/)) {
return false;
}
}
</script>
<script> <script>
window['signconfigs'] = [ window['signconfigs'] = [
{nums: '0.10元', type: 'quan10'}, { nums: '*20', type: 'money' },
{nums: '*1', type: 'hammer'}, { nums: '*20', type: 'money' },
{nums: '0.15元', type: 'quan15'}, { nums: '*1', type: 'hammer' },
{nums: '*1', type: 'boom'}, { nums: '*20', type: 'money' },
{nums: '0.23元', type: 'quan23'}, { nums: '*20', type: 'money' },
{nums: '*1', type: 'steps'}, { nums: '*20', type: 'money' },
{nums: '0.36元', type: 'quan36'} { nums: '*100', type: 'money' }
]; ];
// localStorage.clear(); // localStorage.clear();
window['imgver'] = '11112' window['imgver'] = '11112'
window['total_level'] = 18 + 13 * 17; window['total_level'] = 18 + 13 * 17;
window['last_level'] = 239;//必须大于等于total_level window['last_level'] = 239;//必须大于等于total_level
// localStorage.clear();
var sharePic = document.getElementById('pic');
sharePic.onclick = function () {
sharePic.style.display = 'none'
}
window['duiba'] = ''; window['duiba'] = '';
// window['duiba'] = '/duiba'; // window['duiba'] = '/duiba';
window['registerWX'] = (result) => { window['registerWX'] = (result) => {
......
...@@ -110,7 +110,7 @@ class Video extends eui.Component/*egret.DisplayObjectContainer*/ { ...@@ -110,7 +110,7 @@ class Video extends eui.Component/*egret.DisplayObjectContainer*/ {
public completeCallback: Function; public completeCallback: Function;
private appUi: HTMLImageElement //eui.Image//egret.DisplayObjectContainer; private appUi//: HTMLDivElement //eui.Image//egret.DisplayObjectContainer;
macro: number; macro: number;
showReport: any; showReport: any;
...@@ -233,6 +233,11 @@ class Video extends eui.Component/*egret.DisplayObjectContainer*/ { ...@@ -233,6 +233,11 @@ class Video extends eui.Component/*egret.DisplayObjectContainer*/ {
}, s) }, s)
s.initListener(); s.initListener();
//挂方法
window["videoCloseEvent"] = () => {
this.closeEvent();
};
} }
/** /**
* *
...@@ -285,7 +290,12 @@ class Video extends eui.Component/*egret.DisplayObjectContainer*/ { ...@@ -285,7 +290,12 @@ class Video extends eui.Component/*egret.DisplayObjectContainer*/ {
// this.media.style.top = (ch - h / (w / cw)) / 2 + "px"; // this.media.style.top = (ch - h / (w / cw)) / 2 + "px";
this.play(); this.play();
this.volume = 1; this.volume = 1;
this.volumeBtn.src = "https://yun.duiba.com.cn/db_games/activity/xiaoxiaoleTuia/cssImage/voice.png" this.volumeBtn.src = "https://yun.duiba.com.cn/db_games/activity/xiaoxiaoleTuia/cssImage/voice.png";
//挂方法
window["videoCloseEvent"] = () => {
this.closeEvent();
};
} }
private element1: HTMLDivElement; private element1: HTMLDivElement;
private volumeBtn: HTMLImageElement private volumeBtn: HTMLImageElement
...@@ -386,6 +396,7 @@ class Video extends eui.Component/*egret.DisplayObjectContainer*/ { ...@@ -386,6 +396,7 @@ class Video extends eui.Component/*egret.DisplayObjectContainer*/ {
element1.appendChild(closeBtn) element1.appendChild(closeBtn)
closeBtn.addEventListener("click", (e) => { closeBtn.addEventListener("click", (e) => {
this.closeEvent(); this.closeEvent();
this.appAdClose();
}) })
//下载按钮 //下载按钮
...@@ -420,6 +431,22 @@ class Video extends eui.Component/*egret.DisplayObjectContainer*/ { ...@@ -420,6 +431,22 @@ class Video extends eui.Component/*egret.DisplayObjectContainer*/ {
this.appUi.style.height = (document.body.clientHeight - 200) + "px" this.appUi.style.height = (document.body.clientHeight - 200) + "px"
} }
} }
// this.appUi = document.createElement("div")
// this.appUi.innerHTML = `
// <div class="video-land-page-content">
// <img class="app-close"
// src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAApCAYAAABDV7v1AAAJoUlEQVRYR62ZDUxTWRbH7yuFtnzYgsCYZQ1RG6bIUkHTomhnCQNGZkxmgzNqZlZXRdQExLW67kBiXIgMWleFEMGvurMbJqDJzhoXszFGhBWByscKjGgVjWLUgC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R8rtPpKhmGQXEiGE+ePPlh2bJlh1+8eIH+htaTiGYoc1uUa21CLRaLyWw27/Lz8/OQ5XQ6W3Jzc9dbrVa0IbSXF8CK61EoYC8i7Hb7VzExMWWcZQWQjx49up2UlPTnV69e8SFhTZofIRc7gKCDVZFrw4qKipbl5+eb5XK5x+44nc72/Pz8taWlpdgdD1gKyvdJ5cOHDzfNnz//KLeFAki73d5uNBqPDg0NYfXUkoh0QNJ0Q2ta+HQQIQT5FrChBQUFSYWFhXukjtyxsbGukpKSNYWFhS/4tyQA4PdM8B+l3W5fFxMTc1Iqrdy9e7fFaDSWDQ8P8yFhSRyJfP+CbLcLcbBuy+7duxdH776AgAAEnGCMj493r169etXVq1f5Acb2TPyKPhgXY3K5/JdiAV1dXY1Lly4tHx0dpZ0i+htqSamIFWQOnhuwrc3OnTsTjhw58rVCoYDFxbu2W6fT/YVr8NjeiYLCL9l0MjExcVt8fre3t9cnJSVV4A6Kt93UJ9+UVsSwgHJbNjs7O768vDxfoVDgyHWPnp6eP8XFxVXw0h17AUEDCOlE09HR8fvExMQ8Ostms11Zvnz5WR4kLDkTSCrCGyxr2Y0bNy6srKzMDwwMxDNxOp0D69aty7x06dJDXrrzuHuC04cfO3YsJT4+Pr6lpeXh/v370d9gi2k7C0hcs8z4nOZdENNbQ5pjoS9Ur9dHFhUVmfz9/SeLi4trm5qaHnO1K83LLChe2HpEKAoNTMY7PYUQzZgAWORJehU4o2KCt6PUsjgM2CtOrrWBLnwGA45f6MCxSi8i2FQlDib4KSZhxZiIpAvrAY5W5fRiAKA/d/BhabcAfdALa0MmTjboErTP4vTEJnsOEivHRKwSq8KLfz3+cyHFPkubRgBDL0BhGOgALNWHG273lQ5dKW03IATfYSK9CmcncPBvC8mH5VuX6sPfYRyq0+1e4iOUugL/e3rmehQK70rL++8L1QuRkvq8lXnvgeH9ivg/Q8XnV69aMKIAAAAASUVORK5CYII=">
// </img>
// <div class="app-info-wrap">
// <div class="app-logo"></div>
// <div class="app-name"></div>
// <div class="app-tips">新人下载立领60元现金礼包</div>
// <div class="app-button"></div>
// <div class="app-download-num"></div>
// </div>
// </div>
// `;
} }
//初始化监听,只执行一次 //初始化监听,只执行一次
...@@ -603,6 +630,10 @@ class Video extends eui.Component/*egret.DisplayObjectContainer*/ { ...@@ -603,6 +630,10 @@ class Video extends eui.Component/*egret.DisplayObjectContainer*/ {
this.returnCallback && this.returnCallback(true); this.returnCallback && this.returnCallback(true);
} }
} }
private appAdClose() {
//app方法
if (window["helpbridge"] && window["helpbridge"].adClose) window["helpbridge"].adClose();
}
/** /**
* 下载事件 * 下载事件
......
...@@ -23,8 +23,10 @@ export const handleVideo = ( ...@@ -23,8 +23,10 @@ export const handleVideo = (
var rewardvideo = res.data.ad[0]; var rewardvideo = res.data.ad[0];
var videoIns = getVideoIns(rewardvideo); var videoIns = getVideoIns(rewardvideo);
videoIns.returnCallback = returnCallback; videoIns.returnCallback = returnCallback;
videoIns.completeCallback = completeCallback videoIns.completeCallback = completeCallback;
layers.videoLayer.addChild(videoIns) layers.videoLayer.addChild(videoIns)
//app方法
if (window["helpbridge"] && window["helpbridge"].adShowing) window["helpbridge"].adShowing();
} else { } else {
showToast("广告准备中,请稍后再试"); showToast("广告准备中,请稍后再试");
} }
......
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