You've already forked guangan-mp
修一下
This commit is contained in:
@ -1,14 +1,10 @@
|
||||
<template>
|
||||
<view class="login">
|
||||
|
||||
<view class="login-head flex-y">
|
||||
<text class="login-head-h1">登录</text>
|
||||
</view>
|
||||
|
||||
<view class="login-body flex-y">
|
||||
<view class="login-body flex-column">
|
||||
|
||||
<view class="flex-center">
|
||||
<text class="login-body-name">微信授权</text>
|
||||
<text class="login-body-name">微信授权登录</text>
|
||||
</view>
|
||||
|
||||
<view style="margin-top:80rpx;" class="flex-center">
|
||||
@ -17,14 +13,12 @@
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<!--
|
||||
<view class="login-foot">
|
||||
<view class='login-foot-agent flex-center'>
|
||||
<checkbox label="1" v-model="agent.value">同意协议</checkbox>
|
||||
<text @click="agent.show = true">《用户隐私协议》</text>
|
||||
<checkbox label="1" :value="agent.value">同意协议</checkbox>
|
||||
<text @click="showAgreement">《用户隐私协议》</text>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
@ -45,13 +39,21 @@
|
||||
},
|
||||
created() {
|
||||
const userInfo = TaCache.get('auth.user')
|
||||
if (userInfo) {
|
||||
if (userInfo && userInfo.id) {
|
||||
uni.navigateBack()
|
||||
}
|
||||
this.doLogin()
|
||||
},
|
||||
methods: {
|
||||
showAgreement() {
|
||||
wx.openPrivacyContract()
|
||||
},
|
||||
// 执行注册登录
|
||||
doLogin() {
|
||||
if (!this.agent.value) {
|
||||
TaToast.toast("请先同意协议")
|
||||
return
|
||||
}
|
||||
TaToast.loading("登录中")
|
||||
this.login().then((data) => {
|
||||
TaCache.set('auth.user', data)
|
||||
@ -98,4 +100,44 @@
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
<style>
|
||||
.login {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
.login-body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.login-body-name {
|
||||
font-size: 40rpx;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.login-foot {
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
background-color: #FFFFFF;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.login-foot-agent {
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.login-foot-agent checkbox {
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
</style>
|
Reference in New Issue
Block a user