From 8dac12381494fc5036fb39e6101753f4b62fd3f2 Mon Sep 17 00:00:00 2001 From: zhaojs <349234519@qq.com> Date: 星期三, 21 六月 2023 09:36:05 +0800 Subject: [PATCH] no message --- uniapp/App.vue | 19 +++++++++++++++---- 1 files changed, 15 insertions(+), 4 deletions(-) diff --git a/uniapp/App.vue b/uniapp/App.vue index 28c9a50..f276460 100644 --- a/uniapp/App.vue +++ b/uniapp/App.vue @@ -82,7 +82,8 @@ }); */ APPUpdate(); // #endif - this.getAppInfo() + this.getAppInfo(); + //this.that.bcInit(); let userInfo = uni.getStorageSync('userInfo') if (userInfo.id) { this.login(userInfo) @@ -138,6 +139,7 @@ ifwt: 0, hasinit:false, hasbcinit:false, + isLaunch:false }, onShow: function() { @@ -157,6 +159,7 @@ } if(!that.globalData.hasbcinit) { + console.log("鍒濆鍖栫櫨宸濇彃浠�") that.bcInit(); } /* let appInfo = utils.getCacheSync('appInfo') @@ -191,6 +194,7 @@ const plug = uni.requireNativePlugin('xiguazhu-baichuan'); console.log(plug) plug.init({}, result => { + //console.log('1111111111111111111'); console.log(result); // code绛変簬0灏辨槸鍒濆鍖栨垚鍔� if(result.code==0) { @@ -198,13 +202,20 @@ } }); } + else{ + that.globalData.hasbcinit=true; + } }, getAppInfo: function() { var that = this; + that.globalData.hasinit=true; this.$u.api.comminInt({}).then(e => { console.log(e) - if (e.code != 0) return that.$alert(e.msg) - that.globalData.hasinit=true; + if (e.code != 0) + { + that.globalData.hasinit=false; + return that.$alert(e.msg) + } that.globalData.appinfo = e.data.basic utils.setCache('appInfo', e.data.basic) utils.setCache('baseUrl', this.$u.http.config.baseUrl) @@ -235,7 +246,7 @@ } } // #endif - }).catch(function(err) {}) + }).catch(function(err) {that.globalData.hasinit=false;}) }, -- Gitblit v1.9.3