From 8251815210fbcbd95033b095d7018b181ee1de8e Mon Sep 17 00:00:00 2001 From: zhaojs <349234519@qq.com> Date: 星期五, 09 六月 2023 09:11:36 +0800 Subject: [PATCH] Merge branch 'feature/v1.1.2版本迭代' into develop --- uniapp/App.vue | 31 ++++++++++++++++++++++++++++++- 1 files changed, 30 insertions(+), 1 deletions(-) diff --git a/uniapp/App.vue b/uniapp/App.vue index 5853e98..28c9a50 100644 --- a/uniapp/App.vue +++ b/uniapp/App.vue @@ -136,6 +136,8 @@ canlisten: true, appinfo: {}, ifwt: 0, + hasinit:false, + hasbcinit:false, }, onShow: function() { @@ -148,7 +150,15 @@ content: '妫�娴嬪埌缃戠粶鏉冮檺鍙兘璁剧疆涓哄叧闂紝鎮ㄥ彲浠ュ湪鈥滆缃�濅腑妫�鏌ユ棤绾挎暟鎹強铚傜獫绉诲姩缃戠粶' }) }else{ - that.getAppInfo(); + console.log("鏄惁璇锋眰杩囷細"+that.globalData.hasinit) + if(!that.globalData.hasinit) + { + that.getAppInfo(); + } + if(!that.globalData.hasbcinit) + { + that.bcInit(); + } /* let appInfo = utils.getCacheSync('appInfo') if(appInfo == "" || appInfo == undefined){ console.log("鑾峰彇鏂规硶") @@ -172,11 +182,29 @@ onHide: function() {}, methods: { ...mapMutations(['login']), + bcInit:function() + { + var that = this; + console.log(uni.getSystemInfoSync().platform); + if (uni.getSystemInfoSync().platform == 'ios') + { + const plug = uni.requireNativePlugin('xiguazhu-baichuan'); + console.log(plug) + plug.init({}, result => { + console.log(result); // code绛変簬0灏辨槸鍒濆鍖栨垚鍔� + if(result.code==0) + { + that.globalData.hasbcinit=true; + } + }); + } + }, getAppInfo: function() { var that = this; this.$u.api.comminInt({}).then(e => { console.log(e) if (e.code != 0) return that.$alert(e.msg) + that.globalData.hasinit=true; that.globalData.appinfo = e.data.basic utils.setCache('appInfo', e.data.basic) utils.setCache('baseUrl', this.$u.http.config.baseUrl) @@ -210,6 +238,7 @@ }).catch(function(err) {}) }, + watch:function(method,istr){ var obj=this.globalData console.log(obj) -- Gitblit v1.9.3