From ba3d748f9eb65a66fca9bd74fc7796b90a0a70ae Mon Sep 17 00:00:00 2001
From: zhaojs <349234519@qq.com>
Date: 星期五, 30 六月 2023 09:06:15 +0800
Subject: [PATCH] Merge branch 'release/v1.1.3发布'

---
 uniapp/App.vue |   45 ++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 38 insertions(+), 7 deletions(-)

diff --git a/uniapp/App.vue b/uniapp/App.vue
index ad3c38f..0838844 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)
@@ -137,6 +138,8 @@
 			appinfo: {},
 			ifwt: 0,
 			hasinit:false,
+			hasbcinit:false,
+			isLaunch:false
 			
 		},
 		onShow: function() {
@@ -154,7 +157,11 @@
 						{
 							that.getAppInfo();
 						}
-						
+						if(!that.globalData.hasbcinit)
+						{
+							console.log("鍒濆鍖栫櫨宸濇彃浠�")
+							that.bcInit();
+						}
 						/* let appInfo = utils.getCacheSync('appInfo')
 						if(appInfo == "" || appInfo == undefined){
 							console.log("鑾峰彇鏂规硶")
@@ -168,7 +175,6 @@
 				var route = routes[routes.length - 1].route
 			}
 			// #ifdef APP-PLUS
-			console.log(this.globalData.canlisten)
 			if (this.globalData.canlisten && route != 'pages/mine/tools/turnChain') {
 				getClipboard()
 			}
@@ -178,12 +184,36 @@
 		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('1111111111111111111');
+						console.log(result);	// code绛変簬0灏辨槸鍒濆鍖栨垚鍔�
+						if(result.code==0)
+						{
+							that.globalData.hasbcinit=true;
+						}
+					});
+				}
+				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)
@@ -214,9 +244,10 @@
 						}
 					}
 					// #endif
-				}).catch(function(err) {})
+				}).catch(function(err) {that.globalData.hasinit=false;})
 				
 			},
+			
 			 watch:function(method,istr){
 			                var obj=this.globalData
 			                console.log(obj)

--
Gitblit v1.9.3