-
![]()
+
+
+
+
+
+
+
@@ -67,12 +69,12 @@
noClick:true, //防止重复提交
// 验证码开关
captchaOnOff: true,
- codeUrl: "",
+ codeUrl: '',
formData: {
phone: '',
password: '',
- code: "",
- uuid: ""
+ code: '',
+ uuid: ''
},
rules: {
@@ -95,10 +97,12 @@
}
}]
},
- code: [{
- required: true,
- errorMessage: '请输入验证码'
- }],
+ code: {
+ rules: [{
+ required: true,
+ errorMessage: '请输入验证码'
+ }]
+ },
phone: {
rules: [{
required: true,
@@ -138,32 +142,29 @@
//获取验证码
getCode() {
getCodeImg().then(res => {
- this.captchaOnOff = res.captchaOnOff === undefined ? true : res.captchaOnOff;
+ this.captchaOnOff = res.data.captchaOnOff === undefined ? true : res.data.captchaOnOff;
if (this.captchaOnOff) {
- this.codeUrl = "data:image/gif;base64," + res.img;
- this.formData.uuid = res.uuid;
+ this.codeUrl = "data:image/gif;base64," + res.data.img;
+ this.formData.uuid = res.data.uuid;
}
});
},
login(e) {
// console.log(e)
let that = this
- // console.log('that.phoneFlag', that.phoneFlag)
- // console.log('that.passwordFlag', that.passwordFlag)
if (that.phoneFlag === true && that.passwordFlag === true) {
- // console.log('全部达成')
uni.showLoading({
title: '艺术家登录中!',
})
let pwd = md5(that.formData.password)
const param = {
phone: that.formData.phone,
- password: pwd
+ password: pwd,
+ code: that.formData.code,
+ uuid: that.formData.uuid
}
- // console.log('form', param)
login(param).then(response => {
if (response.data.code === 200) {
- // console.log('response',response)
//登录成功,设置token、艺术家信息,页面跳转到主页
uni.setStorage({
key: 'userInfo',
@@ -260,6 +261,11 @@
background: $uni-bg-base-color;
}
+ .l-code {
+ background: $uni-bg-base-color;
+ }
+
+
}
.login-btn {
@@ -298,4 +304,19 @@
border-radius: 0 24rpx 24rpx 0;
}
}
+
+.login-code-item{
+ display: flex;
+ width: 540rpx;
+ height: 100rpx;
+
+ .login-code-img {
+ margin-left: 50rpx;
+ height: 90rpx;
+ width: 260rpx;
+ border-radius: 24rpx 24rpx 24rpx 24rpx;
+ }
+
+}
+