Commit 96eb2bb6 authored by liujiangnan's avatar liujiangnan

feat: 游客模式拦截处理

parent 8b324781
......@@ -621,7 +621,6 @@ export default class NewClass extends middleLayerBase {
return;
}
this.IS_BUNDLE_LOADING = true;
console.log(" in loadOnlineBundle")
cc.find('middleLayer/BtnRight').active = false;
cc.find('middleLayer/BtnLeft').active = false;
cc.find('middleLayer/ExitBtn').active = false;
......@@ -633,6 +632,15 @@ export default class NewClass extends middleLayerBase {
cc.sys.localStorage.setItem("token", "");
}
if (this.isLogin == false && ["NJ_MoTianLun", "NJ_YueDuJiaYouZhan", "NJ_usercenter"].includes(bundleName)) {
// 游客
// 提示先登录后购买
this.showConfirm("需要登录后购买才能使用,去登录吗?", ()=>{
this.loadOnlineBundle('NJ_login');
});
return;
}
this.callNetworkApiGet(`/api/template/v2/${bundleName}`, {}, (datastr) => {
const data = JSON.parse(datastr).data;
let sceneName, version, bondleUrl = "";
......
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