From 55803b1a7b478aade9b6e59ca6675777375e2a92 Mon Sep 17 00:00:00 2001
From: zhaojs <349234519@qq.com>
Date: 星期五, 07 七月 2023 15:48:24 +0800
Subject: [PATCH] no message

---
 uniapp/App.vue |   29 ++++++++++++++++++++---------
 1 files changed, 20 insertions(+), 9 deletions(-)

diff --git a/uniapp/App.vue b/uniapp/App.vue
index 28c9a50..5cb1d20 100644
--- a/uniapp/App.vue
+++ b/uniapp/App.vue
@@ -13,7 +13,8 @@
 		onLaunch: function() {
 			// #ifdef APP-PLUS
 			//鎺ㄩ�佸紑濮�
-			/* var info = plus.push.getClientInfo()
+			var info = plus.push.getClientInfo()
+			console.log(info);
 			// 鑾峰彇褰撳墠璁惧鐨勫鎴风id,浼犵粰鍚庡彴,瀹炵幇鎸囧畾鐢ㄦ埛
 			info && uni.setStorageSync('clientInfo', info)
 			// 浣跨敤5+App鐨勬柟寮忚繘琛岀洃鍚秷鎭帹閫�
@@ -64,7 +65,8 @@
 					if (msg.type == "receive") {
 						//鍒涘缓鏈湴娑堟伅,鍙戦�佺殑鏈湴娑堟伅涔熶細琚玶eceive鏂规硶鎺ユ敹鍒帮紝浣嗘病鏈塼ype灞炴�э紝涓攁ps鏄痭ull  
 						plus.push.createMessage(msg.content, JSON.stringify(msg), {
-							title: messageTitle
+							title: messageTitle,
+							//icon:'/static/images/app/pushlogo.png'
 						});
 					}
 				} else { // Android
@@ -79,10 +81,11 @@
 			//娑堟伅鎺ㄩ�佺粨鏉�
 			plus.push.addEventListener('click', res => {
 				console.log(res);
-			}); */
+			});
 			APPUpdate();
 			// #endif
-			this.getAppInfo()
+			this.getAppInfo();
+			//this.that.bcInit();
 			let userInfo = uni.getStorageSync('userInfo')
 			if (userInfo.id) {
 				this.login(userInfo)
@@ -138,6 +141,7 @@
 			ifwt: 0,
 			hasinit:false,
 			hasbcinit:false,
+			isLaunch:false
 			
 		},
 		onShow: function() {
@@ -157,6 +161,7 @@
 						}
 						if(!that.globalData.hasbcinit)
 						{
+							console.log("鍒濆鍖栫櫨宸濇彃浠�")
 							that.bcInit();
 						}
 						/* let appInfo = utils.getCacheSync('appInfo')
@@ -172,7 +177,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()
 			}
@@ -191,6 +195,7 @@
 					const plug = uni.requireNativePlugin('xiguazhu-baichuan');
 					console.log(plug)
 					plug.init({}, result => {
+						//console.log('1111111111111111111');
 						console.log(result);	// code绛変簬0灏辨槸鍒濆鍖栨垚鍔�
 						if(result.code==0)
 						{
@@ -198,13 +203,19 @@
 						}
 					});
 				}
+				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)
@@ -235,7 +246,7 @@
 						}
 					}
 					// #endif
-				}).catch(function(err) {})
+				}).catch(function(err) {that.globalData.hasinit=false;})
 				
 			},
 			

--
Gitblit v1.9.3