alls
This commit is contained in:
+56
-7
@@ -17,7 +17,7 @@
|
||||
</view>
|
||||
<view class="login_code" v-if="l_type==2">
|
||||
<image src="../static/img/login/yzicon.png" mode="widthFix" class="icons"></image>
|
||||
<input class="linput2" v-model="formData.code" type="text" placeholder="请输入短验证码" maxlength="8" placeholder-class="placeholder-class" />
|
||||
<input class="linput2" v-model="formData.code" type="text" placeholder="请输入短信验证码" maxlength="8" placeholder-class="placeholder-class" />
|
||||
<view class="dynacode" @click="sendMobileCode">{{dynacodeData.codeText }}</view>
|
||||
</view>
|
||||
<view class="login_input" v-if="l_type==1">
|
||||
@@ -25,6 +25,14 @@
|
||||
<!-- <el-input class="minput" placeholder="请输入密码" v-model="formData.password" placeholder-class="placeholder-class" show-password></el-input> -->
|
||||
<input class="minput" v-model="formData.password" type="password" placeholder="请输入密码" placeholder-class="placeholder-class" >
|
||||
</view>
|
||||
<!-- 新增图形验证码 start -->
|
||||
<view class="login_code login_code2">
|
||||
<image src="../static/img/login/yzicon.png" mode="widthFix" class="icons"></image>
|
||||
<input class="linput" v-model="formData.captcha" type="text" placeholder="请输入图形验证码" maxlength="6" placeholder-class="placeholder-class" >
|
||||
<image :src="captcha_img" mode="widthFix" class="captcha_img" @tap="getCaptcha()"></image>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
<!-- <view class="d-b-c agreement"> -->
|
||||
<!-- <view class="login_checks" >
|
||||
@@ -77,11 +85,12 @@
|
||||
codeText: '发送验证码',
|
||||
isSend: false
|
||||
},
|
||||
captcha_img:'',
|
||||
l_type:1
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
this.getCaptcha();
|
||||
},
|
||||
watch: {
|
||||
'dynacodeData.seconds': {
|
||||
@@ -101,6 +110,18 @@
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
getCaptcha(){
|
||||
this._get('user.Login/generateCaptcha',{
|
||||
timestamp: '1784172260',
|
||||
signature: '1547f362dca32f7f7cbacb1b0c4661906b2d5e6a5bac3b322331f11d8ae7d7cd',
|
||||
},res=>{
|
||||
console.log(res,33)
|
||||
if(res.code==1){
|
||||
this.captcha_img = res.data.img;
|
||||
this.formData.captchaKey = res.data.key;
|
||||
}
|
||||
})
|
||||
},
|
||||
check(e){
|
||||
this.l_type=e;
|
||||
},
|
||||
@@ -158,7 +179,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
this._post('user.Useropen/sendCode',{
|
||||
this._post('user.Login/sendCode',{
|
||||
mobile: this.formData.mobile,
|
||||
type: 'login',
|
||||
},res=>{
|
||||
@@ -207,10 +228,19 @@
|
||||
})
|
||||
return;
|
||||
}
|
||||
this._post('user.Useropen/smslogin',{
|
||||
if(this.formData.captcha==''){
|
||||
uni.showToast({
|
||||
icon:'none',
|
||||
title: '请输入图形验证码',
|
||||
duration:1500
|
||||
})
|
||||
return;
|
||||
}
|
||||
this._post('user.Login/smslogin',{
|
||||
mobile: this.formData.mobile,
|
||||
code: this.formData.code,
|
||||
|
||||
captcha: this.formData.captcha,
|
||||
captchaKey: this.formData.captchaKey,
|
||||
},res=>{
|
||||
uni.setStorageSync('token',res.data.token)
|
||||
uni.showToast({
|
||||
@@ -260,10 +290,21 @@
|
||||
})
|
||||
return;
|
||||
}
|
||||
this._post('user.Useropen/phonelogin',{
|
||||
if(this.formData.captcha==''){
|
||||
uni.showToast({
|
||||
icon:'none',
|
||||
title: '请输入图形验证码',
|
||||
duration:1500
|
||||
})
|
||||
return;
|
||||
}
|
||||
this._post('user.Login/phonelogin',{
|
||||
mobile: this.formData.mobile,
|
||||
password: this.formData.password,
|
||||
|
||||
captcha: this.formData.captcha,
|
||||
captchaKey: this.formData.captchaKey,
|
||||
timestamp: '1784172260',
|
||||
signature: '1547f362dca32f7f7cbacb1b0c4661906b2d5e6a5bac3b322331f11d8ae7d7cd',
|
||||
},res=>{
|
||||
uni.setStorageSync('token',res.data.token)
|
||||
uni.showToast({
|
||||
@@ -461,4 +502,12 @@
|
||||
color: #FF8622;
|
||||
border-bottom: 2px solid #FF8622;
|
||||
}
|
||||
.login_code2{
|
||||
justify-content: space-between;
|
||||
}
|
||||
.captcha_img{
|
||||
width: 115px !important;
|
||||
height: 54px !important;
|
||||
float: right;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user