Commit 079450d0 authored by 李维's avatar 李维

增加左侧激活按钮

激活动画图标还在制作
parent 7c8f0d91
......@@ -7,8 +7,8 @@
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1024,
"height": 1024,
"width": 512,
"height": 512,
"platformSettings": {},
"subMetas": {
"ipw_finger_click_tex": {
......
......@@ -81,6 +81,12 @@ export default class SceneComponent extends MyCocosSceneComponent {
if (!middleLayer) {
return;
}
if(this.engineType == 'aixuebao') {
const showActiveBtn = cc.find("Canvas/leftButtons/showActiveBtn");
showActiveBtn.active = false;
}
if (middleLayer.getComponent('middleLayer').isLogin == false) {
// 游客
cc.find("Canvas/avatar_border/nick_name").getComponent(cc.Label).string = "游客";
......@@ -269,7 +275,21 @@ export default class SceneComponent extends MyCocosSceneComponent {
buttonOnClick(btnClose, () => {
cc.find('Canvas/userInfo').active = false;
});
// 左侧按钮 - 激活
const showActiveBtn = cc.find("Canvas/leftButtons/showActiveBtn");
buttonOnClick(showActiveBtn, () => {
if(middleLayerComponent.isLogin == false) {
// 游客
// 提示先登录后购买
middleLayerComponent.showConfirm("需要登录后才能使用,去登录吗?", ()=>{
middleLayerComponent.loadOnlineBundle('NJ_login');
});
} else {
// 已经登录 弹出激活框
middleLayerComponent.showActiveWindowDirect && middleLayerComponent.showActiveWindowDirect();
}
});
if (cc.sys.isNative && cc.sys.os == cc.sys.OS_IOS) {
// 整个IF都是用于IOS过审
......
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