Commit 06da22ef by 刘泽奇

123

parent d1654b91
......@@ -86,6 +86,7 @@ axios.get("/web/common/metaCtl/getRouteConfig").then(d => {
store.state.reqQuery = from.query;
console.log(to, from, store.state.reqUrl);
}
next();
});
......@@ -587,7 +588,13 @@ axios.get("/web/common/metaCtl/getRouteConfig").then(d => {
},
postReq(path, data) {
return axios.post(path, data, { "headers": { 'codepath': this.codePath } }).then(function (r) {
if (r.status == -99) {
$.removeCookie("userpin");
$.removeCookie("userName");
$.removeCookie("channelUserId");
this.$root.user_Name = "";
this.$root.channelUserId = '';
}
return r.data ? r.data : null;
});
......
......@@ -43,7 +43,7 @@
class="el-input__icon el-icon-edit"></i></el-input>
<el-button id="loginCode" type="primary" plain style="width: 145px;
background: #128EE9;
color: #fff;" @click="obtaincode1" :disabled="vCodeClick">
color: #fff;" @click="obtaincode1" :loading="vCodeLoding">
获取验证码</el-button>
</el-form-item>
<div style="font-size:12px;color:#B2B2B2;margin-top: -4px;
......@@ -103,7 +103,8 @@
</el-form-item>
<el-form-item prop="code">
<el-input style="width:176px;" v-model="form3.code" placeholder="请输入验证码"></el-input>
<el-button id="resetCode" type="primary" style="width:135px;float: right" @click="obtaincode2">获取验证码
<el-button id="resetCode" type="primary" :loading="vCodeLoding" style="width:135px;float: right"
@click="obtaincode2">获取验证码
</el-button>
</el-form-item>
<el-form-item prop="password">
......
......@@ -95,7 +95,7 @@
],
},
reqUrl: "",
vCodeClick: false,
vCodeLoding: false,
}
},
mounted: function() {
......@@ -161,57 +161,62 @@
this.resetall();
},
obtaincode1(){
let obj = this.$root.copyParams({ mobile: this.form1.mobile }, "getVerifyCode", "/auth/accessAuth/springBoard");
this.$root.postReq("/web/trademark/tmqueryCtl/doPost", obj).then((d) => {
if (d.status == 0) {
let date = 60;
this.vCodeClick = true;
let timer = setInterval(() => {
$('#loginCode').text(date--);
if (date < 1) {
clearInterval(timer);
this.vCodeClick = false;
$('#loginCode').text('获取验证码');
}
}, 1000);
console.log("返回信息", d);
} else {
this.$message(d.msg);
console.log(d.msg);
}
});
if (!(/^1[3456789]\d{9}$/.test(this.form1.mobile))) {
this.$message("手机号有误");
return false;
} else {
let obj = this.$root.copyParams({ mobile: this.form1.mobile }, "getVerifyCode", "/auth/accessAuth/springBoard");
this.$root.postReq("/web/trademark/tmqueryCtl/doPost", obj).then((d) => {
if (d.status == 0) {
let date = 60;
this.vCodeLoding = true;
let timer = setInterval(() => {
$('#loginCode').text(date--);
if (date < 1) {
clearInterval(timer);
this.vCodeLoding = false;
$('#loginCode').text('获取验证码');
}
}, 1000);
console.log("返回信息", d);
} else {
this.$message(d.msg);
console.log(d.msg);
}
});
}
},
obtaincode2(){
var that = this;
if (/^1[23456789]\d{9}$/.test(that.form3.mobile) == false) {
that.$alert('请输入正确格式的手机号码', '提示', {
confirmButtonText: '确定',
callback: action => {
if (!(/^1[3456789]\d{9}$/.test(this.form3.mobile))) {
this.$message("手机号有误");
return false;
} else {
let obj = this.$root.copyParams({ mobile: this.form3.mobile }, "getVerifyCode", "/auth/accessAuth/springBoard");
this.$root.loading = true;
this.$root.postReq("/web/trademark/tmqueryCtl/doPost", obj).then((d) => {
this.$root.loading = false;
if (d.status == 0) {
this.vCodeLoding = true;
let date = 60;
let timer = setInterval(() => {
$('#resetCode').text(date--);
if (date < 1) {
clearInterval(timer);
this.vCodeLoding = false;
$('#resetCode').text('获取验证码');
}
}, 1000);
console.log("返回信息", d);
} else {
console.log(d.msg);
this.$message(d.msg);
}
});
return;
};
let obj = this.$root.copyParams({ mobile: this.form3.mobile }, "getVerifyCode", "/auth/accessAuth/springBoard");
this.$root.loading = true;
this.$root.postReq("/web/trademark/tmqueryCtl/doPost", obj).then((d) => {
this.$root.loading = false;
if (d.status == 0) {
let date = 60;
this.vCodeClick = true;
let timer = setInterval(() => {
$('#resetCode').text(date--);
if (date < 1) {
clearInterval(timer);
this.vCodeClick = false;
$('#resetCode').text('获取验证码');
}
}, 1000);
console.log("返回信息", d);
} else {
console.log(d.msg);
this.$message(d.msg);
}
});
}
},
checklogin1(){
var that = this;
......
......@@ -38,8 +38,8 @@
<el-form-item prop="code">
<el-input style="width:175px;" v-model="form1.code" placeholder="请输入验证码"><i slot="prefix"
class="el-input__icon el-icon-edit"></i></el-input>
<el-button id="registerVcode" type="primary" plain style="width:135px;background: rgba(18,142,233,1);
color: rgba(255,255,255,1);" :disabled="vCodeClick" @click="obtaincode1">
<el-button id="registerVcode" type="primary" style="width:135px;" :loading="vCodeLoding"
@click="obtaincode1">
获取验证码</el-button>
</el-form-item>
<div class="zhanghao">已有账号?
......
......@@ -100,7 +100,7 @@
{ min: 6, max: 18, message: '长度在 6 到 18 个字符', trigger: 'blur' }
],
},
vCodeClick: false,
vCodeLoding: false,
}
},
mounted: function() {
......@@ -167,13 +167,13 @@
let obj = this.$root.copyParams({ mobile: this.form1.mobile }, "getVerifyCode", "/auth/accessAuth/springBoard");
this.$root.postReq("/web/trademark/tmqueryCtl/doPost", obj).then((d) => {
if (d.status == 0) {
this.vCodeLoding = true;
let date = 60;
this.vCodeClick = true;
let timer = setInterval(() => {
$('#registerVcode').text(date--);
if (date < 1) {
clearInterval(timer);
this.vCodeClick = false;
this.vCodeLoding = false;
$('#registerVcode').text('获取验证码');
}
}, 1000);
......
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