From 47171769ba8a7e953c870ac6b5bf24efb6a5e440 Mon Sep 17 00:00:00 2001 From: zhaojs <349234519@qq.com> Date: 星期三, 14 六月 2023 14:41:40 +0800 Subject: [PATCH] no message --- uniapp/pages/login/wxlogin.vue | 34 ++++++++++++++++++++++++++++------ 1 files changed, 28 insertions(+), 6 deletions(-) diff --git a/uniapp/pages/login/wxlogin.vue b/uniapp/pages/login/wxlogin.vue index 912d100..a4bd08a 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); -- Gitblit v1.9.3