From 55175823d6730a2f7a552524d98b6b3eb080ec8d Mon Sep 17 00:00:00 2001
From: zhaojs <349234519@qq.com>
Date: 星期二, 06 六月 2023 15:14:46 +0800
Subject: [PATCH] no message

---
 uniapp/App.vue |   24 +++++++++++++++++++++++-
 1 files changed, 23 insertions(+), 1 deletions(-)

diff --git a/uniapp/App.vue b/uniapp/App.vue
index ad3c38f..28c9a50 100644
--- a/uniapp/App.vue
+++ b/uniapp/App.vue
@@ -137,6 +137,7 @@
 			appinfo: {},
 			ifwt: 0,
 			hasinit:false,
+			hasbcinit:false,
 			
 		},
 		onShow: function() {
@@ -154,7 +155,10 @@
 						{
 							that.getAppInfo();
 						}
-						
+						if(!that.globalData.hasbcinit)
+						{
+							that.bcInit();
+						}
 						/* let appInfo = utils.getCacheSync('appInfo')
 						if(appInfo == "" || appInfo == undefined){
 							console.log("鑾峰彇鏂规硶")
@@ -178,6 +182,23 @@
 		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 => {
@@ -217,6 +238,7 @@
 				}).catch(function(err) {})
 				
 			},
+			
 			 watch:function(method,istr){
 			                var obj=this.globalData
 			                console.log(obj)

--
Gitblit v1.9.3