From 338b2fd1c682864ddc6e3372887a38c1820c1805 Mon Sep 17 00:00:00 2001
From: zhaojs <349234519@qq.com>
Date: 星期二, 27 六月 2023 13:57:54 +0800
Subject: [PATCH] no message

---
 uniapp/pages/login/wxlogin.vue |   28 ++++++++++++++++++++--------
 1 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/uniapp/pages/login/wxlogin.vue b/uniapp/pages/login/wxlogin.vue
index 71207f4..5b2d4f4 100644
--- a/uniapp/pages/login/wxlogin.vue
+++ b/uniapp/pages/login/wxlogin.vue
@@ -47,13 +47,14 @@
 				isread: false,
 				haswxlogin: false,
 				isSupportMob:false,
-				isother:false
+				isother:false,
+				clientid:''
 			}
 		},
 		onLoad() {
 			this.appInfo = uni.getStorageSync('appInfo')
-			console.log(this.appInfo.iosExamine)
-			console.log(getApp().globalData.ifwt)
+			//console.log(this.appInfo.iosExamine)
+			//console.log(getApp().globalData.ifwt)
 			//this.haswxlogin = this.appInfo.iosExamine ? false : (getApp().globalData.ifwt == 1 ? true : false)
 			this.haswxlogin = getApp().globalData.ifwt == 1 ? true :false;
 			this.isSupportMoblie();
@@ -86,7 +87,6 @@
 						// 涓嶆樉绀轰竴閿櫥褰曢�夐」锛堟垨缃伆锛�
 				    // 鏍规嵁閿欒淇℃伅鍒ゆ柇澶辫触鍘熷洜锛屽鏈夐渶瑕佸彲灏嗛敊璇彁浜ょ粰缁熻鏈嶅姟鍣�
 						console.log(res)
-						console.log(res.errMsg)
 					}
 				})
 			},
@@ -97,7 +97,8 @@
 				  name: 'getPhoneNumber', // 浣犵殑浜戝嚱鏁板悕绉�
 				  data: {
 				    'access_token': mobRes.access_token, // 瀹㈡埛绔竴閿櫥褰曟帴鍙h繑鍥炵殑access_token
-				    'openid': mobRes.openid // 瀹㈡埛绔竴閿櫥褰曟帴鍙h繑鍥炵殑openid
+				    'openid': mobRes.openid ,// 瀹㈡埛绔竴閿櫥褰曟帴鍙h繑鍥炵殑openid
+					'push_cid':that.clientid//瀹㈡埛绔帹閫佺殑cid
 				  }
 				}).then(res => {
 					console.log(res)
@@ -107,10 +108,8 @@
 				}).catch(err=>{
 					// 澶勭悊閿欒
 					console.log(err)
-					uni.hideLoading();
-					
+					that.isother=true;
 					that.$alert('鑾峰彇鎵嬫満鍙风爜澶辫触锛岃浣跨敤鍏朵粬鏂瑰紡鐧诲綍')
-					
 					setTimeout(function(){
 						univerifyManager.close();
 					},2000);
@@ -120,6 +119,12 @@
 			mobileLogin()
 			{
 				var that=this;
+				// #ifdef APP-PLUS
+				    plus.push.getClientInfoAsync((info) => {
+				         that.clientid = info["clientid"];
+				    });
+				// #endif
+				
 				if (this.isread) {
 					univerifyManager.login({
 						provider: 'univerify',
@@ -191,6 +196,11 @@
 			},
 			wxlogin() {
 				var that = this;
+				// #ifdef APP-PLUS
+				    plus.push.getClientInfoAsync((info) => {
+				         that.clientid = info["clientid"];
+				    });
+				// #endif
 				if (this.isread) {
 					uni.getProvider({
 						service: 'oauth',
@@ -200,10 +210,12 @@
 								uni.login({
 									provider: 'weixin',
 									success: (loginRes) => {
+										console.log(loginRes);
 										that.$u.api.wxapplogin({
 											openid: loginRes.authResult.openid,
 											access_token: loginRes.authResult.access_token
 										}).then(e => {
+											console.log(e);
 											if (e.code != 0) return that.$alert(e.msg)
 											var res = e.data;
 											if(res.type == 'goUser'){

--
Gitblit v1.9.3