Commit b926d689 authored by liujiangnan's avatar liujiangnan

feat: 输入激活码

parent a52882f3
...@@ -319,7 +319,7 @@ export function initAir(_this) { ...@@ -319,7 +319,7 @@ export function initAir(_this) {
} else { } else {
console.error(`非源生环境,网页版不支持${method}方法,将返回此方法的Mock数据以便于网页版调试使用`); console.error(`非源生环境,网页版不支持${method}方法,将返回此方法的Mock数据以便于网页版调试使用`);
if(method == 'getEngineInfo'){ if(method == 'getEngineInfo'){
window.air.getEngineInfoCallback({isDev: 1, uuid: 'debug-xxxxxx-xxxxxx'}); window.air.getEngineInfoCallback({isDev: 0, uuid: 'debug-xxxxxx-xxxxxx'});
} else if (method == 'startTest') { } else if (method == 'startTest') {
} else if (method == 'stopTest') { } else if (method == 'stopTest') {
window.air.testCallBack(testMockData); window.air.testCallBack(testMockData);
......
...@@ -229,69 +229,8 @@ export default class NewClass extends middleLayerBase { ...@@ -229,69 +229,8 @@ export default class NewClass extends middleLayerBase {
if (this.IS_BUNDLE_LOADING) { if (this.IS_BUNDLE_LOADING) {
return; return;
} }
if (cc.sys.isNative && cc.sys.os == cc.sys.OS_IOS) { const tipsLayer = cc.find('middleLayer/activeLayer');
// if (true) { tipsLayer.active = true;
const tipsLayer = cc.find('middleLayer/iosActiveLayer');
cc.find(`loading`, tipsLayer).active = true;
tipsLayer.active = true;
const token = cc.sys.localStorage.getItem('token');
const res: any = await this.asyncCallNetworkApiGet('/api/oxford/v1/product/list', {token});
const products = JSON.parse(res).rows;
let index = 1;
for (let i = 0; i < products.length; i++) {
const pd = products[i];
if (pd.type_ == 1) {
cc.find(`active_bg/1_5_product/card/buy`, tipsLayer).attr({ product: pd });
} else {
const cardNode = cc.find(`active_bg/one_level_product`, tipsLayer);
const levelNode = cc.find(`level${index}`, cardNode);
cc.find(`buy`, levelNode).attr({ product: pd });
const endDate = pd.syll_end_date;
if (endDate) {
cc.find(`buy/text`, levelNode).getComponent(cc.Label).string = "续费";
cc.find(`tips`, levelNode).getComponent(cc.Label).string = `有效期至 ${endDate.split("T")[0].trim()}`;
cc.find(`tips`, levelNode).active = true;
} else {
cc.find(`buy/text`, levelNode).getComponent(cc.Label).string = "立即购买";
cc.find(`tips`, levelNode).active = false;
}
index++;
}
}
cc.find(`loading`, tipsLayer).active = false;
} else if (this.type != 'aixuebao') {
const tipsLayer = cc.find('middleLayer/androidActiveLayer');
cc.find(`loading`, tipsLayer).active = true;
tipsLayer.active = true;
const token = cc.sys.localStorage.getItem('token');
const res: any = await this.asyncCallNetworkApiGet('/api/oxford/v1/product/list', {token});
const products = JSON.parse(res).rows;
let index = 1;
for (let i = 0; i < products.length; i++) {
const pd = products[i];
if (pd.type_ == 1) {
cc.find(`active_bg/1_5_product/card/buy`, tipsLayer).attr({ product: pd });
} else {
const cardNode = cc.find(`active_bg/one_level_product`, tipsLayer);
const levelNode = cc.find(`level${index}`, cardNode);
cc.find(`buy`, levelNode).attr({ product: pd });
const endDate = pd.syll_end_date;
if (endDate) {
cc.find(`buy/text`, levelNode).getComponent(cc.Label).string = "续费";
cc.find(`tips`, levelNode).getComponent(cc.Label).string = `有效期至 ${endDate.split("T")[0].trim()}`;
cc.find(`tips`, levelNode).active = true;
} else {
cc.find(`buy/text`, levelNode).getComponent(cc.Label).string = "立即购买";
cc.find(`tips`, levelNode).active = false;
}
index++;
}
}
cc.find(`loading`, tipsLayer).active = false;
} else {
const tipsLayer = cc.find('middleLayer/activeLayer');
tipsLayer.active = true;
}
} }
// 立即显示激活弹窗 // 立即显示激活弹窗
......
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