|
@@ -192,7 +192,6 @@ cc.Class({
|
|
|
if(CC_WECHATGAME) {
|
|
|
this._startWxLogin();
|
|
|
} else if (CC_QQPLAY) {
|
|
|
- BK.Script.log('游戏开始登录');
|
|
|
QQPlayer.qqLogin((isError) => {
|
|
|
if (isError) {
|
|
|
this._getDataFail();
|
|
@@ -277,13 +276,17 @@ cc.Class({
|
|
|
|
|
|
_getUserInfoAndStartGame() {
|
|
|
if (GameGlobal.user == undefined || GameGlobal.user.uid == undefined) {
|
|
|
- weChat.login((isError) => {
|
|
|
- if (isError) {
|
|
|
- this._getDataFail();
|
|
|
- } else {
|
|
|
- this._getUserInfoAndStartGame();
|
|
|
- }
|
|
|
- });
|
|
|
+ if (CC_QQPLAY) {
|
|
|
+ this.startLogin();
|
|
|
+ } else if (CC_WECHATGAME) {
|
|
|
+ weChat.login((isError) => {
|
|
|
+ if (isError) {
|
|
|
+ this._getDataFail();
|
|
|
+ } else {
|
|
|
+ this._getUserInfoAndStartGame();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -371,9 +374,8 @@ cc.Class({
|
|
|
},
|
|
|
|
|
|
restartGame() {
|
|
|
- this.startLogin();
|
|
|
this.restartButton.interactable = false;
|
|
|
- // this._getUserInfoAndStartGame();
|
|
|
+ this._getUserInfoAndStartGame();
|
|
|
},
|
|
|
|
|
|
getUserBuildings() {
|