diff --git a/ant-design-vue-jeecg/src/views/user/Login.vue b/ant-design-vue-jeecg/src/views/user/Login.vue
index 39008295..e145a30a 100644
--- a/ant-design-vue-jeecg/src/views/user/Login.vue
+++ b/ant-design-vue-jeecg/src/views/user/Login.vue
@@ -1,75 +1,47 @@
-
-
+
+
+
-
-
+
+
-
-
-
-
+
+
+
-
-
+
-
-
+
+
-
+
-
-
+
-
-
+
+
-
-
+
-
-
+
+
-
+
+
-
- 自动登录
+
+ 自动登录
忘记密码
-
+
注册账户
-
+
- 确定
-
+ 确定
-
-
+
+
+
-
\ No newline at end of file
+ /deep/ .password-retrieval-form{
+ max-width: 500px;
+ margin: 40px auto 0;
+ .ant-form-explain{
+ text-align: left;
+ }
+ }
+
+
diff --git a/ant-design-vue-jeecg/src/views/user/alteration/Step2.vue b/ant-design-vue-jeecg/src/views/user/alteration/Step2.vue
index 78b89848..12153fcb 100644
--- a/ant-design-vue-jeecg/src/views/user/alteration/Step2.vue
+++ b/ant-design-vue-jeecg/src/views/user/alteration/Step2.vue
@@ -1,31 +1,20 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
@@ -37,12 +26,12 @@
v-text="!state.smsSendBtn && '获取验证码' || (state.time+' s')">
-
-
+
+
使用已有账户登录
下一步
-
-
+
+
@@ -54,7 +43,7 @@
props: ['userList'],
data() {
return {
- form: this.$form.createForm(this),
+ model: {},
loading: false,
// accountName: this.userList.username,
dropList: "0",
@@ -69,8 +58,13 @@
mobile: "",
},
validatorRules: {
- captcha: {rule: [{required: true, message: '请输入短信验证码!'}, {validator: this.validateCaptcha}]},
- phone: {rule: [{required: true, message: '请输入手机号码!'}, {validator: this.validatePhone}]},
+ phone: [
+ { required: true, message: '请输入手机号码!' },
+ { validator: this.validatePhone }
+ ],
+ captcha: [
+ { required: true, message: '请输入短信验证码!' }
+ ]
},
}
},
@@ -80,67 +74,59 @@
nextStep() {
let that = this
that.loading = true
- this.form.validateFields((err, values) => {
- console.log(values);
- if (!err) {
- if (that.dropList == "0") {
- if (values.captcha == undefined) {
- this.cmsFailed("请输入短信验证码!");
- } else {
- var params = {}
- params.phone = values.phone;
- params.smscode = values.captcha;
- postAction("/sys/user/phoneVerification", params).then((res) => {
- if (res.success) {
- console.log(res);
- var userList = {
- username: res.result.username,
- phone: values.phone,
- smscode: res.result.smscode
- };
- setTimeout(function () {
- that.$emit('nextStep', userList)
- }, 0)
- } else {
- this.cmsFailed(res.message);
- }
- })
-
- }
+ this.$refs['form'].validate((success) => {
+ if(success==true){
+ let params = {
+ phone: this.model.phone,
+ smscode: this.model.captcha
}
-
-
+ postAction("/sys/user/phoneVerification", params).then((res) => {
+ if (res.success) {
+ console.log(res);
+ let userList = {
+ username: res.result.username,
+ phone: params.phone,
+ smscode: res.result.smscode
+ };
+ setTimeout(function () {
+ that.$emit('nextStep', userList)
+ }, 0)
+ } else {
+ this.cmsFailed(res.message);
+ }
+ });
}
+
})
},
getCaptcha(e) {
e.preventDefault();
- let that = this;
- let phone=that.form.getFieldValue("phone")
- if(!phone){
- this.cmsFailed("手机号不能为空!");
- return;
- }
- this.state.smsSendBtn = true;
- let interval = window.setInterval(() => {
- if (that.state.time-- <= 0) {
- that.state.time = 60;
- that.state.smsSendBtn = false;
- window.clearInterval(interval);
+ const that = this
+ that.$refs['form'].validateField('phone', err=>{
+ if(!err){
+ that.state.smsSendBtn = true;
+ let interval = window.setInterval(() => {
+ if (that.state.time-- <= 0) {
+ that.state.time = 60;
+ that.state.smsSendBtn = false;
+ window.clearInterval(interval);
+ }
+ }, 1000);
+ const hide = that.$message.loading('验证码发送中..', 0);
+ let smsParams = {
+ mobile: that.model.phone,
+ smsmode: "2"
+ };
+ postAction("/sys/sms", smsParams).then(res => {
+ if (!res.success) {
+ setTimeout(hide, 1);
+ that.cmsFailed(res.message);
+ }
+ setTimeout(hide, 500);
+ })
+ }else{
+ that.cmsFailed(err);
}
- }, 1000);
-
- const hide = this.$message.loading('验证码发送中..', 0);
- let smsParams = {
- mobile: phone,
- smsmode: "2"
- };
- postAction("/sys/sms", smsParams).then(res => {
- if (!res.success) {
- setTimeout(hide, 1);
- this.cmsFailed(res.message);
- }
- setTimeout(hide, 500);
})
},
cmsFailed(err) {
@@ -193,4 +179,4 @@
width: 100%;
height: 40px;
}
-
\ No newline at end of file
+
diff --git a/ant-design-vue-jeecg/src/views/user/alteration/Step3.vue b/ant-design-vue-jeecg/src/views/user/alteration/Step3.vue
index 57b614cd..735d3982 100644
--- a/ant-design-vue-jeecg/src/views/user/alteration/Step3.vue
+++ b/ant-design-vue-jeecg/src/views/user/alteration/Step3.vue
@@ -1,48 +1,29 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
上一步
提交
-
-
+
+