Commit 2dc85e94 authored by liujiangnan's avatar liujiangnan

debug

No related merge requests found
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -70,11 +70,11 @@ export default class NewClass extends middleLayerBase { ...@@ -70,11 +70,11 @@ export default class NewClass extends middleLayerBase {
if (video) { if (video) {
cc.find("Canvas/Main Camera").getComponent(cc.Camera).backgroundColor = cc.color(0,0,0,0); cc.find("Canvas/Main Camera").getComponent(cc.Camera).backgroundColor = cc.color(0,0,0,0);
video.stayOnBottom = true; video.stayOnBottom = true;
setTimeout(() => { // setTimeout(() => {
cc.macro.ENABLE_TRANSPARENT_CANVAS = true; // cc.macro.ENABLE_TRANSPARENT_CANVAS = true;
}, 1000); // }, 1000);
} else { } else {
cc.macro.ENABLE_TRANSPARENT_CANVAS = false; // cc.macro.ENABLE_TRANSPARENT_CANVAS = false;
} }
} }
...@@ -866,8 +866,10 @@ export default class NewClass extends middleLayerBase { ...@@ -866,8 +866,10 @@ export default class NewClass extends middleLayerBase {
activeLevels = null; activeLevels = null;
isLogin = false; isLogin = false;
async start() { async start() {
this.node.zIndex = 9999; // this.node.zIndex = 9999;
this.loadOnlineBundle('op_02');
cc.game.addPersistRootNode(this.node); cc.game.addPersistRootNode(this.node);
return;
// await this.checkVersion(); // await this.checkVersion();
if (this.isDev == 1) { if (this.isDev == 1) {
...@@ -881,48 +883,6 @@ export default class NewClass extends middleLayerBase { ...@@ -881,48 +883,6 @@ export default class NewClass extends middleLayerBase {
cc.find('middleLayer/cross').active = false; cc.find('middleLayer/cross').active = false;
cc.find('middleLayer/free').active = false; cc.find('middleLayer/free').active = false;
if (this.type == "aixuebao") {
await this.asyncCallNetworkApiGet(`/api/aixuebao/v1/engine/active`, {
engineid: this.engine_uuid,
product: 'oxford'
});
// 机器码授权免登陆 (爱学宝)
const { token } = await this.asyncCallNetworkApiPost(`/api/oxfordlite/v1/engine/login`, {
engine_uuid: this.engine_uuid
});
cc.sys.localStorage.setItem('token', token);
}
// 处理苹果支付的异常回调
(<any>window).air.startBuyToAppStoreCallBack = async (res) => {
console.log(`===成功调用startBuyToAppStoreCallBack===${res}`);
cc.find(`middleLayer/exception_pay_win`).active = true;
if (typeof (res) == 'string') {
res = JSON.parse(res);
}
if (res.error) {
cc.find(`middleLayer/exception_pay_win/buy_status_text`).getComponent(cc.Label).string = `支付失败\n${res.error}`;
setTimeout(() => {
cc.find(`middleLayer/exception_pay_win`).active = false;
cc.find(`middleLayer/exception_pay_win/buy_status_text`).getComponent(cc.Label).string = "正在处理支付订单\n请勿关闭App";
}, 2000);
return;
}
const orderData = await this.asyncCallNetworkApiPost(`/api/oxford/v1/paid/ios/order/save`, {
productid: res.productid,
puid: res.puid,
iospaidcode: res.receiptData
});
if (orderData.code!=200) {
cc.find(`middleLayer/exception_pay_win/buy_status_text`).getComponent(cc.Label).string = `支付失败[${orderData.code}]\n请联系客服`;
return;
}
cc.find(`middleLayer/exception_pay_win/buy_status_text`).getComponent(cc.Label).string = `购买成功!\n快去探索绘玩绘拼自然拼读世界吧!`;
cc.find(`middleLayer/exception_pay_win/active_btn`).active = true;
// 回调给苹果订单处理成功了
(<any>window).courseware.callOcMethod("orderToSeverSuccess", {});
}
this.showWaitingLetters(); this.showWaitingLetters();
this.onMiddleLayerLoadingFinish(); this.onMiddleLayerLoadingFinish();
...@@ -941,7 +901,6 @@ export default class NewClass extends middleLayerBase { ...@@ -941,7 +901,6 @@ export default class NewClass extends middleLayerBase {
// 游客功能 // 游客功能
this.isLogin = false; this.isLogin = false;
this.loadOnlineBundle('NJ_YouLeChang'); this.loadOnlineBundle('NJ_YouLeChang');
// this.loadOnlineBundle('NJ_login');
} }
this.initListener(); this.initListener();
......
...@@ -139,7 +139,7 @@ export function supportMethod (method, param) { ...@@ -139,7 +139,7 @@ export function supportMethod (method, param) {
} }
} else if (cc.sys.isBrowser) { } else if (cc.sys.isBrowser) {
if(method == 'getEngineInfo'){ if(method == 'getEngineInfo'){
window.air.getEngineInfoCallback({isDev: 0, uuid: 'debug-njstar-xxxxxx'}); window.air.getEngineInfoCallback({isDev: 1, uuid: 'debug-njstar-xxxxxx'});
} else if (method == 'startTest') { } else if (method == 'startTest') {
// 初始化参数 // 初始化参数
initSkKouYuParms(param.params, 'para.eval'); initSkKouYuParms(param.params, 'para.eval');
......
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