Commit 2dc85e94 authored by liujiangnan's avatar liujiangnan

debug

parent 8f84c5cd
......@@ -70,11 +70,11 @@ export default class NewClass extends middleLayerBase {
if (video) {
cc.find("Canvas/Main Camera").getComponent(cc.Camera).backgroundColor = cc.color(0,0,0,0);
video.stayOnBottom = true;
setTimeout(() => {
cc.macro.ENABLE_TRANSPARENT_CANVAS = true;
}, 1000);
// setTimeout(() => {
// cc.macro.ENABLE_TRANSPARENT_CANVAS = true;
// }, 1000);
} else {
cc.macro.ENABLE_TRANSPARENT_CANVAS = false;
// cc.macro.ENABLE_TRANSPARENT_CANVAS = false;
}
}
......@@ -866,8 +866,10 @@ export default class NewClass extends middleLayerBase {
activeLevels = null;
isLogin = false;
async start() {
this.node.zIndex = 9999;
// this.node.zIndex = 9999;
this.loadOnlineBundle('op_02');
cc.game.addPersistRootNode(this.node);
return;
// await this.checkVersion();
if (this.isDev == 1) {
......@@ -880,49 +882,7 @@ export default class NewClass extends middleLayerBase {
cc.find('middleLayer/ram').active = false;
cc.find('middleLayer/cross').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.onMiddleLayerLoadingFinish();
......@@ -941,7 +901,6 @@ export default class NewClass extends middleLayerBase {
// 游客功能
this.isLogin = false;
this.loadOnlineBundle('NJ_YouLeChang');
// this.loadOnlineBundle('NJ_login');
}
this.initListener();
......
......@@ -139,7 +139,7 @@ export function supportMethod (method, param) {
}
} else if (cc.sys.isBrowser) {
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') {
// 初始化参数
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