wx
This commit is contained in:
@@ -9,16 +9,16 @@
|
||||
<input type="text" v-model="form.account" :adjust-position="false" placeholder="请输入手机号码" maxlength="-1"
|
||||
data-key="mobile" />
|
||||
</view>
|
||||
<!-- <view class="top_box_one">
|
||||
<view class="top_box_one">
|
||||
<text class="top_box_one_text">密码</text>
|
||||
<input type="mobile" v-model="form.password" :adjust-position="false" placeholder="8-16位密码"
|
||||
<input type="mobile" v-model="form.password" :adjust-position="false" placeholder="请输入密码"
|
||||
maxlength="16" :password="!showPassword" />
|
||||
<view class="repeat" @click="display">
|
||||
<u-icon name="eye" v-if="showPassword"></u-icon>
|
||||
<u-icon v-else name="eye-off"></u-icon>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="top_box_one">
|
||||
</view>
|
||||
<!-- <view class="top_box_one">
|
||||
<text class="top_box_one_text">验证码</text>
|
||||
<input type="mobile" v-model="form.captcha" placeholder="请输入短信验证码" maxlength="6" />
|
||||
<view class="repeats">
|
||||
@@ -30,16 +30,24 @@
|
||||
{{ second }}s重新发送
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="toLogin" @click="userlogin">登录</view>
|
||||
<!-- <view class="agreement flex-start">
|
||||
<u-checkbox-group><u-checkbox shape="circle" @change="radioChange"
|
||||
<!--<view class="agreement flex-start">
|
||||
<u-checkbox-group><u-checkbox shape="circle" @change="radioChange"
|
||||
size="12"></u-checkbox></u-checkbox-group>
|
||||
<text>阅读并同意银收客</text>
|
||||
<view class="agreement-Item" @click="Privacy(1)">《用户协议》</view>
|
||||
及
|
||||
<view class="agreement-Item" @click="Privacy(2)">《隐私政策》</view>
|
||||
</view> -->
|
||||
<view class="agreement-Item" @click="Privacy(2)">《隐私政策》</view>
|
||||
</view>-->
|
||||
<view class="agreement" @click="clickpassword">
|
||||
忘记密码
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
style="margin-top:80rpx;text-align: center;color:#3088fd;position: fixed; bottom:40rpx;left: 50%;transform: translate(-50%,-50%);"
|
||||
@click="quyonghu">
|
||||
我是用户
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -76,7 +84,9 @@
|
||||
if (token.code == 1) {
|
||||
uni.cache.set('token', token.data.token);
|
||||
uni.cache.set('store_status', 1);
|
||||
uni.pro.navigateTo('index/index');
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/index?restype=' + 1
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -117,6 +127,19 @@
|
||||
// 切换图片显示隐藏
|
||||
this.showPassword = !this.showPassword;
|
||||
},
|
||||
quyonghu() {
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/index?restype=' + 2
|
||||
});
|
||||
// uni.navigateTo({
|
||||
// url: '/pages/index/index?restype=' + 2
|
||||
// })
|
||||
},
|
||||
clickpassword() {
|
||||
uni.navigateTo({
|
||||
url:'/pages/login/password'
|
||||
})
|
||||
},
|
||||
async userlogin() {
|
||||
if (this.form.account == null || this.form.account == '') {
|
||||
uni.showToast({
|
||||
@@ -125,23 +148,41 @@
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.captcha == null || this.form.captcha == '') {
|
||||
if (this.form.password == null || this.form.password == '') {
|
||||
uni.showToast({
|
||||
title: '请输入验证码',
|
||||
title: '请输入密码',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
// if (this.form.captcha == null || this.form.captcha == '') {
|
||||
// uni.showToast({
|
||||
// title: '请输入验证码',
|
||||
// icon: 'none'
|
||||
// });
|
||||
// return false;
|
||||
// }
|
||||
let res = await this.api.userlogin({
|
||||
account: this.form.account,
|
||||
captcha: this.form.captcha,
|
||||
password: this.form.password,
|
||||
open_id: uni.cache.get('open_id'),
|
||||
})
|
||||
uni.cache.set('userId', res.data.userinfo.store_id);
|
||||
uni.cache.set('logintoken', res.data.userinfo.token);
|
||||
uni.cache.set('store_status', res.data.store_status);
|
||||
uni.cache.set('userinfo', res.data.userinfo);
|
||||
uni.cache.set('Type', res.data.type);
|
||||
uni.pro.navigateTo('index/index');
|
||||
uni.cache.set('set_pwd', res.data.set_pwd);
|
||||
if (res.data.set_pwd == 1) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/repairpassword'
|
||||
})
|
||||
} else {
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/index?restype=' + 1
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -187,6 +228,7 @@
|
||||
|
||||
.repeat {
|
||||
position: absolute;
|
||||
z-index: 99;
|
||||
bottom: 26rpx;
|
||||
right: 0;
|
||||
width: 25rpx;
|
||||
@@ -234,8 +276,10 @@
|
||||
}
|
||||
|
||||
.agreement {
|
||||
text-align: right;
|
||||
width: 570rpx;
|
||||
margin-top: 14rpx;
|
||||
font-size: 20rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #7c8e97;
|
||||
|
||||
Reference in New Issue
Block a user