Commit 06da22ef by 刘泽奇

123

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