Commit a05e4671 by 刘泽奇

123

parent 6860f6c0
...@@ -238,10 +238,29 @@ module.exports = { ...@@ -238,10 +238,29 @@ module.exports = {
"label": "登录", "label": "登录",
"isctl": "no" "isctl": "no"
}, },
{
"code": "nowbuy",
"icon": "fa fa-power-off",
"path": ":channel/nowbuy",
"isMenu": false,
"label": "登录",
"isctl": "no"
},
{
"code": "paysuccess",
"icon": "fa fa-power-off",
"path": ":channel/paysuccess",
"isMenu": false,
"label": "登录",
"isctl": "no"
},
], ],
}, },
"bizs": { "bizs": {
"OAjdcompany": { "title": "后台首页", "config": null, "path": "/:channel/OAjdcompany", "comname": "OAjdcompany" }, "OAjdcompany": { "title": "后台首页", "config": null, "path": "/:channel/OAjdcompany", "comname": "OAjdcompany" },
"paysuccess": { "title": "后台首页", "config": null, "path": "/:channel/paysuccess", "comname": "paysuccess" },
"nowbuy": { "title": "后台首页", "config": null, "path": "/:channel/nowbuy", "comname": "nowbuy" },
"orderpay": { "title": "后台首页", "config": null, "path": "/:channel/orderpay", "comname": "orderpay" }, "orderpay": { "title": "后台首页", "config": null, "path": "/:channel/orderpay", "comname": "orderpay" },
"bwselftmreg": { "title": "后台首页", "config": null, "path": "/:channel/bwselftmreg", "comname": "bwselftmreg" }, "bwselftmreg": { "title": "后台首页", "config": null, "path": "/:channel/bwselftmreg", "comname": "bwselftmreg" },
"OAjdlist": { "title": "后台首页", "config": null, "path": "/:channel/OAjdlist", "comname": "OAjdlist" }, "OAjdlist": { "title": "后台首页", "config": null, "path": "/:channel/OAjdlist", "comname": "OAjdlist" },
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
<div class="jc_hd"></div> <div class="jc_hd"></div>
</div> </div>
<!-- 启服通公共头 --> <!-- 启服通公共头 -->
<div class="jdindentlist-header" v-if="channelName == 'bw'"> <div class="commonchannel" v-if="channelName == 'bw'">
<div> <div>
<div> <div>
<img src="/imgs/pt.jpg" alt=""> <img src="/imgs/pt.jpg" alt="">
...@@ -70,16 +70,26 @@ ...@@ -70,16 +70,26 @@
<span>{{channelMessage}}工商、商标注册平台</span> <span>{{channelMessage}}工商、商标注册平台</span>
</div> </div>
<div v-if="user_Name"> <div v-if="user_Name">
<span v-if="user_Name"><i class="el-icon-user"></i></span> <el-dropdown>
<span>{{user_Name}}</span> <span class="el-dropdown-link">
{{user_Name}}<i class="el-icon-arrow-down el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item icon="el-icon-plus">黄金糕</el-dropdown-item>
<el-dropdown-item icon="el-icon-circle-plus">狮子头</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<span @click="loginOut" v-if="user_Name">退出</span> <span @click="loginOut" v-if="user_Name">退出</span>
</div> </div>
<div v-else> <div v-else>
<router-link class="jdindentlist-header-login" :to="'/'+channelName+'/login'">登录</router-link> <router-link class="commonchannel-login" :to="'/'+channelName+'/login'">登录</router-link>
<router-link class="jdindentlist-header-login" style="display:inline-block;color: #fff;padding: 0 15px;background:linear-gradient(80deg,#3171ff 0,#a14faf 100%);border-radius:13px;height: 26px; <router-link class="commonchannel-login" style="display:inline-block;color: #fff;padding: 0 15px;background:linear-gradient(80deg,#3171ff 0,#a14faf 100%);border-radius:13px;height: 26px;
line-height: 26px;" :to="'/'+channelName+'/register'">免费注册</router-link> line-height: 26px;" :to="'/'+channelName+'/register'">免费注册</router-link>
</div> </div>
</div> </div>
<!-- 启服通公共头 -->
<!-- 根据渠道显示不同公共头end --> <!-- 根据渠道显示不同公共头end -->
<transition name="slide-fade"> <transition name="slide-fade">
<router-view></router-view> <router-view></router-view>
...@@ -95,4 +105,5 @@ ...@@ -95,4 +105,5 @@
<script src="/js/common.js"></script> <script src="/js/common.js"></script>
<script type="module" src="/js/index.js"></script> <script type="module" src="/js/index.js"></script>
</body> </body>
</html>
</html>
\ No newline at end of file
.commonchannel {
width: 100%;
height: 70px;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 30px 0 36px;
box-sizing: border-box;
background: #212122;
box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.2);
}
.commonchannel>div:nth-child(1) {
font-family: JDLANGZHENGTI--GB1-0;
font-size: 20px;
color: #ffffff;
text-align: left;
line-height: 24px;
}
.commonchannel>div:nth-child(1)>div {
height: 40px;
display: inline-block;
}
.commonchannel>div:nth-child(1)>div>img{
height: 100%;
}
.commonchannel-login {
color: #fff;
margin-right: 13px;
}
.commonchannel-login:hover {
color: #3171ff;
}
.commonchannel>div:nth-child(2)>span:nth-child(1) {
font-size: 16px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #7b819f;
line-height: 22px;
}
.commonchannel>div:nth-child(2)>span:nth-child(2) {
font-size: 16px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #ffffff;
line-height: 22px;
margin-right: 20px;
margin-left: 20px;
cursor: pointer;
}
.commonchannel>div:nth-child(2)>span:nth-child(3) {
font-size: 16px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #ffffff;
line-height: 22px;
cursor: pointer;
}
.commonchannel .el-dropdown-link{
color: #fff;
cursor: pointer;
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -163,7 +163,7 @@ axios.get("/web/common/metaCtl/getRouteConfig").then(d => { ...@@ -163,7 +163,7 @@ axios.get("/web/common/metaCtl/getRouteConfig").then(d => {
jdSelfHeaderShow: true, jdSelfHeaderShow: true,
commonHeader: true, commonHeader: true,
commonFooter: true, commonFooter: true,
user_Name: "", user_Name: "123xxxxxxxxxxx",
channelMessage: "", channelMessage: "",
}; };
......
...@@ -23,9 +23,11 @@ ...@@ -23,9 +23,11 @@
height: 40px; height: 40px;
display: inline-block; display: inline-block;
} }
.jdindentlist-header>div:nth-child(1)>div>img{
.jdindentlist-header>div:nth-child(1)>div>img {
height: 100%; height: 100%;
} }
.jdindentlist-header-login { .jdindentlist-header-login {
color: #fff; color: #fff;
margin-right: 13px; margin-right: 13px;
...@@ -50,7 +52,7 @@ ...@@ -50,7 +52,7 @@
color: #ffffff; color: #ffffff;
line-height: 22px; line-height: 22px;
margin-right: 20px; margin-right: 20px;
cursor: pointer;
} }
.jdindentlist-header>div:nth-child(2)>span:nth-child(3) { .jdindentlist-header>div:nth-child(2)>span:nth-child(3) {
......
#baoguo{ #baoguo {
padding: 20px 20px 20px; padding: 20px 20px 20px;
background: rgba(255,255,255,1); background: rgba(255, 255, 255, 1);
border: 1px solid rgba(151,151,151,1); border: 1px solid rgba(151, 151, 151, 1);
} }
#bychpage .el-form-item>.el-form-item__content{
#bychpage .el-form-item>.el-form-item__content {
margin-left: 0 !important; margin-left: 0 !important;
} }
.login-content>.login-content-input{
.login-content>.login-content-input {
padding: 20px 20px 20px; padding: 20px 20px 20px;
width: auto; width: auto;
margin-left: 0; margin-left: 0;
...@@ -17,4 +19,28 @@ ...@@ -17,4 +19,28 @@
position: absolute; position: absolute;
right: 20%; right: 20%;
top: 23%; top: 23%;
}
.login-content-button {
width: 100%;
}
.login-content {
width: 320px;
height: 420px;
background: rgba(255, 255, 255, 1);
border-radius: 6px;
}
.login-content-title {
background: url(../imgs/bg_title.png);
background-repeat: no-repeat;
background-size: 100% 100%;
width: 320px;
height: 89px;
line-height: 70px;
text-align: center;
font-size: 18px;
font-weight: 400;
color: rgba(47, 47, 47, 1);
} }
\ No newline at end of file
{ {
template:'${tmpl}', template: '${tmpl}',
data:function(){ data: function() {
var that=this; var that = this;
var validateMethod=function(rule, value, callback){ var validateMethod = function (rule, value, callback) {
console.log(rule); console.log(rule);
if(rule.field=="mobile"){ if (rule.field == "mobile") {
if(/^1[23456789]\d{9}$/.test(value) == false){ if (/^1[23456789]\d{9}$/.test(value) == false) {
return callback(new Error("请输入正确格式的手机号")); return callback(new Error("请输入正确格式的手机号"));
}else{ } else {
return callback(); return callback();
} }
}
if(rule.field=="code"){
if(that.rcode!=value){
return callback(new Error("输入验证码有误,请重新输入"));
}
}
return callback();
};
return {
ldms:[],
activeIndex:"1",
loginUrl:"",
form1:{
mobile:"",
code:"",
password:"",
},
form2:{
username:"",
password:"",
},
form3:{
mobile:"",
code:"",
password:"",
},
form4:{
mobile:"",
code:"",
password:"",
},
a:true,
b:false,
c:false,
Num:60,
Num2:60,
Num3:60,
rcode:"",
rules1:{
mobile: [
{required: true, message: '请输入手机号', trigger: 'blur' },
{ validator: validateMethod, trigger: 'blur' },
],
code: [
{required: true, message: '请输入手机接收到的验证码', trigger: 'blur' },
{ validator: validateMethod, trigger: 'blur' },
],
},
rules2:{
username: [
{required: true, message: '请输入账号', trigger: 'blur' },
],
password: [
{required: true, message: '请输入密码', trigger: 'blur' },
],
},
rules3:{
mobile: [
{required: true, message: '请输入手机号', trigger: 'blur' },
{ validator: validateMethod, trigger: 'blur' },
],
code: [
{required: true, message: '请输入手机接收到的验证码', trigger: 'blur' },
{ validator: validateMethod, trigger: 'blur' },
],
password: [
{required: true, message: '请输入密码', trigger: 'blur' },
{ min: 6, max: 18, message: '长度在 6 到 18 个字符', trigger: 'blur' }
],
},
rules4:{
mobile: [
{required: true, message: '请输入手机号', trigger: 'blur' },
{ validator: validateMethod, trigger: 'blur' },
],
code: [
{required: true, message: '请输入手机接收到的验证码', trigger: 'blur' },
{ validator: validateMethod, trigger: 'blur' },
],
password: [
{required: true, message: '请输入密码', trigger: 'blur' },
{ min: 6, max: 18, message: '长度在 6 到 18 个字符', trigger: 'blur' }
],
},
} }
}, if (rule.field == "code") {
mounted:function(){ if (that.rcode != value) {
return callback(new Error("输入验证码有误,请重新输入"));
}, }
created:function(){ }
console.log(this.pfooterinfo); return callback();
if(this.pfooterinfo&&this.pfooterinfo.loginUrl){ };
this.loginUrl=this.pfooterinfo.loginUrl; return {
}else{ ldms: [],
this.loginUrl="https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_41110157500594182420192913391824zhuce_background.png"; activeIndex: "1",
} loginUrl: "",
}, form1: {
methods:{ mobile: "",
handleSelect(key, keyPath) { code: "",
console.log(key, keyPath); password: "",
this.activeIndex=key;
}, },
resetall(){ form2: {
this.form1.mobile=""; username: "",
this.form1.code=""; password: "",
this.form1.password="";
this.form2.username="";
this.form2.password="";
this.form3.mobile="";
this.form3.code="";
this.form3.password="";
this.form4.mobile="";
this.form4.code="";
this.form4.password="";
}, },
rsetpassword(){ form3: {
this.a=false; mobile: "",
this.b=true; code: "",
this.c=false; password: "",
this.rcode="";
this.resetall();
}, },
login(){ form4: {
this.a=true; mobile: "",
this.b=false; code: "",
this.c=false; password: "",
this.rcode="";
this.resetall();
}, },
register(){ a: true,
this.$root.pushx({ b: false,
title: "注册", c: false,
name: "/register", Num: 60,
}); Num2: 60,
this.a=false; Num3: 60,
this.b=false; rcode: "",
this.c=true; rules1: {
this.rcode=""; mobile: [
this.resetall(); { required: true, message: '请输入手机号', trigger: 'blur' },
{ validator: validateMethod, trigger: 'blur' },
],
code: [
{ required: true, message: '请输入手机接收到的验证码', trigger: 'blur' },
{ validator: validateMethod, trigger: 'blur' },
],
}, },
obtaincode1(){ rules2: {
this.fetchVcode(this.form1.mobile) username: [
{ required: true, message: '请输入账号', trigger: 'blur' },
],
password: [
{ required: true, message: '请输入密码', trigger: 'blur' },
],
}, },
obtaincode2(){ rules3: {
var that=this; mobile: [
if(/^1[23456789]\d{9}$/.test(that.form3.mobile) == false){ { required: true, message: '请输入手机号', trigger: 'blur' },
that.$alert('请输入正确格式的手机号码', '提示', { { validator: validateMethod, trigger: 'blur' },
confirmButtonText: '确定', ],
callback: action => { code: [
} { required: true, message: '请输入手机接收到的验证码', trigger: 'blur' },
}); { validator: validateMethod, trigger: 'blur' },
return; ],
}; password: [
that.$root.postReq("/web/userCtl/getUserByMobile",{mobile:that.form3.mobile}).then(function(d){ { required: true, message: '请输入密码', trigger: 'blur' },
if(d.code==0){ { min: 6, max: 18, message: '长度在 6 到 18 个字符', trigger: 'blur' }
var timer= setInterval(function () { ],
console.log("----------getNumber-----------");
$("#resetCode").attr("disabled", "disabled");
$("#resetCode").css("cursor", "not-allowed");
$("#resetCode").text(that.Num2 + "秒后重新获取");
console.log(that.Num2);
if (that.Num2 > 0) {
console.log(that.Num2);
that.Num2--;
}else{
$("#resetCode").attr("disabled", false);
$("#resetCode").text("获取验证码");
that.Num2 = 60;
clearInterval(timer);
}
},1000);
that.$root.postReq("/web/userCtl/fetchVcode",{mobile:that.form3.mobile}).then(function(d){
console.log(d);
if(d.status==0){
that.rcode=d.data.vcodestr;
}
})
}else{
that.$message({
type: 'error',
message: '用户尚未注册'
});
}
})
}, },
obtaincode3(){ rules4: {
var that=this; mobile: [
if(/^1[23456789]\d{9}$/.test(that.form4.mobile) == false){ { required: true, message: '请输入手机号', trigger: 'blur' },
that.$alert('请输入正确格式的手机号码', '提示', { { validator: validateMethod, trigger: 'blur' },
confirmButtonText: '确定', ],
callback: action => { code: [
} { required: true, message: '请输入手机接收到的验证码', trigger: 'blur' },
}); { validator: validateMethod, trigger: 'blur' },
return; ],
}; password: [
that.$root.postReq("/web/userCtl/getUserByMobile",{mobile:that.form4.mobile}).then(function(d){ { required: true, message: '请输入密码', trigger: 'blur' },
if(d.code==-1){ { min: 6, max: 18, message: '长度在 6 到 18 个字符', trigger: 'blur' }
var timer= setInterval(function () { ],
console.log("----------getNumber-----------");
$("#registerCode").attr("disabled", "disabled");
$("#registerCode").css("cursor", "not-allowed");
$("#registerCode").text(that.Num3 + "秒后重新获取");
console.log(that.Num3);
if (that.Num3 > 0) {
console.log(that.Num3);
that.Num3--;
}else{
$("#registerCode").attr("disabled", false);
$("#registerCode").text("获取验证码");
that.Num3 = 60;
clearInterval(timer);
}
},1000);
that.$root.postReq("/web/userCtl/fetchVcode",{mobile:that.form4.mobile}).then(function(d){
if(d.status==0){
console.log(d);
that.rcode=d.data.vcodestr;
}
})
}else{
that.$message({
type: 'error',
message: '用户已存在, 请修改并重试'
});
}
})
}, },
checklogin1(){ }
var that=this; },
var obj={ mounted: function() {
mobile:that.form1.mobile,
}; },
that.$refs.form1.validate(valid=>{ created: function() {
if(valid){ console.log(this.pfooterinfo);
that.$root.postReq("/web/userCtl/loginByMobile",{u:obj}).then(function(d){ if (this.pfooterinfo && this.pfooterinfo.loginUrl) {
this.loginUrl = this.pfooterinfo.loginUrl;
if(d.status==0){ } else {
console.log("..................................................helllo.................................."); this.loginUrl = "https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_41110157500594182420192913391824zhuce_background.png";
}
that.$root.refreshLoginState(()=>{ },
console.log("....................................................................................innner"); methods: {
var afto=localStorage.getItem("afterLogin"); handleSelect(key, keyPath) {
if(afto){ console.log(key, keyPath);
that.$root.pushx(JSON.parse(afto)); this.activeIndex = key;
localStorage.removeItem("afterLogin"); },
that.$root.removetab("/login"); resetall(){
}else{ this.form1.mobile = "";
location.reload(); this.form1.code = "";
} this.form1.password = "";
}); this.form2.username = "";
} this.form2.password = "";
}) this.form3.mobile = "";
this.form3.code = "";
this.form3.password = "";
this.form4.mobile = "";
this.form4.code = "";
this.form4.password = "";
},
rsetpassword(){
this.a = false;
this.b = true;
this.c = false;
this.rcode = "";
this.resetall();
},
login(){
this.a = true;
this.b = false;
this.c = false;
this.rcode = "";
this.resetall();
},
register(){
console.log(this.$root.channelName, "bbbbbbbbbbbb");
switch (this.$root.channelName) {
case "bw":
this.$router.push({ path: `/bw/register` });
break;
default:
break;
}
this.a = false;
this.b = false;
this.c = true;
this.rcode = "";
this.resetall();
},
obtaincode1(){
this.fetchVcode(this.form1.mobile)
},
obtaincode2(){
var that = this;
if (/^1[23456789]\d{9}$/.test(that.form3.mobile) == false) {
that.$alert('请输入正确格式的手机号码', '提示', {
confirmButtonText: '确定',
callback: action => {
}
});
return;
};
that.$root.postReq("/web/userCtl/getUserByMobile", { mobile: that.form3.mobile }).then(function (d) {
if (d.code == 0) {
var timer = setInterval(function () {
console.log("----------getNumber-----------");
$("#resetCode").attr("disabled", "disabled");
$("#resetCode").css("cursor", "not-allowed");
$("#resetCode").text(that.Num2 + "秒后重新获取");
console.log(that.Num2);
if (that.Num2 > 0) {
console.log(that.Num2);
that.Num2--;
} else {
$("#resetCode").attr("disabled", false);
$("#resetCode").text("获取验证码");
that.Num2 = 60;
clearInterval(timer);
}
}, 1000);
that.$root.postReq("/web/userCtl/fetchVcode", { mobile: that.form3.mobile }).then(function (d) {
console.log(d);
if (d.status == 0) {
that.rcode = d.data.vcodestr;
} }
}) })
}, } else {
checklogin2(){ that.$message({
var that=this; type: 'error',
var obj={ message: '用户尚未注册'
userName:that.form2.username, });
password:that.form2.password }
}; })
that.$refs.form2.validate(valid=>{ },
if(valid){ obtaincode3(){
that.$root.postReq("/web/userCtl/login",{u:obj}).then(function(d){ var that = this;
if(d.status==0){ if (/^1[23456789]\d{9}$/.test(that.form4.mobile) == false) {
that.$root.refreshLoginState(()=>{ that.$alert('请输入正确格式的手机号码', '提示', {
console.log("....................................................................................innner"); confirmButtonText: '确定',
var afto=localStorage.getItem("afterLogin"); callback: action => {
if(afto){ }
that.$root.pushx(JSON.parse(afto)); });
localStorage.removeItem("afterLogin"); return;
that.$root.removetab("/login"); };
}else{ that.$root.postReq("/web/userCtl/getUserByMobile", { mobile: that.form4.mobile }).then(function (d) {
location.reload(); if (d.code == -1) {
} var timer = setInterval(function () {
}); console.log("----------getNumber-----------");
}else{ $("#registerCode").attr("disabled", "disabled");
that.$message({ $("#registerCode").css("cursor", "not-allowed");
type: 'error', $("#registerCode").text(that.Num3 + "秒后重新获取");
message: '用户名或密码错误,请重试.' console.log(that.Num3);
}); if (that.Num3 > 0) {
} console.log(that.Num3);
}) that.Num3--;
} else {
$("#registerCode").attr("disabled", false);
$("#registerCode").text("获取验证码");
that.Num3 = 60;
clearInterval(timer);
}
}, 1000);
that.$root.postReq("/web/userCtl/fetchVcode", { mobile: that.form4.mobile }).then(function (d) {
if (d.status == 0) {
console.log(d);
that.rcode = d.data.vcodestr;
} }
})
} else {
that.$message({
type: 'error',
message: '用户已存在, 请修改并重试'
}); });
}, }
sumbitreset(){ })
var that=this;
var obj={ },
mobile:this.form3.mobile, checklogin1(){
password:this.form3.password var that = this;
}; var obj = {
that.$refs.form3.validate(valid=>{ mobile: that.form1.mobile,
if(valid){ };
that.$root.postReq("/web/userCtl/resetPassword",obj).then(function(d){ that.$refs.form1.validate(valid => {
if(d.status==0){ if (valid) {
that.$message({ that.$root.postReq("/web/userCtl/loginByMobile", { u: obj }).then(function (d) {
type: 'success',
message: '密码重置成功' if (d.status == 0) {
}); console.log("..................................................helllo..................................");
that.$root.refreshLoginState(() => {
console.log("....................................................................................innner");
var afto = localStorage.getItem("afterLogin");
if (afto) {
that.$root.pushx(JSON.parse(afto));
localStorage.removeItem("afterLogin");
that.$root.removetab("/login");
} else {
location.reload();
} }
}) });
} }
}) })
}, }
submitregister(){ })
var that=this; },
var obj={ checklogin2(){
mobile:this.form4.mobile, var that = this;
password:this.form4.password var obj = {
}; userName: that.form2.username,
that.$refs.form4.validate(valid=>{ password: that.form2.password
if(valid){ };
that.$root.postReq("/web/userCtl/submitregister",obj).then(function(d){ that.$refs.form2.validate(valid => {
if(d.status==0){ if (valid) {
that.$message({ that.$root.postReq("/web/userCtl/login", { u: obj }).then(function (d) {
type: 'success', if (d.status == 0) {
message: '注册成功,请登录' that.$root.refreshLoginState(() => {
}); console.log("....................................................................................innner");
that.login(); var afto = localStorage.getItem("afterLogin");
}else if(d.status==1){ if (afto) {
that.$message({ that.$root.pushx(JSON.parse(afto));
type: 'error', localStorage.removeItem("afterLogin");
message: '该手机号码已注册' that.$root.removetab("/login");
}); } else {
location.reload();
} }
}) });
} else {
that.$message({
type: 'error',
message: '用户名或密码错误,请重试.'
});
} }
}) })
}, }
fetchVcode(mobilenum){ });
var that=this; },
if(/^1[23456789]\d{9}$/.test(mobilenum) == false){ sumbitreset(){
this.$alert('请输入正确格式的手机号码', '提示', { var that = this;
confirmButtonText: '确定', var obj = {
callback: action => { mobile: this.form3.mobile,
} password: this.form3.password
}); };
return; that.$refs.form3.validate(valid => {
}; if (valid) {
var timer= setInterval(function () { that.$root.postReq("/web/userCtl/resetPassword", obj).then(function (d) {
console.log("----------getNumber-----------"); if (d.status == 0) {
$("#loginCode").attr("disabled", "disabled"); that.$message({
$("#loginCode").css("cursor", "not-allowed"); type: 'success',
$("#loginCode").text(that.Num + "秒后重新获取"); message: '密码重置成功'
console.log(that.Num); });
if (that.Num > 0) {
console.log(that.Num);
that.Num--;
}else{
$("#loginCode").attr("disabled", false);
$("#loginCode").text("获取验证码");
that.Num = 60;
clearInterval(timer);
} }
},1000); })
this.$root.postReq("/web/userCtl/fetchVcode",{mobile:mobilenum}).then(function(d){ }
if(d.status==0){ })
that.rcode=d.data.vcodestr; },
submitregister(){
var that = this;
var obj = {
mobile: this.form4.mobile,
password: this.form4.password
};
that.$refs.form4.validate(valid => {
if (valid) {
that.$root.postReq("/web/userCtl/submitregister", obj).then(function (d) {
if (d.status == 0) {
that.$message({
type: 'success',
message: '注册成功,请登录'
});
that.login();
} else if (d.status == 1) {
that.$message({
type: 'error',
message: '该手机号码已注册'
});
} }
}) })
}
})
},
fetchVcode(mobilenum){
var that = this;
if (/^1[23456789]\d{9}$/.test(mobilenum) == false) {
this.$alert('请输入正确格式的手机号码', '提示', {
confirmButtonText: '确定',
callback: action => {
}
});
return;
};
var timer = setInterval(function () {
console.log("----------getNumber-----------");
$("#loginCode").attr("disabled", "disabled");
$("#loginCode").css("cursor", "not-allowed");
$("#loginCode").text(that.Num + "秒后重新获取");
console.log(that.Num);
if (that.Num > 0) {
console.log(that.Num);
that.Num--;
} else {
$("#loginCode").attr("disabled", false);
$("#loginCode").text("获取验证码");
that.Num = 60;
clearInterval(timer);
}
}, 1000);
this.$root.postReq("/web/userCtl/fetchVcode", { mobile: mobilenum }).then(function (d) {
if (d.status == 0) {
that.rcode = d.data.vcodestr;
}
})
}, },
validmethod:function (rule,value,callback) { validmethod: function (rule, value, callback) {
console.log("code validdate"); console.log("code validdate");
var self=this; var self = this;
var fm=this.currentFrm.getFormModel(); var fm = this.currentFrm.getFormModel();
return callback(); return callback();
}, },
sbhandler:function () { sbhandler: function () {
var self=this; var self = this;
var fm=this.$refs.loginFrm.getFormModel(); var fm = this.$refs.loginFrm.getFormModel();
this.$refs.loginFrm.validate(function(v){ this.$refs.loginFrm.validate(function (v) {
if(v){ if (v) {
self.$root.postReq("/web/userCtl/login",{u:fm}).then(function(d){ self.$root.postReq("/web/userCtl/login", { u: fm }).then(function (d) {
if(d.status==0){ if (d.status == 0) {
console.log("...................................................................................."); console.log("....................................................................................");
self.$root.refreshLoginState(()=>{ self.$root.refreshLoginState(() => {
console.log("....................................................................................innner"); console.log("....................................................................................innner");
var afto=localStorage.getItem("afterLogin"); var afto = localStorage.getItem("afterLogin");
if(afto){ if (afto) {
self.$root.pushx(JSON.parse(afto)); self.$root.pushx(JSON.parse(afto));
localStorage.removeItem("afterLogin"); localStorage.removeItem("afterLogin");
self.$root.removetab("/login"); self.$root.removetab("/login");
}else{ } else {
location.reload(); location.reload();
}
});
}else{
self.$message({
type: 'error',
message: '用户名或密码错误,请重试.'
});
}
});
} }
}); });
}, } else {
self.$message({
type: 'error',
message: '用户名或密码错误,请重试.'
});
}
});
}
});
}, },
vname:"gsb-login"
},
vname: "gsb-login"
} }
.nowbuy {
margin: 0 auto;
width: 1200px;
}
.nowbuy-nav {
height: 60px;
box-sizing: border-box;
padding: 21px 0;
}
.nowbuy-main {
padding-left: 54px;
width: 1203px;
background: rgba(255, 255, 255, 1);
border: 1px solid rgba(214, 214, 214, 1);
}
.nowbuy-title>div {
border-left: 5px solid #1EAFFF;
padding-left: 12px;
font-size: 18px;
margin: 20px 0;
}
.nowbuy-title>div>span {
color: #1EAFFF;
font-size: 14px;
font-family: Microsoft YaHei;
font-weight: 400;
color: rgba(30, 175, 255, 1);
}
/* .nowbuy-tips {
height: 40px;
line-height: 40px;
padding-left: 25px;
width: 1095px;
background: rgba(243, 250, 254, 1);
border: 1px solid rgba(102, 201, 255, 1);
} */
.nowbuy-form {
width: 35%;
}
.nowbuy .el-form-item__label {
text-align: right;
}
.nowbuy-footer-warpper{
border-top:1px solid #C1C1C1;
height: 170px;
padding-top: 17px;
box-sizing: border-box;
}
.nowbuy-footer {
box-sizing: border-box;
padding-left: 54px;
width: 1200px;
margin: 0 auto;
}
.nowbuy-footer>div {
display: inline-block;
}
.nowbuy-footer>span {
color: #f54a07;
}
.nowbuy-footer-img {
display: inline-block;
vertical-align: middle;
width: 26px;
height: 26px;
margin-left: 278px;
margin-bottom: 3px;
cursor: pointer;
margin-right: 15px;
}
.nowbuy-footer-img>img {
width: 100%;
height: 100%;
}
.nowbuy-footer>div>button {
margin-left: 80px;
}
.nowbuy .nowbuy-tableheader {
background: #F3F3F3;
font-size:14px;
font-family:Microsoft YaHei;
font-weight:400;
color:rgba(34,34,34,1);
}
.nowbuy .el-table th,
.el-table tr {
background: none;
}
\ No newline at end of file
<div class="nowbuy-warpper">
<div class="nowbuy">
<div class="nowbuy-nav">
<div class="tm-body-breadcrumb" style="margin-bottom: 15px;"><span @click="tiaozhuan(\'/\',\'首页\')"
style="cursor: pointer;">首页</span>
<i class="el-icon-arrow-right"></i>
<span style="font-weight:600;cursor: pointer;font-weight: 300;"
@click="tiaozhuan( \'/servicedetails\',\'服务详情\',)">{{serviceName||\'担保商标注册\'}}</span>
<i class="el-icon-arrow-right">下单</i>
</div>
</div>
<div class="nowbuy-main">
<div class="nowbuy-title">
<div>
购买服务
</div>
</div>
<div style="width:1093px;border:1px solid #F3F3F3;margin-bottom: 51px;">
<el-table :data="tableData" header-row-class-name="nowbuy-tableheader" style="width: 100%">
<el-table-column prop="name" label="服务名称" width="180">
</el-table-column>
<el-table-column prop="num" label="购买数量" width="180">
</el-table-column>
<el-table-column prop="countPrice" label="总金额(元)">
</el-table-column>
</el-table>
</div>
<div style="width:100%;height:1px;background:#f3f3f3;transform: translateX(-30px);margin-bottom: 30px;">
</div>
<div class="nowbuy-title">
<div>
订单联系人
<span style="margin-left:23px;"><i class="el-icon-warning"></i>
订单支付后,平台专业商标顾问会与您沟通商标注册需求,请保持电话畅通!</span>
</div>
</div>
<div class="nowbuy-form">
<div style="margin: 20px;"></div>
<el-form label-width="100px" :model="apply" :rules="applyRules" ref="apply">
<el-form-item label="姓名:" prop="contacts">
<el-input v-model="apply.contacts"></el-input>
</el-form-item>
<el-form-item label="电话:" prop="mobile">
<el-input v-model="apply.mobile"></el-input>
</el-form-item>
<el-form-item label="邮箱:">
<el-input v-model="apply.email"></el-input>
</el-form-item>
<el-form-item label="备注:">
<el-input type="textarea" v-model="apply.notes"></el-input>
</el-form-item>
</el-form>
</div>
</div>
</div>
<div class="nowbuy-footer-warpper">
<div class="nowbuy-footer">
订单金额: <span>¥{{tableData[0] ? tableData[0].countPrice:\'-\' }}</span>
<div>
<div class="nowbuy-footer-img" @click="checkImg = !checkImg">
<img :src="checkImg?\'/imgs/nowbuy/xuanzhong2.png\':\'/imgs/nowbuy/xuanzhong.png\'" alt="">
</div>
<span style="font-size: 20px;color:#999999; ">
我已阅读 <span style="color:#1EAFFF;">《商标服务合同》</span> ,且同意该合同内容
</span>
<el-button type="primary" @click="goOrder()" :disabled="!checkImg">去支付</el-button>
</div>
</div>
</div>
</div>
\ No newline at end of file
{
template: '${tmpl}',
data: function() {
var name = (rule, value, callback) => {
console.log(rule, value, callback);
if (value == '') {
callback(new Error('请输入姓名'));
} else {
callback();
}
};
var phoneNum = (rule, value, callback) => {
var x = /((\d{11})|^((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1}))$)/g.test(value);
if (!x) {
callback(new Error('联系电话格式错误!'));
} else {
callback();
}
};
return {
tableData: [
],
labelPosition: 'right',
apply: {
orderType: "zzdd",
contacts: '',
mobile: '',
email: '',
notes: ''
},
applyRules: {
contacts: [
{ required: true, message: '请输入姓名', trigger: 'blur', validator: name },
],
mobile: [
{ required: true, message: '请输入正确电话号码', trigger: 'change', validator: phoneNum }
],
},
checkImg: false,
num: null,
params: {
itemCode: "",
order_appendinfo: {
level: "",
area_list: [],
department_list: [],
type_list: []
},
apply: {
orderType: "zzdd",
contacts: "",
mobile: "",
email: "",
notes: ""
},
tm: {
totalSum: null,
},
},
serviceName:"",
}
},
mounted: function() {
console.log(Number(this.$route.query.sdsId), `llllllkkkkkkkkkkkkkkkkkkkkkk`);
this.num = Number(this.$route.query.num);
this.getProduct();
console.log(this.$route.query);
/**
*
$("#app-header").hide();
*
*/
},
created: function() {
},
methods: {
goOrder(){
let that = this;
this.params.tm.totalSum = this.tableData[0].countPrice;
this.params.tm.salesNum = Number(this.$route.query.num);
this.apply.orderType = "zzdd";
this.params.apply = this.apply;
this.params.itemCode = this.tableData[0].code;
this.$root.postReq("/web/orderCtl/createOtherOrder", this.params).then((d) => {
console.log("---------submitOrder-------");
if (this.$store.state.currentUser == null){
this.$message.warning("未登录");
return
}
if (d.code == 1) {
this.$root.pushx({
title: "订单支付",
name: "/orderpay",
params: { orderNum: d.data.code }
});
} else {
this.$message.warning(d.msg);
}
}).catch((e) => {
console.log(e);
})
},
getProduct(){
var sdsId = window.location.href.split("sdsId=")[1];
var that = this;
this.$root.getReq("/web/serviceitemCtl/findOneById", { id: sdsId }).then(function (d) {
if (d.code == 1) {
var data = d.data;
console.log(d.data);
d.data.num = that.$route.query.num;
d.data.countPrice = (d.data.serviceCharge + d.data.publicExpense) * Number(that.$route.query.num);
that.tableData.push(d.data);
console.log("返回信息", that.tableData);
that.serviceName = d.data.name;
}
});
},
tiaozhuan(path, name, params) {
this.$root.pushx({
title: name,
name: path,
params: {
isDirectJump: 1,
sdsId: this.$route.query.sdsId
}
});
},
},
computed: {
},
vname: "gsb-nowbuy"
}
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
付款账户为公司账户,则可以为付款的公司账户开具发票;如果是个人账户,则只能为付款人或申请人开具发票,请选择合适的付款账户。</div> 付款账户为公司账户,则可以为付款的公司账户开具发票;如果是个人账户,则只能为付款人或申请人开具发票,请选择合适的付款账户。</div>
</el-row> </el-row>
</div> </div>
<div v-if="orderInfo.sveItemCode==\'zzsbzc\'"> <div v-if="1">
<div style="clear:both;width: 100%;height: 20px;"></div> <div style="clear:both;width: 100%;height: 20px;"></div>
<el-row :gitter="20" style="margin-top:20px;font-size: 12px;font-weight:400;padding-left: 15px;"> <el-row :gitter="20" style="margin-top:20px;font-size: 12px;font-weight:400;padding-left: 15px;">
<div class="el5"> <div class="el5">
......
{ {
template: '${tmpl}', template: '${tmpl}',
data: function () { data: function () {
return { return {
imgHeight: null, imgHeight: null,
orderNum: "", orderNum: "",
orderInfo: {}, orderInfo: {},
payType: "wx", payType: "wx",
d: {}, d: {},
action: "", action: "",
zfpzUrl: "", zfpzUrl: "",
accounts: [], accounts: [],
account_id: "", account_id: "",
account_index: "", account_index: "",
accountinfo: {}, accountinfo: {},
qrcode: "", qrcode: "",
tradekey: "", tradekey: "",
time: "", time: "",
interval: null, interval: null,
roleList: null, roleList: null,
isBizemp: false, isBizemp: false,
loading: false, loading: false,
payOrderType: false, payOrderType: false,
email: "", email: "",
poliyLevel: "", poliyLevel: "",
address: "", address: "",
Deparment: "", Deparment: "",
industry: "", industry: "",
period:"3个月", period: "3个月",
} }
}, },
mounted: function () { mounted: function () {
this.imgHeight = 'min-height:' + (document.documentElement.clientHeight - 221) + "px;"; this.imgHeight = 'min-height:' + (document.documentElement.clientHeight - 221) + "px;";
var currentUser = this.currentUser; var currentUser = this.currentUser;
......
.common-paysuccess{
width: 1200px;
margin: 0 auto;
}
.common-paysuccess-main{
margin-left: 195px;
}
.common-paysuccess-img{
width: 140px;
height: 140px;
display: inline-block;
}
.common-paysuccess-img>img{
width: 100%;
height: 100%;
}
.common-paysuccess-main{
margin-top: 120px;
}
.common-paysuccess-main>div:nth-child(2){
display: inline-block;
}
\ No newline at end of file
<div class="common-paysuccess-warpper">
<div class="common-paysuccess">
<div class="common-paysuccess-main">
<div class="common-paysuccess-img"> <img src="/imgs/paysuccess.png" alt=""> </div>
<div>
<h1>支付成功</h1>
<p>您已成功支付¥798.00元 订单编号:<span>订单编号:11114012410250810824</span></p>
<p></p>
</div>
</div>
<div class="common-paysuccess-footer"></div>
</div>
</div>
\ No newline at end of file
{
template: '${tmpl}',
data: function() {
return {
ldms: [],
phone:'',
orderIndent:''
}
},
mounted: function() {
this.$root.getChannelPath();
},
created: function() {
},
methods: {
push(){
var obj = this.$root.copyParams({"buyerMoblie":this.phone,"channelServiceNo":this.orderIndent},"pushFqBusiness","/action/tmOrder/springBoard",);
this.$root.postReq("/web/trademark/tmqueryCtl/doPost", obj).then((d)=>{
console.log(d.data);
console.log(d.msg);
});
}
},
vname: "gsb-paysuccess"
}
...@@ -2,42 +2,46 @@ ...@@ -2,42 +2,46 @@
<div style="width:100%;margin: 0 auto;"> <div style="width:100%;margin: 0 auto;">
<div style="z-index:1;position:relative;background-color:#31373b"> <div style="z-index:1;position:relative;background-color:#31373b">
<img style="width:100%;height:auto" :src="loginUrl" /> <img style="width:100%;height:auto" :src="loginUrl" />
<div class="login-title" v-if="companyinfo.company.siteTheme == \'policy\'"> <!-- <div class="login-title" v-if="companyinfo.company.siteTheme == \'policy\'">
<span class="tong">政企通</span> <span class="tong">政企通</span>
<span class="shujuzi">政策大数据服务平台</span> <span class="shujuzi">政策大数据服务平台</span>
</div> </div> -->
<div class="login-div" v-if="a"> <div class="login-div" v-if="a">
<div class="login-content" style="width: 380px; <div class="login-content" style="width: 380px;
height: 508px; height: 508px;
background: rgba(255,255,255,1); background: rgba(255,255,255,1);
border: 1px solid rgba(151,151,151,1);"> border: 1px solid rgba(151,151,151,1);">
<div class="logins-title"> <div class="logins-title">
欢迎注册 欢迎注册
</div> </div>
<!-- 验证码登录 --> <!-- 验证码登录 -->
<div v-if="activeIndex==1" class="login-content-inputs"> <div v-if="activeIndex==1" class="login-content-inputs">
<el-form ref="form1" :rules="rules1" :model="form1" label-width="0px" key="1"> <el-form ref="form1" :rules="rules1" :model="form1" label-width="0px" key="1">
<el-form-item> <el-form-item>
<el-input v-model="form1.username" placeholder="请输入企业名称"> <i slot="prefix" class="el-input__icon el-icon-tickets"></i></el-input> <el-input v-model="form1.username" placeholder="请输入企业名称"> <i slot="prefix"
</el-form-item> class="el-input__icon el-icon-tickets"></i></el-input>
</el-form-item>
<el-form-item prop="mobile"> <el-form-item prop="mobile">
<el-input v-model="form1.mobile" placeholder="请输入11位手机号码"><i slot="prefix" class="el-input__icon el-icon-mobile-phone"></i></el-input> <el-input v-model="form1.mobile" placeholder="请输入11位手机号码"><i slot="prefix"
class="el-input__icon el-icon-mobile-phone"></i></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="password"> <el-form-item prop="password">
<el-input type="password" v-model="form1.password" placeholder="请输入登录密码"><i slot="prefix" class="el-input__icon el-icon-view"></i></el-input> <el-input type="password" v-model="form1.password" placeholder="请输入登录密码"><i slot="prefix"
</el-form-item> class="el-input__icon el-icon-view"></i></el-input>
</el-form-item>
<el-form-item prop="code"> <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-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="loginCode" type="primary" plain style="width:135px;background: rgba(18,142,233,1); <el-button id="loginCode" type="primary" plain style="width:135px;background: rgba(18,142,233,1);
color: rgba(255,255,255,1);" color: rgba(255,255,255,1);" @click="obtaincode1">
@click="obtaincode1">
获取验证码</el-button> 获取验证码</el-button>
</el-form-item> </el-form-item>
<div class="zhanghao">已有账号? <div class="zhanghao">已有账号?
<span style="color:#108EE9;cursor:pointer" @click="login">立即登录</span> <span style="color:#108EE9;cursor:pointer" @click="login">立即登录</span>
</div> </div>
<el-form-item style="margin-bottom:8px;"> <el-form-item style="margin-bottom:8px;">
<el-button type="primary" class="login-content-button" @click="checklogin1" style="margin-top: 45px;">注 册</el-button> <el-button type="primary" class="login-content-button" @click="checklogin1" style="margin-top: 45px;">
</el-button>
</el-form-item> </el-form-item>
<div style="font-size: 12px; <div style="font-size: 12px;
color: rgb(130, 130, 130); color: rgb(130, 130, 130);
...@@ -84,8 +88,8 @@ ...@@ -84,8 +88,8 @@
</el-form-item> </el-form-item>
<el-form-item prop="code"> <el-form-item prop="code">
<el-input style="width:120px;" v-model="form3.code" placeholder="请输入验证码"></el-input> <el-input style="width:120px;" v-model="form3.code" placeholder="请输入验证码"></el-input>
<el-button id="resetCode" type="primary" plain style="width:135px;"submitregister <el-button id="resetCode" type="primary" plain style="width:135px;" submitregister @click="obtaincode2">
@click="obtaincode2">获取验证码</el-button> 获取验证码</el-button>
</el-form-item> </el-form-item>
<el-form-item prop="password"> <el-form-item prop="password">
<el-input type="password" v-model="form3.password" placeholder="请设置6-18位密码"></el-input> <el-input type="password" v-model="form3.password" placeholder="请设置6-18位密码"></el-input>
...@@ -114,8 +118,8 @@ ...@@ -114,8 +118,8 @@
</el-form-item> </el-form-item>
<el-form-item prop="code"> <el-form-item prop="code">
<el-input style="width:120px;" v-model="form4.code" placeholder="请输入验证码"></el-input> <el-input style="width:120px;" v-model="form4.code" placeholder="请输入验证码"></el-input>
<el-button id="registerCode" type="primary" plain style="width:135px;" <el-button id="registerCode" type="primary" plain style="width:135px;" @click="obtaincode3">获取验证码
@click="obtaincode3">获取验证码</el-button> </el-button>
</el-form-item> </el-form-item>
<el-form-item prop="password"> <el-form-item prop="password">
<el-input type="password" v-model="form4.password" placeholder="请设置6-18位密码,区分大小写"></el-input> <el-input type="password" v-model="form4.password" placeholder="请设置6-18位密码,区分大小写"></el-input>
...@@ -144,5 +148,4 @@ ...@@ -144,5 +148,4 @@
<el-button slot="buttonarea" style="width:80%" type="primary" @click="sbhandler">登录</el-button> <el-button slot="buttonarea" style="width:80%" type="primary" @click="sbhandler">登录</el-button>
</gsb-form> </gsb-form>
</div> </div>
</gsb-pcpage> --> </gsb-pcpage> -->
\ No newline at end of file
{ {
template:'${tmpl}', template: '${tmpl}',
data:function(){ data: function() {
var that=this; var that = this;
var validateMethod=function(rule, value, callback){ var validateMethod = function (rule, value, callback) {
console.log(rule); console.log(rule);
if(rule.field=="mobile"){ if (rule.field == "mobile") {
if(/^1[23456789]\d{9}$/.test(value) == false){ if (/^1[23456789]\d{9}$/.test(value) == false) {
return callback(new Error("请输入正确格式的手机号")); return callback(new Error("请输入正确格式的手机号"));
}else{ } else {
return callback(); return callback();
} }
} }
if(rule.field=="code"){ if (rule.field == "code") {
if(that.rcode!=value){ if (that.rcode != value) {
return callback(new Error("输入验证码有误,请重新输入")); return callback(new Error("输入验证码有误,请重新输入"));
} }
} }
return callback(); return callback();
}; };
return { return {
ldms:[], ldms: [],
activeIndex:"1", activeIndex: "1",
loginUrl:"", loginUrl: "",
form1:{ form1: {
mobile:"", mobile: "",
password:"", password: "",
code:"", code: "",
}, },
form2:{ form2: {
username:"", username: "",
password:"", password: "",
}, },
form3:{ form3: {
mobile:"", mobile: "",
code:"", code: "",
password:"", password: "",
}, },
form4:{ form4: {
mobile:"", mobile: "",
code:"", code: "",
password:"", password: "",
}, },
a:true, a: true,
b:false, b: false,
c:false, c: false,
Num:60, Num: 60,
Num2:60, Num2: 60,
Num3:60, Num3: 60,
rcode:"", rcode: "",
rules1:{ rules1: {
username: [ username: [
{required: true, message: '请输入账号', trigger: 'blur' }, { required: true, message: '请输入账号', trigger: 'blur' },
], ],
password: [ password: [
{ required: true, message: '请输入密码', trigger: 'blur' }, { required: true, message: '请输入密码', trigger: 'blur' },
], ],
mobile: [ mobile: [
{required: true, message: '请输入手机号', trigger: 'blur' }, { required: true, message: '请输入手机号', trigger: 'blur' },
{ validator: validateMethod, trigger: 'blur' }, { validator: validateMethod, trigger: 'blur' },
], ],
code: [ code: [
{required: true, message: '请输入手机接收到的验证码', trigger: 'blur' }, { required: true, message: '请输入手机接收到的验证码', trigger: 'blur' },
{ validator: validateMethod, trigger: 'blur' }, { validator: validateMethod, trigger: 'blur' },
], ],
}, },
rules2:{ rules2: {
username: [ username: [
{required: true, message: '请输入账号', trigger: 'blur' }, { required: true, message: '请输入账号', trigger: 'blur' },
], ],
password: [ password: [
{required: true, message: '请输入密码', trigger: 'blur' }, { required: true, message: '请输入密码', trigger: 'blur' },
], ],
}, },
rules3:{ rules3: {
mobile: [ mobile: [
{required: true, message: '请输入手机号', trigger: 'blur' }, { required: true, message: '请输入手机号', trigger: 'blur' },
{ validator: validateMethod, trigger: 'blur' }, { validator: validateMethod, trigger: 'blur' },
], ],
code: [ code: [
{required: true, message: '请输入手机接收到的验证码', trigger: 'blur' }, { required: true, message: '请输入手机接收到的验证码', trigger: 'blur' },
{ validator: validateMethod, trigger: 'blur' }, { validator: validateMethod, trigger: 'blur' },
], ],
password: [ password: [
{required: true, message: '请输入密码', trigger: 'blur' }, { required: true, message: '请输入密码', trigger: 'blur' },
{ min: 6, max: 18, message: '长度在 6 到 18 个字符', trigger: 'blur' } { min: 6, max: 18, message: '长度在 6 到 18 个字符', trigger: 'blur' }
], ],
}, },
rules4:{ rules4: {
mobile: [ mobile: [
{required: true, message: '请输入手机号', trigger: 'blur' }, { required: true, message: '请输入手机号', trigger: 'blur' },
{ validator: validateMethod, trigger: 'blur' }, { validator: validateMethod, trigger: 'blur' },
], ],
code: [ code: [
{required: true, message: '请输入手机接收到的验证码', trigger: 'blur' }, { required: true, message: '请输入手机接收到的验证码', trigger: 'blur' },
{ validator: validateMethod, trigger: 'blur' } { validator: validateMethod, trigger: 'blur' }
], ],
password: [ password: [
{required: true, message: '请输入密码', trigger: 'blur' }, { required: true, message: '请输入密码', trigger: 'blur' },
{ min: 6, max: 18, message: '长度在 6 到 18 个字符', trigger: 'blur' } { min: 6, max: 18, message: '长度在 6 到 18 个字符', trigger: 'blur' }
], ],
}, },
} }
},
mounted: function() {
}, },
mounted:function(){ created: function() {
},
created:function(){
console.log(this.pfooterinfo); console.log(this.pfooterinfo);
if(this.pfooterinfo&&this.pfooterinfo.loginUrl){ if (this.pfooterinfo && this.pfooterinfo.loginUrl) {
this.loginUrl=this.pfooterinfo.loginUrl; this.loginUrl = this.pfooterinfo.loginUrl;
}else{ } else {
this.loginUrl="https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_41110157500594182420192913391824zhuce_background.png"; this.loginUrl = "https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_41110157500594182420192913391824zhuce_background.png";
} }
}, },
methods:{ methods: {
handleSelect(key, keyPath) { handleSelect(key, keyPath) {
console.log(key, keyPath); console.log(key, keyPath);
this.activeIndex=key; this.activeIndex = key;
}, },
resetall(){ resetall(){
this.form1.mobile=""; this.form1.mobile = "";
this.form1.code=""; this.form1.code = "";
this.form2.username=""; this.form2.username = "";
this.form2.password=""; this.form2.password = "";
this.form3.mobile=""; this.form3.mobile = "";
this.form3.code=""; this.form3.code = "";
this.form3.password=""; this.form3.password = "";
this.form4.mobile=""; this.form4.mobile = "";
this.form4.code=""; this.form4.code = "";
this.form4.password=""; this.form4.password = "";
}, },
rsetpassword(){ rsetpassword(){
this.a=false; this.a = false;
this.b=true; this.b = true;
this.c=false; this.c = false;
this.rcode=""; this.rcode = "";
this.resetall(); this.resetall();
}, },
login(){ login(){
this.$root.pushx({ switch (this.$root.channelName) {
title: "登录", case "bw":
name: "/login" this.$router.push({ path: `/bw/login` });
}); break;
this.a=true;
this.b=false; default:
this.c=false; break;
this.rcode=""; }
this.resetall();
}, this.a = true;
register(){ this.b = false;
this.a=false; this.c = false;
this.b=false; this.rcode = "";
this.c=true; this.resetall();
this.rcode=""; },
this.resetall(); register(){
}, this.a = false;
obtaincode1(){ this.b = false;
this.fetchVcode(this.form1.mobile) this.c = true;
}, this.rcode = "";
obtaincode2(){ this.resetall();
var that=this; },
if(/^1[23456789]\d{9}$/.test(that.form3.mobile) == false){ obtaincode1(){
that.$alert('请输入正确格式的手机号码', '提示', { this.fetchVcode(this.form1.mobile)
confirmButtonText: '确定', },
callback: action => { obtaincode2(){
} var that = this;
}); if (/^1[23456789]\d{9}$/.test(that.form3.mobile) == false) {
return; that.$alert('请输入正确格式的手机号码', '提示', {
}; confirmButtonText: '确定',
that.$root.postReq("/web/userCtl/getUserByMobile",{mobile:that.form3.mobile}).then(function(d){ callback: action => {
if(d.code==0){ }
var timer= setInterval(function () { });
console.log("----------getNumber-----------"); return;
$("#resetCode").attr("disabled", "disabled"); };
$("#resetCode").css("cursor", "not-allowed"); that.$root.postReq("/web/userCtl/getUserByMobile", { mobile: that.form3.mobile }).then(function (d) {
$("#resetCode").text(that.Num2 + "秒后重新获取"); if (d.code == 0) {
var timer = setInterval(function () {
console.log("----------getNumber-----------");
$("#resetCode").attr("disabled", "disabled");
$("#resetCode").css("cursor", "not-allowed");
$("#resetCode").text(that.Num2 + "秒后重新获取");
console.log(that.Num2);
if (that.Num2 > 0) {
console.log(that.Num2); console.log(that.Num2);
if (that.Num2 > 0) { that.Num2--;
console.log(that.Num2); } else {
that.Num2--; $("#resetCode").attr("disabled", false);
}else{ $("#resetCode").text("获取验证码");
$("#resetCode").attr("disabled", false); that.Num2 = 60;
$("#resetCode").text("获取验证码"); clearInterval(timer);
that.Num2 = 60; }
clearInterval(timer); }, 1000);
} that.$root.postReq("/web/userCtl/fetchVcode", { mobile: that.form3.mobile }).then(function (d) {
},1000); console.log(d);
that.$root.postReq("/web/userCtl/fetchVcode",{mobile:that.form3.mobile}).then(function(d){ if (d.status == 0) {
that.rcode = d.data.vcodestr;
}
})
} else {
that.$message({
type: 'error',
message: '用户尚未注册'
});
}
})
},
obtaincode3(){
var that = this;
if (/^1[23456789]\d{9}$/.test(that.form4.mobile) == false) {
that.$alert('请输入正确格式的手机号码', '提示', {
confirmButtonText: '确定',
callback: action => {
}
});
return;
};
that.$root.postReq("/web/userCtl/getUserByMobile", { mobile: that.form4.mobile }).then(function (d) {
if (d.code == -1) {
var timer = setInterval(function () {
console.log("----------getNumber-----------");
$("#registerCode").attr("disabled", "disabled");
$("#registerCode").css("cursor", "not-allowed");
$("#registerCode").text(that.Num3 + "秒后重新获取");
console.log(that.Num3);
if (that.Num3 > 0) {
console.log(that.Num3);
that.Num3--;
} else {
$("#registerCode").attr("disabled", false);
$("#registerCode").text("获取验证码");
that.Num3 = 60;
clearInterval(timer);
}
}, 1000);
that.$root.postReq("/web/userCtl/fetchVcode", { mobile: that.form4.mobile }).then(function (d) {
if (d.status == 0) {
console.log(d); console.log(d);
if(d.status==0){ that.rcode = d.data.vcodestr;
that.rcode=d.data.vcodestr; }
} })
}) } else {
}else{ that.$message({
that.$message({ type: 'error',
message: '用户已存在, 请修改并重试'
});
}
})
},
checklogin1(){
var that = this;
var obj = {
mobile: that.form1.mobile,
password: that.form1.password,
};
that.$refs.form1.validate(valid => {
if (valid) {
that.$root.postReq("/web/userCtl/loginByMobile", { u: obj }).then(function (d) {
if (d.status == 0) {
console.log("..................................................helllo..................................");
that.$root.refreshLoginState(() => {
console.log("....................................................................................innner");
var afto = localStorage.getItem("afterLogin");
if (afto) {
that.$root.pushx(JSON.parse(afto));
localStorage.removeItem("afterLogin");
that.$root.removetab("/login");
} else {
location.reload();
that.$root.pushx({
title: "首页",
name: "/"
})
}
});
}
})
} else {
console.log('输入有误')
}
})
},
checklogin2(){
var that = this;
var obj = {
userName: that.form2.username,
password: that.form2.password
};
that.$refs.form2.validate(valid => {
if (valid) {
that.$root.postReq("/web/userCtl/login", { u: obj }).then(function (d) {
if (d.status == 0) {
that.$root.refreshLoginState(() => {
console.log("....................................................................................innner");
var afto = localStorage.getItem("afterLogin");
if (afto) {
that.$root.pushx(JSON.parse(afto));
localStorage.removeItem("afterLogin");
that.$root.removetab("/login");
} else {
location.reload();
}
});
} else {
that.$message({
type: 'error', type: 'error',
message: '用户尚未注册' message: '用户名或密码错误,请重试.'
}); });
} }
}) })
}, }
obtaincode3(){ });
var that=this; },
if(/^1[23456789]\d{9}$/.test(that.form4.mobile) == false){ sumbitreset(){
that.$alert('请输入正确格式的手机号码', '提示', { var that = this;
confirmButtonText: '确定', var obj = {
callback: action => { mobile: this.form3.mobile,
} password: this.form3.password
}); };
return; that.$refs.form3.validate(valid => {
}; if (valid) {
that.$root.postReq("/web/userCtl/getUserByMobile",{mobile:that.form4.mobile}).then(function(d){ that.$root.postReq("/web/userCtl/resetPassword", obj).then(function (d) {
if(d.code==-1){ if (d.status == 0) {
var timer= setInterval(function () { that.$message({
console.log("----------getNumber-----------"); type: 'success',
$("#registerCode").attr("disabled", "disabled"); message: '密码重置成功'
$("#registerCode").css("cursor", "not-allowed"); });
$("#registerCode").text(that.Num3 + "秒后重新获取"); }
console.log(that.Num3); })
if (that.Num3 > 0) { }
console.log(that.Num3); })
that.Num3--; },
}else{ submitregister(){
$("#registerCode").attr("disabled", false); var that = this;
$("#registerCode").text("获取验证码"); var obj = {
that.Num3 = 60; mobile: this.form4.mobile,
clearInterval(timer); password: this.form4.password
} };
},1000); that.$refs.form4.validate(valid => {
that.$root.postReq("/web/userCtl/fetchVcode",{mobile:that.form4.mobile}).then(function(d){ if (valid) {
if(d.status==0){ that.$root.postReq("/web/userCtl/submitregister", obj).then(function (d) {
console.log(d); if (d.status == 0) {
that.rcode=d.data.vcodestr; that.$message({
} type: 'success',
}) message: '注册成功,请登录'
}else{ });
that.$message({ that.login();
} else if (d.status == 1) {
that.$message({
type: 'error', type: 'error',
message: '用户已存在, 请修改并重试' message: '该手机号码已注册'
}); });
} }
}) })
}
}, })
checklogin1(){ },
var that=this; fetchVcode(mobilenum){
var obj={ var that = this;
mobile:that.form1.mobile, if (/^1[23456789]\d{9}$/.test(mobilenum) == false) {
password:that.form1.password, this.$alert('请输入正确格式的手机号码', '提示', {
}; confirmButtonText: '确定',
callback: action => {
that.$refs.form1.validate(valid=>{
if(valid){
that.$root.postReq("/web/userCtl/loginByMobile",{u:obj}).then(function(d){
if(d.status==0){
console.log("..................................................helllo..................................");
that.$root.refreshLoginState(()=>{
console.log("....................................................................................innner");
var afto=localStorage.getItem("afterLogin");
if(afto){
that.$root.pushx(JSON.parse(afto));
localStorage.removeItem("afterLogin");
that.$root.removetab("/login");
}else{
location.reload();
that.$root.pushx({
title: "首页",
name: "/"
})
}
});
}
})
}else {
console.log('输入有误')
}
})
},
checklogin2(){
var that=this;
var obj={
userName:that.form2.username,
password:that.form2.password
};
that.$refs.form2.validate(valid=>{
if(valid){
that.$root.postReq("/web/userCtl/login",{u:obj}).then(function(d){
if(d.status==0){
that.$root.refreshLoginState(()=>{
console.log("....................................................................................innner");
var afto=localStorage.getItem("afterLogin");
if(afto){
that.$root.pushx(JSON.parse(afto));
localStorage.removeItem("afterLogin");
that.$root.removetab("/login");
}else{
location.reload();
}
});
}else{
that.$message({
type: 'error',
message: '用户名或密码错误,请重试.'
});
}
})
} }
}); });
}, return;
sumbitreset(){ };
var that=this; var timer = setInterval(function () {
var obj={ console.log("----------getNumber-----------");
mobile:this.form3.mobile, $("#loginCode").attr("disabled", "disabled");
password:this.form3.password $("#loginCode").css("cursor", "not-allowed");
}; $("#loginCode").text(that.Num + "秒后重新获取");
that.$refs.form3.validate(valid=>{ console.log(that.Num);
if(valid){ if (that.Num > 0) {
that.$root.postReq("/web/userCtl/resetPassword",obj).then(function(d){
if(d.status==0){
that.$message({
type: 'success',
message: '密码重置成功'
});
}
})
}
})
},
submitregister(){
var that=this;
var obj={
mobile:this.form4.mobile,
password:this.form4.password
};
that.$refs.form4.validate(valid=>{
if(valid){
that.$root.postReq("/web/userCtl/submitregister",obj).then(function(d){
if(d.status==0){
that.$message({
type: 'success',
message: '注册成功,请登录'
});
that.login();
}else if(d.status==1){
that.$message({
type: 'error',
message: '该手机号码已注册'
});
}
})
}
})
},
fetchVcode(mobilenum){
var that=this;
if(/^1[23456789]\d{9}$/.test(mobilenum) == false){
this.$alert('请输入正确格式的手机号码', '提示', {
confirmButtonText: '确定',
callback: action => {
}
});
return;
};
var timer= setInterval(function () {
console.log("----------getNumber-----------");
$("#loginCode").attr("disabled", "disabled");
$("#loginCode").css("cursor", "not-allowed");
$("#loginCode").text(that.Num + "秒后重新获取");
console.log(that.Num); console.log(that.Num);
if (that.Num > 0) { that.Num--;
console.log(that.Num); } else {
that.Num--; $("#loginCode").attr("disabled", false);
}else{ $("#loginCode").text("获取验证码");
$("#loginCode").attr("disabled", false); that.Num = 60;
$("#loginCode").text("获取验证码"); clearInterval(timer);
that.Num = 60; }
clearInterval(timer); }, 1000);
} this.$root.postReq("/web/userCtl/fetchVcode", { mobile: mobilenum }).then(function (d) {
},1000); if (d.status == 0) {
this.$root.postReq("/web/userCtl/fetchVcode",{mobile:mobilenum}).then(function(d){ that.rcode = d.data.vcodestr;
if(d.status==0){ }
that.rcode=d.data.vcodestr; })
}
})
}, },
validmethod:function (rule,value,callback) { validmethod: function (rule, value, callback) {
console.log("code validdate"); console.log("code validdate");
var self=this; var self = this;
var fm=this.currentFrm.getFormModel(); var fm = this.currentFrm.getFormModel();
return callback(); return callback();
}, },
sbhandler:function () { sbhandler: function () {
var self=this; var self = this;
var fm=this.$refs.loginFrm.getFormModel(); var fm = this.$refs.loginFrm.getFormModel();
this.$refs.loginFrm.validate(function(v){ this.$refs.loginFrm.validate(function (v) {
if(v){ if (v) {
self.$root.postReq("/web/userCtl/login",{u:fm}).then(function(d){ self.$root.postReq("/web/userCtl/login", { u: fm }).then(function (d) {
if(d.status==0){ if (d.status == 0) {
console.log("...................................................................................."); console.log("....................................................................................");
self.$root.refreshLoginState(()=>{ self.$root.refreshLoginState(() => {
console.log("....................................................................................innner"); console.log("....................................................................................innner");
var afto=localStorage.getItem("afterLogin"); var afto = localStorage.getItem("afterLogin");
if(afto){ if (afto) {
self.$root.pushx(JSON.parse(afto)); self.$root.pushx(JSON.parse(afto));
localStorage.removeItem("afterLogin"); localStorage.removeItem("afterLogin");
self.$root.removetab("/login"); self.$root.removetab("/login");
}else{ } else {
location.reload(); location.reload();
} }
}); });
}else{ } else {
self.$message({ self.$message({
type: 'error', type: 'error',
message: '用户名或密码错误,请重试.' message: '用户名或密码错误,请重试.'
}); });
} }
});
}
}); });
}, }
});
},
}, },
vname:"gsb-login" vname: "gsb-login"
} }
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