Commit 1f3b63a1 by 刘泽奇

123

parent c8d8d227
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -86,7 +86,7 @@ axios.get("/web/common/metaCtl/getRouteConfig").then(d => { ...@@ -86,7 +86,7 @@ axios.get("/web/common/metaCtl/getRouteConfig").then(d => {
} }
next(); next();
}); });
Vue.use(window['vue-cropper']); Vue.use(window['vue-cropper']);
var app = new Vue({ var app = new Vue({
el: "#app", el: "#app",
...@@ -183,15 +183,17 @@ axios.get("/web/common/metaCtl/getRouteConfig").then(d => { ...@@ -183,15 +183,17 @@ axios.get("/web/common/metaCtl/getRouteConfig").then(d => {
created() { created() {
$("#app").css("visibility", 'visible'); $("#app").css("visibility", 'visible');
this.loading = false; this.loading = false;
this.channelName = location.hash.split('/')[1];
this.accessTitle();
}, },
updated() { updated() {
}, },
mounted() { mounted() {
this.channelName = location.hash.split('/')[1];
this.$nextTick(() => { this.$nextTick(() => {
this.handleHeader(); this.handleHeader();
}); });
console.log($.fn.jquery, "vvvvvvvvvvvvvvvvv"); console.log($.fn.jquery, "vvvvvvvvvvvvvvvvv");
var self = this; var self = this;
......
...@@ -157,9 +157,8 @@ ...@@ -157,9 +157,8 @@
}, },
created: function() { created: function() {
this.$root.channelName = location.hash.split('/')[1]; this.$root.channelName = location.hash.split('/')[1];
localStorage.channelName = this.$root.channelName;
}, },
methods: { methods: {
getChannerBanner(){ getChannerBanner(){
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
<div class="login-div" v-show="a"> <div class="login-div" v-show="a">
<div class="login-content" id="baoguo" style="height:auto;"> <div class="login-content" id="baoguo" style="height:auto;">
<div style="margin-top: 30px; <div style="margin-top: 30px;
padding-left: 28px;"> padding-left: 28px;">
<el-menu :default-active="activeIndex" mode="horizontal" @select="handleSelect" style="border:none"> <el-menu :default-active="activeIndex" mode="horizontal" @select="handleSelect" style="border:none">
...@@ -85,8 +84,8 @@ ...@@ -85,8 +84,8 @@
<el-input v-model="form3.mobile" placeholder="请输入手机号码"></el-input> <el-input v-model="form3.mobile" placeholder="请输入手机号码"></el-input>
</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:140px;" v-model="form3.code" placeholder="请输入验证码"></el-input>
<el-button id="resetCode" type="primary" plain style="width:135px;" <el-button id="resetCode" type="primary" style="width:135px;"
@click="obtaincode2">获取验证码</el-button> @click="obtaincode2">获取验证码</el-button>
</el-form-item> </el-form-item>
<el-form-item prop="password"> <el-form-item prop="password">
...@@ -103,38 +102,7 @@ ...@@ -103,38 +102,7 @@
</div> </div>
</div> </div>
</div> </div>
<!-- 用户注册 -->
<div class="login-div" v-show="c">
<div class="login-content">
<div class="login-content-title">
欢迎注册{{ this.$root.currentCompany?this.$root.currentCompany.sitename:"知圈圈"}}
</div>
<div class="login-content-input">
<el-form ref="form4" :rules="rules4" :model="form4" label-width="0px" key="4">
<el-form-item prop="mobile">
<el-input v-model="form4.mobile" placeholder="请输入手机号码"></el-input>
</el-form-item>
<el-form-item prop="code">
<el-input style="width:120px;" v-model="form4.code" placeholder="请输入验证码"></el-input>
<el-button id="registerCode" type="primary" plain style="width:135px;"
@click="obtaincode3">获取验证码</el-button>
</el-form-item>
<el-form-item prop="password">
<el-input type="password" v-model="form4.password" placeholder="请设置6-18位密码,区分大小写"></el-input>
</el-form-item>
<el-form-item style="margin-bottom:8px;">
<el-button type="primary" class="login-content-button" @click="submitregister">注册</el-button>
</el-form-item>
<div style="font-size:12px;color:#828282">点击“登录”即表示同意
<span style="color:#108EE9">《创知厚德用户协议》</span>
</div>
<div style="font-size:12px;color:#B2B2B2;margin-top:26px;">已有账户?
<span style="color:#108EE9;cursor:pointer" @click="login">去登录</span>
</div>
</el-form>
</div>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -179,6 +179,7 @@ ...@@ -179,6 +179,7 @@
}, 1000); }, 1000);
console.log("返回信息", d); console.log("返回信息", d);
} else { } else {
this.$message(d.msg);
console.log(d.msg); console.log(d.msg);
} }
}); });
...@@ -201,63 +202,19 @@ ...@@ -201,63 +202,19 @@
let date = 60; let date = 60;
this.vCodeClick = true; this.vCodeClick = true;
let timer = setInterval(() => { let timer = setInterval(() => {
$('.resetCode').text(date--); $('#resetCode').text(date--);
if (date < 1) { if (date < 1) {
clearInterval(timer); clearInterval(timer);
this.vCodeClick = false; this.vCodeClick = false;
$('#loginCode').text('获取验证码'); $('#resetCode').text('获取验证码');
} }
}, 1000); }, 1000);
console.log("返回信息", d); console.log("返回信息", d);
} else { } else {
console.log(d.msg); console.log(d.msg);
this.$message(d.msg);
} }
}); });
},
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);
that.rcode = d.data.vcodestr;
}
})
} else {
that.$message({
type: 'error',
message: '用户已存在, 请修改并重试'
});
}
})
}, },
checklogin1(){ checklogin1(){
var that = this; var that = this;
...@@ -278,13 +235,12 @@ ...@@ -278,13 +235,12 @@
$.cookie('userpin', d.data.userpin); $.cookie('userpin', d.data.userpin);
this.$root.user_Name = d.data.userName; this.$root.user_Name = d.data.userName;
this.$root.channelUserId = d.data.channelUserId; this.$root.channelUserId = d.data.channelUserId;
if (!this.$store.state.reqUrl && this.$store.state.reqUrl != '/') { if (!this.$store.state.reqUrl || this.$store.state.reqUrl == '/' || this.$store.state.reqUrl == `/${this.$root.channelName}/register`) {
this.$router.push({ this.$router.push({
path: `/${this.$root.channelName}/jdtrademark`, path: `/${this.$root.channelName}/jdtrademark`,
query: { channelUserId: d.data.channelUserId } query: { channelUserId: d.data.channelUserId }
}) })
} else { } else {
this.$router.push({ this.$router.push({
path: `${this.$store.state.reqUrl}`, path: `${this.$store.state.reqUrl}`,
query: { channelUserId: d.data.channelUserId } query: { channelUserId: d.data.channelUserId }
...@@ -332,7 +288,7 @@ ...@@ -332,7 +288,7 @@
$.cookie('userpin', d.data.userpin); $.cookie('userpin', d.data.userpin);
this.$root.user_Name = d.data.userName; this.$root.user_Name = d.data.userName;
this.$root.channelUserId = d.data.channelUserId; this.$root.channelUserId = d.data.channelUserId;
if (!this.$store.state.reqUrl || this.$store.state.reqUrl == '/') { if (!this.$store.state.reqUrl || this.$store.state.reqUrl == '/' || this.$store.state.reqUrl == `/${this.$root.channelName}/register`) {
this.$router.push({ this.$router.push({
path: `/${this.$root.channelName}/jdtrademark`, path: `/${this.$root.channelName}/jdtrademark`,
query: { channelUserId: d.data.channelUserId } query: { channelUserId: d.data.channelUserId }
......
...@@ -127,4 +127,13 @@ ...@@ -127,4 +127,13 @@
.nowbuy-form .el-textarea__inner { .nowbuy-form .el-textarea__inner {
width: 996px; width: 996px;
min-height: 105px !important; min-height: 105px !important;
}
.nowbuy-form .el-form-item__error{
color: #F56C6C;
font-size: 12px;
line-height: 1;
padding-top: 4px;
position: absolute;
top: 27%;
left: 34%;
} }
\ No newline at end of file
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
} }
}; };
return { return {
primary:'info', primary: 'info',
tableData: [ tableData: [
], ],
...@@ -75,44 +75,50 @@ ...@@ -75,44 +75,50 @@
methods: { methods: {
agreeContract(){ agreeContract(){
this.checkImg = !this.checkImg; this.checkImg = !this.checkImg;
if(this.checkImg){ if (this.checkImg) {
this.primary = 'primary'; this.primary = 'primary';
}else{ } else {
this.primary = 'info'; this.primary = 'info';
} }
}, },
goOrder(){ goOrder(){
this.params.tm.totalSum = this.tableData[0].countPrice; this.$refs.apply.validate((v) => {
this.params.tm.quantity = Number(this.$route.query.num); console.log(v);
this.apply.orderType = "zzdd"; if (v) {
this.params.apply = this.apply; this.params.tm.totalSum = this.tableData[0].countPrice;
this.params.itemCode = this.tableData[0].sdsId; this.params.tm.quantity = Number(this.$route.query.num);
if (this.$root.channelUserId && this.$root.channelUserId != "") { this.apply.orderType = "zzdd";
this.params.channelUser = { this.params.apply = this.apply;
"channelUserId": this.$root.channelUserId this.params.itemCode = this.tableData[0].sdsId;
}; if (this.$root.channelUserId && this.$root.channelUserId != "") {
} this.params.channelUser = {
var obj = this.$root.copyParams(this.params, "subOtherOrder", "/action/tmOrder/springBoard", 'yes', 'yes'); "channelUserId": this.$root.channelUserId
this.$root.postReq("/web/trademark/tmqueryCtl/doPost", obj).then((d) => { };
console.log("---------submitOrder-------"); }
if (this.$root.channelUserId == null) { var obj = this.$root.copyParams(this.params, "subOtherOrder", "/action/tmOrder/springBoard", 'yes', 'yes');
this.$message.warning("未登录"); this.$root.postReq("/web/trademark/tmqueryCtl/doPost", obj).then((d) => {
return console.log("---------submitOrder-------");
} if (this.$root.channelUserId == null) {
if (d.status == 0) { this.$message.warning("未登录");
console.log(d); return
this.$router.push({
path: `/${this.$root.channelName}/orderpay`,
query: {
orderNo: d.data.orderNo
} }
if (d.status == 0) {
console.log(d);
this.$router.push({
path: `/${this.$root.channelName}/orderpay`,
query: {
orderNo: d.data.orderNo
}
})
} else {
this.$message.warning(d.msg);
}
}).catch((e) => {
console.log(e);
}) })
} else {
this.$message.warning(d.msg);
} }
}).catch((e) => {
console.log(e);
}) })
}, },
getProduct(){ getProduct(){
var data = { ...this.$route.query }; var data = { ...this.$route.query };
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<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="loginCode" type="primary" plain style="width:135px;background: rgba(18,142,233,1); <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"> color: rgba(255,255,255,1);" :disabled="vCodeClick" @click="obtaincode1">
获取验证码</el-button> 获取验证码</el-button>
</el-form-item> </el-form-item>
...@@ -47,93 +47,10 @@ ...@@ -47,93 +47,10 @@
</div> </div>
</el-form> </el-form>
</div> </div>
<!-- 密码登录 -->
<div v-if="activeIndex==2" class="login-content-input">
<el-form ref="form2" :rules="rules2" :model="form2" label-width="0px" key="2">
<el-form-item prop="username">
<el-input v-model="form2.username" placeholder="请输入账号"></el-input>
</el-form-item>
<el-form-item prop="password">
<el-input type="password" v-model="form2.password" placeholder="请输入密码"></el-input>
</el-form-item>
<el-form-item style="margin-bottom:8px;">
<el-button type="primary" key="xxcccc" class="login-content-button" @click="checklogin2">登录</el-button>
</el-form-item>
<div style="font-size:12px;color:#828282">点击“登录”即表示同意
<span style="color:#108EE9">《创知厚德用户协议》</span>
</div>
<div style="font-size:12px;color:#B2B2B2;margin-top:26px;">还没有账户?
<span style="color:#108EE9;cursor:pointer" @click="register">立即注册</span>
<span style="margin:0 4px;">|</span>
<span style="color:#108EE9;cursor:pointer" @click="rsetpassword">忘记密码?</span>
</div>
</el-form>
</div>
</div>
</div>
<!-- 重置密码 -->
<div class="login-div" v-if="b">
<div class="login-content">
<div class="login-content-title">
重置密码
</div>
<div class="login-content-input">
<el-form ref="form3" :rules="rules3" :model="form3" label-width="0px" key="3">
<el-form-item prop="mobile">
<el-input v-model="form3.mobile" placeholder="请输入手机号码"></el-input>
</el-form-item>
<el-form-item prop="code">
<el-input style="width:120px;" v-model="form3.code" placeholder="请输入验证码"></el-input>
<el-button id="resetCode" type="primary" plain style="width:135px;" submitregister @click="obtaincode2">
获取验证码</el-button>
</el-form-item>
<el-form-item prop="password">
<el-input type="password" v-model="form3.password" placeholder="请设置6-18位密码"></el-input>
</el-form-item>
<el-form-item style="margin-bottom:8px;">
<el-button type="primary" class="login-content-button" @click="sumbitreset">确定</el-button>
</el-form-item>
<div style="font-size:12px;color:#108EE9;margin-top:26px;text-align:center">
<span style="margin-right:16px;cursor:pointer" @click="login">登录</span>
<span style="cursor:pointer" @click="register">注册</span>
</div>
</el-form>
</div>
</div>
</div>
<!-- 用户注册 -->
<div class="login-div" v-if="c">
<div class="login-content">
<div class="login-content-title">
欢迎注册{{ this.$root.currentCompany?this.$root.currentCompany.sitename:"知圈圈"}}
</div>
<div class="login-content-input">
<el-form ref="form4" :rules="rules4" :model="form4" label-width="0px" key="4">
<el-form-item prop="mobile">
<el-input v-model="form4.mobile" placeholder="请输入手机号码"></el-input>
</el-form-item>
<el-form-item prop="code">
<el-input style="width:120px;" v-model="form4.code" placeholder="请输入验证码"></el-input>
<el-button id="registerCode" type="primary" plain style="width:135px;" @click="obtaincode3">获取验证码
</el-button>
</el-form-item>
<el-form-item prop="password">
<el-input type="password" v-model="form4.password" placeholder="请设置6-18位密码,区分大小写"></el-input>
</el-form-item>
<el-button style="margin-bottom:8px;">
<el-button type="primary" class="login-content-button" @click="submitregister">注册</el-button>
</el-form-item>
<div style="font-size:12px;color:#828282">点击“登录”即表示同意
<span style="color:#108EE9">《创知厚德用户协议》</span>
</div>
<div style="font-size:12px;color:#B2B2B2;margin-top:26px;">已有账户?
<span style="color:#108EE9;cursor:pointer" @click="login">去登录</span>
</div>
</el-form>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -172,15 +172,17 @@ ...@@ -172,15 +172,17 @@
let date = 60; let date = 60;
this.vCodeClick = true; this.vCodeClick = true;
let timer = setInterval(() => { let timer = setInterval(() => {
$('#loginCode').text(date--); $('#registerVcode').text(date--);
if (date < 1) { if (date < 1) {
clearInterval(timer); clearInterval(timer);
this.vCodeClick = false; this.vCodeClick = false;
$('#loginCode').text('获取验证码'); $('#registerVcode').text('获取验证码');
} }
}, 1000); }, 1000);
console.log("返回信息", d); console.log("返回信息", d);
} else { } else {
this.$message(d.msg);
console.log(d.msg); console.log(d.msg);
} }
}); });
...@@ -189,91 +191,7 @@ ...@@ -189,91 +191,7 @@
*/ */
}, },
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 {
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);
that.rcode = d.data.vcodestr;
}
})
} else {
that.$message({
type: 'error',
message: '用户已存在, 请修改并重试'
});
}
})
},
checklogin1(){ checklogin1(){
var that = this; var that = this;
var obj = { var obj = {
...@@ -292,9 +210,12 @@ ...@@ -292,9 +210,12 @@
console.log("返回信息", d) console.log("返回信息", d)
} else if (d.status == 2030) { } else if (d.status == 2030) {
console.log(d.msg); console.log(d.msg);
this.$message(d.msg);
} else if (d.status == 2060) { } else if (d.status == 2060) {
console.log(d.msg); console.log(d.msg);
this.$message(d.msg);
} else { } else {
this.$message(d.msg);
console.log(d.msg); console.log(d.msg);
} }
}); });
......
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