From 02e9a944bf709ccfb9e46c163cf56e38452ca464 Mon Sep 17 00:00:00 2001
From: zhaojs <349234519@qq.com>
Date: 星期六, 10 六月 2023 13:56:37 +0800
Subject: [PATCH] Merge tag '1.1.2发布' into develop

---
 uniapp/App.vue |   90 ++++++++++++++++++++++++++++-----------------
 1 files changed, 56 insertions(+), 34 deletions(-)

diff --git a/uniapp/App.vue b/uniapp/App.vue
index 360af37..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)
@@ -135,7 +136,10 @@
 			userInfo: {},
 			canlisten: true,
 			appinfo: {},
-			ifwt: 0
+			ifwt: 0,
+			hasinit:false,
+			hasbcinit:false,
+			
 		},
 		onShow: function() {
 			var that = this;
@@ -147,10 +151,20 @@
 							content: '妫�娴嬪埌缃戠粶鏉冮檺鍙兘璁剧疆涓哄叧闂紝鎮ㄥ彲浠ュ湪鈥滆缃�濅腑妫�鏌ユ棤绾挎暟鎹強铚傜獫绉诲姩缃戠粶'
 						})
 					}else{
-						let appInfo = utils.getCacheSync('appInfo')
-						if(appInfo == "" || appInfo == undefined){
+						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("鑾峰彇鏂规硶")
+							that.getAppInfo();
+						} */
 					}
 				}
 			})
@@ -169,43 +183,35 @@
 		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;
-				// #ifdef APP-PLUS
-				if (plus.os.name == 'iOS') {
-					if (that.globalData.appinfo.iosExamine && plus.runtime.version == e.data.basic.IosExamineV) {
-						that.globalData.ifwt = 0
-					} else {
-						if (plus.runtime.isApplicationExist({
-								action: 'weixin://'
-							}) && plus.runtime.isApplicationExist({
-								action: 'taobao://'
-							})) {
-							that.globalData.ifwt = 1 //鏄惁瀹夎寰俊鍜屾窐瀹� 1浠h〃瀹夎
-						} else {
-							that.globalData.ifwt = 0
-						}
-					}
-				} else {
-					if (plus.runtime.isApplicationExist({pname:'com.tencent.mm',
-							action: 'weixin://'
-						})) {
-							console.log("瀹夊崜绔凡瀹夎寰俊")
-						that.globalData.ifwt = 1 //鏄惁瀹夎寰俊 1浠h〃瀹夎
-					} else {
-						console.log("瀹夊崜绔湭瀹夎寰俊")
-						that.globalData.ifwt = 0
-					}
-				}
-				// #endif
-				
 				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)
 					// #ifdef APP-PLUS
-					/* if (plus.os.name == 'iOS') {
+					 if (plus.os.name == 'iOS') {
 						if (that.globalData.appinfo.iosExamine && plus.runtime.version == e.data.basic.IosExamineV) {
 							that.globalData.ifwt = 0
 						} else {
@@ -229,11 +235,27 @@
 							console.log("瀹夊崜绔湭瀹夎寰俊")
 							that.globalData.ifwt = 0
 						}
-					} */
+					}
 					// #endif
 				}).catch(function(err) {})
 				
 			},
+			
+			 watch:function(method,istr){
+			                var obj=this.globalData
+			                console.log(obj)
+			                Object.defineProperty(obj,istr,{
+			                configurable:true,
+			                enumerable:true,
+			                set:function(value){
+			                    this._consumerGoodsStatus=value
+			                    method(value)
+			                },
+			                get:function(value){
+			                            return this._consumerGoodsStatus
+			                        }
+			                    })
+			                },
 		},
 	}
 </script>

--
Gitblit v1.9.3