From 69ea24e8fdfb41fc48c3fdb8c444645c13b1bbc4 Mon Sep 17 00:00:00 2001
From: zhaojs <349234519@qq.com>
Date: 星期六, 10 六月 2023 13:56:17 +0800
Subject: [PATCH] Merge branch 'release/1.1.2发布'

---
 uniapp/App.vue |   28 ++++++++++++++++++++++++++--
 1 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/uniapp/App.vue b/uniapp/App.vue
index ad3c38f..2940aa8 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,7 @@
 			appinfo: {},
 			ifwt: 0,
 			hasinit:false,
+			hasbcinit:false,
 			
 		},
 		onShow: function() {
@@ -154,7 +156,10 @@
 						{
 							that.getAppInfo();
 						}
-						
+						if(!that.globalData.hasbcinit)
+						{
+							that.bcInit();
+						}
 						/* let appInfo = utils.getCacheSync('appInfo')
 						if(appInfo == "" || appInfo == undefined){
 							console.log("鑾峰彇鏂规硶")
@@ -178,6 +183,24 @@
 		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;
+						}
+					});
+				}
+			},
 			getAppInfo: function() {
 				var that = this;
 				this.$u.api.comminInt({}).then(e => {
@@ -217,6 +240,7 @@
 				}).catch(function(err) {})
 				
 			},
+			
 			 watch:function(method,istr){
 			                var obj=this.globalData
 			                console.log(obj)

--
Gitblit v1.9.3