From d48ca7ec83f065cb30ac05729f2ee5591f7efd12 Mon Sep 17 00:00:00 2001 From: zhaojs <349234519@qq.com> Date: 星期二, 13 六月 2023 11:43:42 +0800 Subject: [PATCH] no message --- uniapp/pages/login/wxlogin.vue | 22 +++++++++++++++++++--- 1 files changed, 19 insertions(+), 3 deletions(-) diff --git a/uniapp/pages/login/wxlogin.vue b/uniapp/pages/login/wxlogin.vue index 279d282..65fd4fb 100644 --- a/uniapp/pages/login/wxlogin.vue +++ b/uniapp/pages/login/wxlogin.vue @@ -47,7 +47,8 @@ isread: false, haswxlogin: false, isSupportMob:false, - isother:false + isother:false, + clientid:'' } }, onLoad() { @@ -96,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) @@ -105,6 +107,8 @@ univerifyManager.close(); }).catch(err=>{ // 澶勭悊閿欒 + console.log(err) + that.isother=true; that.$alert('鑾峰彇鎵嬫満鍙风爜澶辫触锛岃浣跨敤鍏朵粬鏂瑰紡鐧诲綍') setTimeout(function(){ univerifyManager.close(); @@ -115,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', @@ -186,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', @@ -197,7 +212,8 @@ success: (loginRes) => { that.$u.api.wxapplogin({ openid: loginRes.authResult.openid, - access_token: loginRes.authResult.access_token + access_token: loginRes.authResult.access_token, + push_cid:that.clientid }).then(e => { if (e.code != 0) return that.$alert(e.msg) var res = e.data; -- Gitblit v1.9.3