From fc9bd6378d3bfbde6d5c71535757a3d44de8d8ff Mon Sep 17 00:00:00 2001 From: zhaojs <349234519@qq.com> Date: 星期四, 20 七月 2023 15:18:06 +0800 Subject: [PATCH] Merge branch 'feature/1.1.4开发' into develop --- uniapp/pages/login/wxlogin.vue | 60 +++++++++++++++++++++++++++++++++++++++++++++++------------- 1 files changed, 47 insertions(+), 13 deletions(-) diff --git a/uniapp/pages/login/wxlogin.vue b/uniapp/pages/login/wxlogin.vue index 71207f4..092e5d0 100644 --- a/uniapp/pages/login/wxlogin.vue +++ b/uniapp/pages/login/wxlogin.vue @@ -4,7 +4,7 @@ <view class="pageContent borderBox colCen"> <image class="applogo" :src="appInfo.logo" mode="aspectFill"></image> - <view class="wxlogoBtn rowCenCen" @tap="wxlogin()" v-if="haswxlogin"> + <view class="wxlogoBtn rowCenCen" @tap="wxlogin()" v-if="supportWx"> <image class="logoIcon" src="../../static/images/mine/wxwhite.png" mode=""></image> <view>寰俊涓�閿櫥褰�</view> </view> @@ -47,19 +47,41 @@ isread: false, haswxlogin: false, isSupportMob:false, - isother:false + isother:false, + supportWx:true } }, onLoad() { this.appInfo = uni.getStorageSync('appInfo') - 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.checkSupportWx(); this.isSupportMoblie(); }, methods: { ...mapMutations(['login']), + checkSupportWx() + { + // #ifdef APP-PLUS + if (plus.os.name == 'iOS') { + if (plus.runtime.isApplicationExist({ + action: 'weixin://' + }) && plus.runtime.isApplicationExist({ + action: 'taobao://' + })) { + this.supportWx = true //鏄惁瀹夎寰俊鍜屾窐瀹� 1浠h〃瀹夎 + } else { + this.supportWx = false + } + } else { + if (plus.runtime.isApplicationExist({pname:'com.tencent.mm', + action: 'weixin://' + })) { + this.supportWx = true //鏄惁瀹夎寰俊 1浠h〃瀹夎 + } else { + this.supportWx = false + } + } + // #endif + }, backHome() { var pages = getCurrentPages(); console.log(pages.length); @@ -86,18 +108,25 @@ // 涓嶆樉绀轰竴閿櫥褰曢�夐」锛堟垨缃伆锛� // 鏍规嵁閿欒淇℃伅鍒ゆ柇澶辫触鍘熷洜锛屽鏈夐渶瑕佸彲灏嗛敊璇彁浜ょ粰缁熻鏈嶅姟鍣� console.log(res) - console.log(res.errMsg) } }) }, doMobileLogin(mobRes) { + //浠庣紦瀛樿幏鍙朿id + let clientInfo = uni.getStorageSync('clientInfo'); + let pushCid=''; + if(clientInfo&&clientInfo.clientid) + { + pushCid=clientInfo.clientid + } var that=this; uniCloud.callFunction({ name: 'getPhoneNumber', // 浣犵殑浜戝嚱鏁板悕绉� data: { 'access_token': mobRes.access_token, // 瀹㈡埛绔竴閿櫥褰曟帴鍙h繑鍥炵殑access_token - 'openid': mobRes.openid // 瀹㈡埛绔竴閿櫥褰曟帴鍙h繑鍥炵殑openid + 'openid': mobRes.openid, // 瀹㈡埛绔竴閿櫥褰曟帴鍙h繑鍥炵殑openid + 'pushCid':pushCid//app鎺ㄩ�乧id } }).then(res => { console.log(res) @@ -107,10 +136,8 @@ }).catch(err=>{ // 澶勭悊閿欒 console.log(err) - uni.hideLoading(); - + that.isother=true; that.$alert('鑾峰彇鎵嬫満鍙风爜澶辫触锛岃浣跨敤鍏朵粬鏂瑰紡鐧诲綍') - setTimeout(function(){ univerifyManager.close(); },2000); @@ -129,6 +156,9 @@ { "normalColor":"#F73314", "highlightColor":"#F73314" + }, + "privacyTerms":{ + "defaultCheckBoxState":false } }, @@ -141,6 +171,7 @@ if(res.errCode==30002) {//鍒囨崲鐧诲綍鏂瑰紡 that.isother=true; + univerifyManager.close(); } else { @@ -149,6 +180,7 @@ univerifyManager.close(); },2000); } + that.isother=true; } }) @@ -178,11 +210,13 @@ url: './setInviteCode' }) } - else if (e.data.userinfo.isPwd == 'N') { + /* else if (e.data.userinfo.isPwd == 'N') { uni.redirectTo({ url: './setPass' }) - } else { + } */ else { + //鏇存柊pushcid + getApp().updatePushCid(); uni.switchTab({ url: '../index/index' }) -- Gitblit v1.9.3