Commit 0b67e6c2 authored by zjz1994's avatar zjz1994

https网页内嵌

parent a03c4e5b
...@@ -1630,6 +1630,7 @@ export default class MainScene extends Scene { ...@@ -1630,6 +1630,7 @@ export default class MainScene extends Scene {
if(guidelevels.indexOf(this.chapter)!=-1&&!readCache(getCacheKey() + this.chapter)){ if(guidelevels.indexOf(this.chapter)!=-1&&!readCache(getCacheKey() + this.chapter)){
return false; return false;
} }
if( if(
fesChapterData.indexOf(this.chapter >> 0) > -1 && fesChapterData.indexOf(this.chapter >> 0) > -1 &&
getRedBombTimes() && getRedBombTimes() &&
...@@ -1637,7 +1638,6 @@ export default class MainScene extends Scene { ...@@ -1637,7 +1638,6 @@ export default class MainScene extends Scene {
this.lattices[festivalIndex] && //格子必须有 this.lattices[festivalIndex] && //格子必须有
(Tool.judgeSetFesEle(this.lattices[festivalIndex]) || !this.lattices[festivalIndex].element) //没有元素也行 (Tool.judgeSetFesEle(this.lattices[festivalIndex]) || !this.lattices[festivalIndex].element) //没有元素也行
) { ) {
// console.log("节日元素loading");
this['redrainbg'].visible = true; this['redrainbg'].visible = true;
await this.startPlayLoadingAni(); await this.startPlayLoadingAni();
this['redrainbg'].visible = false; this['redrainbg'].visible = false;
......
...@@ -161,6 +161,23 @@ export default class MapScene extends Scene { ...@@ -161,6 +161,23 @@ export default class MapScene extends Scene {
this.updateAdData(); this.updateAdData();
this['avatar'].mask = this['avatarMask']; this['avatar'].mask = this['avatarMask'];
//新增
var taskcheck = localStorage.getItem("taskcheck");
if(taskcheck){
var taskcheckdata = JSON.parse(taskcheck);
if(taskcheckdata&&taskcheckdata.totask){
var ntime = Date.now();
var totime = taskcheckdata.time;
var passtime = ntime-totime;
//五分钟内
if(passtime<5*60*1000){
console.log("登录时任务处理",passtime);
NetManager.ins.remainDuration(passtime,false);
}
}
}
NetManager.ins.getSignInfo(() => { NetManager.ins.getSignInfo(() => {
const parmas = []; const parmas = [];
const panels = []; const panels = [];
......
...@@ -157,6 +157,7 @@ export default class RedBombAlertPanel extends Panel { ...@@ -157,6 +157,7 @@ export default class RedBombAlertPanel extends Panel {
this.numsgroup.visible = isShow; this.numsgroup.visible = isShow;
}, 1700); }, 1700);
// for(var mvkey=0;mvkey<mv.) // for(var mvkey=0;mvkey<mv.)
// console.log("红包奖励弹窗",img,mv,mv.getOwnPropertyNames());
mv.setImage("815207F0-919C-4796-A09E-21868AF337CB", img); mv.setImage("815207F0-919C-4796-A09E-21868AF337CB", img);
}, 100) }, 100)
}); });
......
...@@ -97,27 +97,66 @@ export default class WebView extends egret.DisplayObjectContainer { ...@@ -97,27 +97,66 @@ export default class WebView extends egret.DisplayObjectContainer {
} }
public setSrc(src:string){ public setSrc(src:string){
console.log("跳转地址",src); console.log("跳转地址",src);
if(this.nshowurl&&this.nshowurl==src){ var headstr = src.slice(0,5);
if(headstr=="https"){
}else{ if(this.nshowurl&&this.nshowurl==src){
}else{
this._iframe.src = "";
this.nshowurl = src;
this._iframe.src=src;
}
}else if(headstr=="http:"){
this._iframe.src = ""; this._iframe.src = "";
this.nshowurl = src; window.location.href = src;
this._iframe.src=src; }else{
if(src.length>0){
this._iframe.src = "";
console.error("这是啥跳转",src);
window.location.href = src;
}
} }
} }
public show():void { public show():void {
this._iframe.style.display='block'; this._iframe.style.display='block';
this._iframeWrapper.style.display='block'; this._iframeWrapper.style.display='block';
this.showtime = Date.now(); var ntime = Date.now();
this.showtime = ntime;
localStorage.setItem("taskcheck",JSON.stringify({
totask:true,
time:ntime
}))
} }
public destroy():void { public destroy():void {
if(this._iframeWrapper){ if(this._iframeWrapper){
this._iframeWrapper.style.display="none"; this._iframeWrapper.style.display="none";
} }
this.endtime = Date.now(); var ntime = Date.now();
this.endtime = ntime;
localStorage.setItem("taskcheck",JSON.stringify({
totask:false,
time:ntime
}));
var passtime = this.endtime - this.showtime; var passtime = this.endtime - this.showtime;
console.log("任务处理");
try{
console.log("全屏适配");
//新增全屏
if (window['$'].os.android) {
// 沉浸式
window['Bridge'].enableTranslucentBar(true);
} else if (window['$'].os.ios && window['SNNativeClient']) {
//导航栏
window['SNNativeClient'].setNavigationHiden(0)
//全屏
window['SNNativeClient'].callOpenWebViewFullScreen('1')
}
}catch(e){
}
NetManager.ins.remainDuration(passtime,false); NetManager.ins.remainDuration(passtime,false);
} }
// public get width():number { // public get width():number {
......
{ {
"code":"0000000000", "code":"0000000000",
"data":{ "data":{
"remain": 0, "remain": 10,
"redBombSwitchTime": "77798963487234" "redBombSwitchTime": "77798963487234"
}, },
"desc":"OK", "desc":"OK",
......
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