Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
6bb128f74c | ||
![]() |
e452bbff63 | ||
![]() |
5e09d23570 |
File diff suppressed because one or more lines are too long
1351
assets/resources/prefabs/tips/pb_update.prefab
Normal file
1351
assets/resources/prefabs/tips/pb_update.prefab
Normal file
File diff suppressed because it is too large
Load Diff
7
assets/resources/prefabs/tips/pb_update.prefab.meta
Normal file
7
assets/resources/prefabs/tips/pb_update.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"ver": "1.0.1",
|
||||
"uuid": "eb441e7f-3c23-46b6-8ff3-f9e6f82a8c16",
|
||||
"optimizationPolicy": "AUTO",
|
||||
"asyncLoadAssets": false,
|
||||
"subMetas": {}
|
||||
}
|
@ -14,6 +14,7 @@ const { operation, OperationType } = require('./Operation/Operation');
|
||||
const jcgamelog = require('./jcfw/service/jcgamelog');
|
||||
const { uimanger } = require('./UI/UIManger');
|
||||
const { default: ChainErrTip } = require('./tips/ChainErrTip');
|
||||
const { UpdateTips } = require('./tips/UpdateTips');
|
||||
|
||||
window.connectOK = (account) => {
|
||||
jcgamelog.addOperation(
|
||||
@ -30,9 +31,9 @@ window.connectOK = (account) => {
|
||||
jclogin.getNonce();
|
||||
};
|
||||
|
||||
window.chainErr = ()=>{
|
||||
console.log("打开提示框")
|
||||
cc.Notifier.emit("chainerr");
|
||||
window.chainErr = () => {
|
||||
console.log('打开提示框');
|
||||
cc.Notifier.emit('chainerr');
|
||||
};
|
||||
|
||||
window.signApp = (sign) => {
|
||||
@ -133,7 +134,6 @@ cc.Class({
|
||||
// LIFE-CYCLE CALLBACKS:
|
||||
|
||||
onLoad() {
|
||||
|
||||
this.allCountry = ['Japan', 'Singapore', 'Turkey', 'USA'];
|
||||
|
||||
this.cpa_icon = [];
|
||||
@ -147,8 +147,7 @@ cc.Class({
|
||||
|
||||
cc.Notifier.on('autologinsuccess', this, this.loadMain.bind(this));
|
||||
|
||||
cc.Notifier.on("chainerr",this,this.showchainErrTip.bind(this));
|
||||
|
||||
cc.Notifier.on('chainerr', this, this.showchainErrTip.bind(this));
|
||||
|
||||
cc.debug.setDisplayStats(false);
|
||||
|
||||
@ -171,7 +170,7 @@ cc.Class({
|
||||
}
|
||||
},
|
||||
|
||||
showchainErrTip(){
|
||||
showchainErrTip() {
|
||||
uimanger.showUI(ChainErrTip.prefabPath);
|
||||
},
|
||||
|
||||
@ -200,7 +199,7 @@ cc.Class({
|
||||
cc.Notifier.off('sdkloginfail', this);
|
||||
cc.Notifier.off('sdkLoginSuccess', this);
|
||||
cc.Notifier.off('autologinsuccess', this);
|
||||
cc.Notifier.off("chainerr",this,this.showchainErrTip.bind(this));
|
||||
cc.Notifier.off('chainerr', this, this.showchainErrTip.bind(this));
|
||||
cc.loader.onProgress = null;
|
||||
SDKManage.logEvent('login_success', 'loginmain');
|
||||
},
|
||||
@ -250,18 +249,17 @@ cc.Class({
|
||||
// this.btn_wallet.active = true;
|
||||
//
|
||||
SDKManage.init('6516');
|
||||
|
||||
|
||||
jcgamelog.addOperation(OperationType.LOGIN, 'gamestart');
|
||||
|
||||
console.log(`current packageid ` + Config.mainConfig.packageid);
|
||||
console.log(`current version ` + Config.mainConfig.version);
|
||||
|
||||
jcgamelog.addOperation(
|
||||
OperationType.LOGIN,
|
||||
'gamestart',
|
||||
OperationType.Login,
|
||||
Config.mainConfig.packageid
|
||||
);
|
||||
|
||||
|
||||
console.log(`current packageid `+ Config.mainConfig.packageid)
|
||||
console.log(`current version `+ Config.mainConfig.version)
|
||||
|
||||
jcgamelog.addOperation(OperationType.Login,Config.mainConfig.packageid)
|
||||
|
||||
if (!localStorage.getItem('currentNet')) {
|
||||
localStorage.setItem('currentNet', allBaseNet.japan);
|
||||
} else {
|
||||
@ -289,6 +287,8 @@ cc.Class({
|
||||
this.allCountry[data];
|
||||
}
|
||||
|
||||
uimanger.showUI(UpdateTips.prefabPath);
|
||||
return;
|
||||
// if (cc.sys.isBrowser) {
|
||||
// localStorage.setItem('currentNet', allBaseNet.test);
|
||||
// }
|
||||
|
31
assets/scripts/tips/UpdateTips.ts
Normal file
31
assets/scripts/tips/UpdateTips.ts
Normal file
@ -0,0 +1,31 @@
|
||||
const { ccclass, property } = cc._decorator;
|
||||
|
||||
@ccclass
|
||||
export class UpdateTips extends cc.Component {
|
||||
public static prefabPath = 'prefabs/tips/pb_update';
|
||||
|
||||
init(data: any) {
|
||||
// throw new Error('Method not implemented.');
|
||||
}
|
||||
|
||||
openUrlinNative(url) {
|
||||
if (cc.sys.os == cc.sys.OS_ANDROID) {
|
||||
jsb.reflection.callStaticMethod(
|
||||
'org/cocos2dx/javascript/AppActivity',
|
||||
'openSocialUrl',
|
||||
'(Ljava/lang/String;)V',
|
||||
url
|
||||
);
|
||||
} else if (cc.sys.os == cc.sys.OS_IOS) {
|
||||
jsb.reflection.callStaticMethod(
|
||||
'AppController',
|
||||
'openSocialUrl:',
|
||||
url
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
onClickOK() {
|
||||
this.openUrlinNative('https://www.cebg.games/release/cebg.apk');
|
||||
}
|
||||
}
|
9
assets/scripts/tips/UpdateTips.ts.meta
Normal file
9
assets/scripts/tips/UpdateTips.ts.meta
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.0.5",
|
||||
"uuid": "7b85fcd8-cfb0-4bb7-a79a-e10acbae185a",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
@ -30,13 +30,13 @@
|
||||
"group-list": [
|
||||
"default"
|
||||
],
|
||||
"last-module-event-record-time": 1653628500757,
|
||||
"last-module-event-record-time": 1654744899243,
|
||||
"simulator-orientation": false,
|
||||
"simulator-resolution": {
|
||||
"height": 640,
|
||||
"width": 960
|
||||
},
|
||||
"start-scene": "current",
|
||||
"use-customize-simulator": true,
|
||||
"use-project-simulator-setting": false,
|
||||
"start-scene": "current"
|
||||
"use-project-simulator-setting": false
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user