无微信不能登录限制

This commit is contained in:
1154079537 2024-05-21 16:29:01 +08:00
parent 1669b9be74
commit 728f3c0611
2 changed files with 26 additions and 7 deletions

View File

@ -187,7 +187,7 @@
mounted() { mounted() {
this.getArticleList(); this.getArticleList();
uni.$on('scroll', res => { uni.$on('scroll', res => {
if (res.scrollTop > this.tabsTop) { if (res && res.scrollTop > this.tabsTop) {
this.isShow = false; this.isShow = false;
} else { } else {
this.isShow = true; this.isShow = true;

View File

@ -8,6 +8,7 @@
<image src="@/static/images/logo1.png" /> <image src="@/static/images/logo1.png" />
</view> </view>
</view> </view>
<view class="" style="margin-top: 10rpx;" v-if='formItem==2'> <view class="" style="margin-top: 10rpx;" v-if='formItem==2'>
<view style="text-align: center;font-size: 36rpx;color: #20B128;font-weight: 700;"> <view style="text-align: center;font-size: 36rpx;color: #20B128;font-weight: 700;">
重置密码 重置密码
@ -16,6 +17,7 @@
请输入手机号码和验证码找回密码重置 请输入手机号码和验证码找回密码重置
</view> </view>
</view> </view>
<view class="whiteBg" v-if="formItem == 0"> <view class="whiteBg" v-if="formItem == 0">
<view class="logon" style="display: flex;align-items: center;justify-content: center;" <view class="logon" style="display: flex;align-items: center;justify-content: center;"
@click="wxLogin"> @click="wxLogin">
@ -31,6 +33,7 @@
</checkbox-group> </checkbox-group>
</view> </view>
</view> </view>
<view class="whiteBg" v-else-if="formItem === 1"> <view class="whiteBg" v-else-if="formItem === 1">
<view class="title acea-row row-center-wrapper"> <view class="title acea-row row-center-wrapper">
<view class="item" :class="current === index ? 'on' : ''" v-for="(item, index) in navList" <view class="item" :class="current === index ? 'on' : ''" v-for="(item, index) in navList"
@ -165,7 +168,7 @@
</checkbox-group> </checkbox-group>
</view> </view>
</view> </view>
<view class="footer-btn" v-if="formItem==2"> <view class="footer-btn" v-if="formItem==2 && isInstallWx">
<view class="login-type-btn" :class="{actLoginType:formItem==0}" style="margin-right: 70rpx;"> <view class="login-type-btn" :class="{actLoginType:formItem==0}" style="margin-right: 70rpx;">
<text v-if='formItem == 1||formItem==2' @click="formItem = 0">微信快捷登录</text> <text v-if='formItem == 1||formItem==2' @click="formItem = 0">微信快捷登录</text>
<text v-else @click="appOneClcik">本机一键登录</text> <text v-else @click="appOneClcik">本机一键登录</text>
@ -188,7 +191,7 @@
</view> </view>
<!-- #ifdef APP-PLUS --> <!-- #ifdef APP-PLUS -->
<view class="footer-btns" v-if="formItem !=2"> <view class="footer-btns" v-if="formItem !=2 && isInstallWx">
<view class="login-type-btn" :class="{actLoginType:formItem==0}" style="margin-right: 70rpx;"> <view class="login-type-btn" :class="{actLoginType:formItem==0}" style="margin-right: 70rpx;">
<text v-if='formItem == 1||formItem==2' @click="formItem = 0">微信快捷登录</text> <text v-if='formItem == 1||formItem==2' @click="formItem = 0">微信快捷登录</text>
<text v-else @click="appOneClcik">本机一键登录</text> <text v-else @click="appOneClcik">本机一键登录</text>
@ -240,6 +243,7 @@
</form> </form>
<Verify @success="success" :captchaType="'blockPuzzle'" :imgSize="{ width: '330px', height: '155px' }" <Verify @success="success" :captchaType="'blockPuzzle'" :imgSize="{ width: '330px', height: '155px' }"
ref="verify"></Verify> ref="verify"></Verify>
<!-- tips弹窗 --> <!-- tips弹窗 -->
<u-overlay :show="showTips"> <u-overlay :show="showTips">
<view class="tips"> <view class="tips">
@ -286,8 +290,6 @@
</view> </view>
</u-overlay> </u-overlay>
<!-- tips结束 --> <!-- tips结束 -->
</view> </view>
</template> </template>
<script> <script>
@ -405,7 +407,8 @@
keyLock: true, keyLock: true,
auth_token: '', auth_token: '',
codeVal: '', codeVal: '',
copyright: {} copyright: {},
isInstallWx: true
}; };
}, },
computed: configMap(['login_logo'], mapGetters(['viewColor'])), computed: configMap(['login_logo'], mapGetters(['viewColor'])),
@ -431,9 +434,25 @@
}); });
this.getVersion(); this.getVersion();
}, },
mounted: function() {
onShow() {
// #ifdef APP
//
if (plus.runtime.isApplicationExist({
pname: 'com.tencent.mm',
action: 'weixin://'
})) {
//
this.isInstallWx = true;
this.formItem = 0;
} else {
//
this.isInstallWx = false;
this.formItem = 1;
}
// #endif
}, },
onReady() { onReady() {
let that = this let that = this
// #ifdef MP // #ifdef MP