Commit bd87deda authored by yanglilong's avatar yanglilong

'修改'

parent 75827e7a
...@@ -8,4 +8,5 @@ export default { ...@@ -8,4 +8,5 @@ export default {
specialtyList: "/backstage/auth/specialtyList", specialtyList: "/backstage/auth/specialtyList",
coverageCode: "/backstage/auth/coverageMasterList", coverageCode: "/backstage/auth/coverageMasterList",
getRefcdByRefgrp: "/common/getRefcdByRefgrp", // 公共获取码表接口 getRefcdByRefgrp: "/common/getRefcdByRefgrp", // 公共获取码表接口
checkUserEmail: "/backstage/user/checkUserEmail", // 校验用户邮箱
}; };
...@@ -46,6 +46,11 @@ const GETREFCDBYREFGRP = (data) => { ...@@ -46,6 +46,11 @@ const GETREFCDBYREFGRP = (data) => {
return req.post(apis.getRefcdByRefgrp, data); return req.post(apis.getRefcdByRefgrp, data);
}; };
// 校验用户邮箱
const CHECKUSEREMAIL = (data) => {
return req.post(apis.checkUserEmail, data);
};
// 对象数组 // 对象数组
export default { export default {
GETUSERINFO, GETUSERINFO,
...@@ -56,4 +61,5 @@ export default { ...@@ -56,4 +61,5 @@ export default {
UPLOADIMG, UPLOADIMG,
GETCOVERAGECODE, GETCOVERAGECODE,
GETREFCDBYREFGRP, GETREFCDBYREFGRP,
CHECKUSEREMAIL,
}; };
...@@ -10,7 +10,7 @@ const service = axios.create({ ...@@ -10,7 +10,7 @@ const service = axios.create({
return status >= 200 && status <= 504; // 合法状态码 return status >= 200 && status <= 504; // 合法状态码
}, },
baseURL: process.env.VUE_APP_API, // 基础请求路径 baseURL: process.env.VUE_APP_API, // 基础请求路径
timeout: 10000, // 请求超时 timeout: 60000, // 请求超时
}); });
// 重复尝试此时 // 重复尝试此时
service.defaults.retry = 3; service.defaults.retry = 3;
......
...@@ -111,15 +111,11 @@ export default { ...@@ -111,15 +111,11 @@ export default {
}); });
}, },
handlerNext() { handlerNext() {
this.$refs.form.validateField( this.$refs.form.validate((valid) => {
["userName", "verificationCode"], if (valid) {
(valid) => {
if (valid) {
return false;
}
this.activeStep = "2"; this.activeStep = "2";
} }
); });
}, },
handlerReset() { handlerReset() {
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
...@@ -130,15 +126,43 @@ export default { ...@@ -130,15 +126,43 @@ export default {
this._reset({ userName, verificationCode, newPwd }); this._reset({ userName, verificationCode, newPwd });
}); });
}, },
_getVerifyEmail(data) { //校验用户邮箱
this.$apis.GETVERIFYEMAIL(data).then((res) => { checkUserEmail(data){
if (res.returnCode === "0000") { return new Promise((resolve,reject)=>{
this.$message.success(res.returnMsg || "发送成功"); this.$apis.CHECKUSEREMAIL({
} else { userName: data.userName
this.$message.error(res.returnMsg || "发送失败"); })
} .then((res)=>{
if (res.returnCode === "0000") {
resolve(res.content);
}else{
this.$message.error(res.returnMsg);
reject();
}
})
}); });
}, },
async _getVerifyEmail(data) {
let email = await this.checkUserEmail(data);
if(email){
this.$modal.confirm({
title: "发送到邮箱",
content: `确认发送至邮箱${email}?`,
okText: "确认",
cancelText: "取消",
onOk: () => {
this.$apis.GETVERIFYEMAIL(data).then((res) => {
if (res.returnCode === "0000") {
this.$message.success(res.returnMsg || "发送成功");
} else {
this.$message.error(res.returnMsg || "发送失败");
}
});
},
onCancel: () => {},
});
}
},
_reset(data) { _reset(data) {
this.$apis.RESETPASSWORD(data).then((res) => { this.$apis.RESETPASSWORD(data).then((res) => {
if (res.returnCode === "0000") { if (res.returnCode === "0000") {
......
...@@ -202,8 +202,8 @@ export default { ...@@ -202,8 +202,8 @@ export default {
if (valid) { if (valid) {
let formData = { let formData = {
...this.detailObj, ...this.detailObj,
startDate: this.detailObj.startDate?moment(this.detailObj.startDate).format('YYYY-MM-DD'):'', startDate: this.detailObj.startDate?moment(this.detailObj.startDate).format('YYYY-MM-DD HH:mm:ss'):'',
endDate: this.detailObj.endDate?moment(this.detailObj.endDate).format('YYYY-MM-DD'):'', endDate: this.detailObj.endDate?moment(this.detailObj.endDate).format('YYYY-MM-DD HH:mm:ss'):'',
claimApplicationTemplate: this.detailObj.claimApplicationTemplate.length>0? this.detailObj.claimApplicationTemplate[0].url: '', claimApplicationTemplate: this.detailObj.claimApplicationTemplate.length>0? this.detailObj.claimApplicationTemplate[0].url: '',
authApplicationTemplate: this.detailObj.authApplicationTemplate.length>0? this.detailObj.authApplicationTemplate[0].url: '', authApplicationTemplate: this.detailObj.authApplicationTemplate.length>0? this.detailObj.authApplicationTemplate[0].url: '',
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment