|
|
@ -2,7 +2,7 @@
|
|
|
|
* @Author: ch
|
|
|
|
* @Author: ch
|
|
|
|
* @Date: 2022-03-22 15:36:46
|
|
|
|
* @Date: 2022-03-22 15:36:46
|
|
|
|
* @LastEditors: ch
|
|
|
|
* @LastEditors: ch
|
|
|
|
* @LastEditTime: 2022-04-15 18:45:28
|
|
|
|
* @LastEditTime: 2022-04-20 19:36:46
|
|
|
|
* @Description: file content
|
|
|
|
* @Description: file content
|
|
|
|
-->
|
|
|
|
-->
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
@ -13,7 +13,7 @@
|
|
|
|
<view class="logo">马士兵严选</view>
|
|
|
|
<view class="logo">马士兵严选</view>
|
|
|
|
<u--form class="login">
|
|
|
|
<u--form class="login">
|
|
|
|
<u-form-item>
|
|
|
|
<u-form-item>
|
|
|
|
<input placeholder="请输入手机号" v-model="phone" class="login--input" border="bottom" />
|
|
|
|
<input placeholder="请输入手机号" type="number" v-model="phone" class="login--input" border="bottom" />
|
|
|
|
</u-form-item>
|
|
|
|
</u-form-item>
|
|
|
|
<u-form-item class="login--code">
|
|
|
|
<u-form-item class="login--code">
|
|
|
|
<input placeholder="验证码" type="number" maxlength="6" class="login--input" v-model="code" border="bottom" />
|
|
|
|
<input placeholder="验证码" type="number" maxlength="6" class="login--input" v-model="code" border="bottom" />
|
|
|
@ -26,7 +26,7 @@
|
|
|
|
<UiButton class="login--btn" type="gradual" @click="login">登录</UiButton>
|
|
|
|
<UiButton class="login--btn" type="gradual" @click="login">登录</UiButton>
|
|
|
|
<label class="login--agreement">
|
|
|
|
<label class="login--agreement">
|
|
|
|
<radio class="radio" :checked="checked" @click="checked = !checked" color="#FF875B"/>
|
|
|
|
<radio class="radio" :checked="checked" @click="checked = !checked" color="#FF875B"/>
|
|
|
|
同意<text class="link">《用户协议》</text>和<text class="link">《隐私协议》</text>,首次登陆将自动注册
|
|
|
|
同意<text class="link">《用户协议》</text><text class="link">《隐私协议》</text>首次登录自动注册
|
|
|
|
</label>
|
|
|
|
</label>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
@ -42,7 +42,8 @@ export default {
|
|
|
|
sendStatus : false,
|
|
|
|
sendStatus : false,
|
|
|
|
checked: false,
|
|
|
|
checked: false,
|
|
|
|
phone : '',
|
|
|
|
phone : '',
|
|
|
|
code : ''
|
|
|
|
code : '',
|
|
|
|
|
|
|
|
loginStatus : false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
mounted(){
|
|
|
|
mounted(){
|
|
|
@ -74,6 +75,10 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
async login(){
|
|
|
|
async login(){
|
|
|
|
|
|
|
|
if(this.loginStatus){
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
this.loginStatus = true;
|
|
|
|
if(!IsPhone(this.phone)){
|
|
|
|
if(!IsPhone(this.phone)){
|
|
|
|
uni.$u.toast('请输入正确手机号');
|
|
|
|
uni.$u.toast('请输入正确手机号');
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
@ -108,7 +113,8 @@ export default {
|
|
|
|
const len = pages.length;
|
|
|
|
const len = pages.length;
|
|
|
|
const prevPage = pages[len - 2];
|
|
|
|
const prevPage = pages[len - 2];
|
|
|
|
const tabBar = ['pages/index/index','pages/goods/category'];
|
|
|
|
const tabBar = ['pages/index/index','pages/goods/category'];
|
|
|
|
console.log(prevPage);
|
|
|
|
|
|
|
|
|
|
|
|
this.loginStatus = false;
|
|
|
|
if(len > 1){
|
|
|
|
if(len > 1){
|
|
|
|
// 不知道为什么有时候页面返回会有问题,初步判断tabBar页面的问题,tabBar来的直接重定向过去,不返回
|
|
|
|
// 不知道为什么有时候页面返回会有问题,初步判断tabBar页面的问题,tabBar来的直接重定向过去,不返回
|
|
|
|
if(tabBar.includes(prevPage.route)){
|
|
|
|
if(tabBar.includes(prevPage.route)){
|
|
|
|