Commit b7c0c70d authored by 黄奎's avatar 黄奎

验证修改

parent 0a6e2f9b
<style> <style>
@import "../assets/css/login.css"; @import "../assets/css/login.css";
.Supplier_Login .item img{
width:100%; .Supplier_Login .item img {
width: 100%;
} }
.Supplier_Left_Line,.Supplier_Right_Line{
.Supplier_Left_Line,
.Supplier_Right_Line {
background-color: #5182E4; background-color: #5182E4;
} }
.Supplier_Login .login-Div input.input{
.Supplier_Login .login-Div input.input {
caret-color: #5182E4; caret-color: #5182E4;
} }
.Supplier_Login .login_Title{
font-size:28px; .Supplier_Login .login_Title {
color:#fff; font-size: 28px;
width:100%; color: #fff;
width: 100%;
text-align: center; text-align: center;
} }
.Supplier_Login .loginXI{
font-size:20px; .Supplier_Login .loginXI {
color:#fff; font-size: 20px;
margin-top:18px; color: #fff;
margin-top: 18px;
opacity: 0.6; opacity: 0.6;
} }
.Supplier_Login .login-Div .loginBtn:hover{
.Supplier_Login .login-Div .loginBtn:hover {
background-color: #5182E4; background-color: #5182E4;
} }
</style> </style>
<template> <template>
...@@ -31,7 +39,7 @@ ...@@ -31,7 +39,7 @@
<div class="homepage-hero-module"> <div class="homepage-hero-module">
<div :style="{'height':'100vh'}"> <div :style="{'height':'100vh'}">
<div class="item"> <div class="item">
<img :style="{'height':'100vh'}" src="../assets/img/supplierBg.png"/> <img :style="{'height':'100vh'}" src="../assets/img/supplierBg.png" />
</div> </div>
</div> </div>
</div> </div>
...@@ -39,11 +47,11 @@ ...@@ -39,11 +47,11 @@
<form class="login-Div"> <form class="login-Div">
<div v-if="isShow==1"> <div v-if="isShow==1">
<div class="mainTitle"> <div class="mainTitle">
<div class="login_Title"> <div class="login_Title">
{{groupModel.GroupName?groupModel.GroupName:''}} {{groupModel.GroupName?groupModel.GroupName:''}}
</div> </div>
<div class="loginXI">供应商登录</div> <div class="loginXI">供应商登录</div>
</div> </div>
<div class="login-commonBotm T1"> <div class="login-commonBotm T1">
<i class="icon-login-name iconfont icon-user11"></i> <i class="icon-login-name iconfont icon-user11"></i>
<input class="input" @focus="name_bline=true" @blur="name_bline=false" maxlength="20" <input class="input" @focus="name_bline=true" @blur="name_bline=false" maxlength="20"
...@@ -68,95 +76,6 @@ ...@@ -68,95 +76,6 @@
</div> </div>
<button type="button" class="loginBtn" :class="{'loginIng':loginState==1}" :disabled="loginState==1" <button type="button" class="loginBtn" :class="{'loginIng':loginState==1}" :disabled="loginState==1"
@click="doLogin">{{loginState==1?'登录中...':'登录'}}</button> @click="doLogin">{{loginState==1?'登录中...':'登录'}}</button>
<div class="forgetPw">
<span @click="updatePwd" style="display:none;">{{$t('login.login_forgetpwd')}}?</span>
</div>
<div class="login-way">
<div class="wayLeft">
<i class="icon-login-qqicon"></i>
<span>QQ登录</span>
</div>
<div class="wayRight">
<i class="icon-login-wechaticon"></i>
<span>微信登录</span>
</div>
</div>
</div>
<div v-if="isShow==2" class="phoneLogin">
<div class="mainTitle bindTitle">{{groupModel.GroupName?groupModel.GroupName:''}}</div>
<div class="bindPhone">绑定手机号</div>
<div class="login-commonBotm T1">
<i class="icon-login-name iconfont icon-phone1"></i>
<input class="input" @focus="name_bline=true" @blur="name_bline=false"
onkeyup="value=value.replace(/[^\d]/g,'')" maxlength="11" autocomplete="new-password" v-model="mobileNumber"
style="background-color:transparent !important;" type="text" placeholder="请输入手机号" />
<div class="name_bline_left Supplier_Left_Line" :class="name_bline==true?'_bline_w':''"></div>
<div class="name_bline_right Supplier_Right_Line" :class="name_bline==true?'_bline_w':''"></div>
</div>
<div class="error-msg">
<div v-show="nameIsShow"><img src="../assets/img/login-error-tips.png" />{{ nameErrorMsg }}</div>
</div>
<div class="login-commonBotm">
<i class="icon-login-password iconfont icon-mima"></i>
<input class="input phoneValidate" maxlength="4" @focus="pwd_bline=true"
onkeyup="value=value.replace(/[^\d]/g,'')" @blur="pwd_bline=false" v-model="code"
autocomplete="new-password" style="background-color:transparent !important" type="text" placeholder="验证码"
@keyup.enter="doBind" />
<div class="pwd_bline_left Supplier_Left_Line" :class="pwd_bline==true?'_bline_w':''"></div>
<div class="pwd_bline_right Supplier_Right_Line" :class="pwd_bline==true?'_bline_w':''"></div>
<div class="validatCode">
<span v-show="show" @click="getCode">获取验证码</span>
<span v-show="!show" class="count">{{count}}s重新获取</span>
</div>
</div>
<div class="error-msg">
<div v-show="passwordIsShow"><img src="../assets/img/login-error-tips.png" />{{ passwordErrorMsg }}</div>
</div>
<input type="button" class="loginBtn" @click="doBind" value="确认绑定" />
</div>
<div v-if="isShow==3" class="phoneLogin">
<div class="mainTitle bindTitle">{{groupModel.GroupName?groupModel.GroupName:''}}</div>
<div class="bindPhone">修改密码</div>
<div class="login-commonBotm T1">
<i class="icon-login-name iconfont icon-phone1"></i>
<input class="input" @focus="name_bline=true" onkeyup="value=value.replace(/[^\d]/g,'')" maxlength="11"
@blur="name_bline=false" autocomplete="new-password" v-model="mobileNumber"
style="background-color:transparent !important;" type="text" placeholder="请输入手机号" />
<div class="name_bline_left Supplier_Left_Line" :class="name_bline==true?'_bline_w':''"></div>
<div class="name_bline_right Supplier_Right_Line" :class="name_bline==true?'_bline_w':''"></div>
</div>
<div class="error-msg">
<div v-show="nameIsShow"><img src="../assets/img/login-error-tips.png" />{{ nameErrorMsg }}</div>
</div>
<div class="login-commonBotm">
<i class="icon-login-password iconfont icon-mima"></i>
<input class="input" @focus="pwd_bline=true" @blur="pwd_bline=false" autocomplete="new-password"
maxlength="20" v-model="password" style="background-color:transparent !important" type="password"
placeholder="请输入新密码" />
<div class="pwd_bline_left Supplier_Left_Line" :class="pwd_bline==true?'_bline_w':''"></div>
<div class="pwd_bline_right Supplier_Right_Line" :class="pwd_bline==true?'_bline_w':''"></div>
</div>
<div class="login-commonBotm btValidate">
<i class="icon-login-password iconfont icon-mima"></i>
<input class="input phoneValidate" maxlength="4" onkeyup="value=value.replace(/[^\d]/g,'')"
@focus="validate_bline=true" @blur="validate_bline=false" v-model="code" autocomplete="new-password"
style="background-color:transparent !important" type="text" placeholder="验证码" @keyup.enter="changePwd" />
<div class="pwd_bline_left Supplier_Left_Line" :class="validate_bline==true?'_bline_w':''"></div>
<div class="pwd_bline_right Supplier_Right_Line" :class="validate_bline==true?'_bline_w':''"></div>
<div class="validatCode">
<span v-show="show" @click="getCode">获取验证码</span>
<span v-show="!show" class="count">{{count}}s重新获取</span>
</div>
</div>
<div class="forgetPw">
<span @click="goLogin">去登录</span>
</div>
<div class="error-msg">
<div v-show="passwordIsShow"><img src="../assets/img/login-error-tips.png" />{{ passwordErrorMsg }}</div>
</div>
<input type="button" class="loginBtn changeBtn" @click="changePwd" value="确认修改" />
</div> </div>
</form> </form>
</div> </div>
...@@ -168,20 +87,13 @@ ...@@ -168,20 +87,13 @@
data() { data() {
return { return {
userInfo: { userInfo: {
name: "13551126756", name: "",
password: "123456", password: "",
Domain: "" Domain: ""
}, },
groupModel: [], groupModel: {},
password: "",
mobileNumber: "",
code: "",
mobileCodeType: 1,
show: true,
count: "",
timer: null, timer: null,
isShow: 1, isShow: 1,
vedioCanPlay: false,
fixStyle: "", fixStyle: "",
nameIsShow: false, nameIsShow: false,
passwordIsShow: false, passwordIsShow: false,
...@@ -189,7 +101,6 @@ ...@@ -189,7 +101,6 @@
passwordErrorMsg: "", passwordErrorMsg: "",
name_bline: false, name_bline: false,
pwd_bline: false, pwd_bline: false,
validate_bline: false,
loginState: 0, loginState: 0,
height: 0, height: 0,
clock: null, clock: null,
...@@ -206,8 +117,8 @@ ...@@ -206,8 +117,8 @@
try { try {
_audio.playbackRate = 0.5; _audio.playbackRate = 0.5;
} catch (error) {} } catch (error) {}
this.getGroup(); this.getGroup();
this.initData();
window.onresize = () => { window.onresize = () => {
const windowWidth = document.body.clientWidth; const windowWidth = document.body.clientWidth;
const windowHeight = document.body.clientHeight; const windowHeight = document.body.clientHeight;
...@@ -260,30 +171,31 @@ ...@@ -260,30 +171,31 @@
}, 8000) }, 8000)
} }
}, },
//初始化数据
initData() {
//判断是否是线上环境
if (!this.isOnline()) {
this.userInfo.name = "13551126756";
this.userInfo.password = "123456";
}
this.userInfo.Domain = window.location.hostname
},
change() { change() {
if (this.crtIndex < this.imgs.length - 1) if (this.crtIndex < this.imgs.length - 1)
this.crtIndex++ this.crtIndex++
else else
this.crtIndex = 0 this.crtIndex = 0
}, },
updatePwd() {
this.isShow = 3;
this.mobileCodeType = 2;
},
getGroup() { //获取集团 getGroup() { //获取集团
let Domain = window.location.hostname let Domain = window.location.hostname
console.log(Domain,'domainsss');
this.ApiPost2('admin_get_GetModelByDomain', { this.ApiPost2('admin_get_GetModelByDomain', {
'Domain': Domain 'Domain': Domain
}, res => { }, res => {
this.groupModel = res.data.data; this.groupModel = res.data.data;
console.log(this.groupModel,'groupmodel');
document.title = "欢迎使用 " + this.groupModel.GroupName + " ERP系统"; document.title = "欢迎使用 " + this.groupModel.GroupName + " ERP系统";
}, err => {}) }, err => {})
}, },
canplay() {
this.vedioCanPlay = true;
},
doLogin() { doLogin() {
if (this.userInfo.name == "") { if (this.userInfo.name == "") {
this.nameIsShow = true; this.nameIsShow = true;
...@@ -328,9 +240,6 @@ ...@@ -328,9 +240,6 @@
}, },
err => {} err => {}
); );
},
goLogin() {
this.isShow = 1;
} }
} }
}; };
......
...@@ -241,17 +241,17 @@ export default { ...@@ -241,17 +241,17 @@ export default {
} }
//HTTP提交数据 //HTTP提交数据
Vue.prototype.apipost = function (cmd, msg, successCall, faildCall) { Vue.prototype.apipost = function (cmd, msg, successCall, faildCall) {
if (this.$route.name.indexOf('login') === -1 && this.$route.name.indexOf('confirmationOrderDownLoad') === -1 && this.$route.name.indexOf('PrintPage') === -1) { if (this.$route.name.indexOf('login') === -1 && this.$route.name.indexOf('confirmationOrderDownLoad') === -1 && this.$route.name.indexOf('PrintPage') === -1) {
let previousPathInfo = { let previousPathInfo = {
path: this.$route.name, path: this.$route.name,
query: this.$route.query query: this.$route.query
}
localStorage.previousPathInfo = JSON.stringify(previousPathInfo);
} }
localStorage.previousPathInfo = JSON.stringify(previousPathInfo);
}
if (msg == null || msg == "") { if (msg == null || msg == "") {
msg = {} msg = {}
} }
...@@ -310,17 +310,17 @@ export default { ...@@ -310,17 +310,17 @@ export default {
} }
var apiNewurl = this.domainManager().PostUrl; var apiNewurl = this.domainManager().PostUrl;
var timestamp = (new Date()).valueOf(); var timestamp = (new Date()).valueOf();
var uid=0; var uid = 0;
if (this.getLocalStorageSupplier() && this.getLocalStorageSupplier().userInfo && this.getLocalStorageSupplier().userInfo != "" && this.$route.path.toLowerCase() != "/supplierlogin") { console.log("this.getLocalStorageSupplier()",this.getLocalStorageSupplier());
uid=this.getLocalStorageSupplier().SupplierAccountId; if (this.getLocalStorageSupplier()) {
}
else uid = this.getLocalStorageSupplier().SupplierAccountId;
{ } else {
this.$router.push({ this.$router.push({
path: '/SupplierLogin' path: '/SupplierLogin'
}) })
} }
var token = ""; var token = "";
var key = ""; var key = "";
if (this.getLocalStorageSupplier() != null) { if (this.getLocalStorageSupplier() != null) {
...@@ -335,7 +335,7 @@ export default { ...@@ -335,7 +335,7 @@ export default {
"timestamp": timestamp, "timestamp": timestamp,
"token": token, "token": token,
"sign": md5Str, "sign": md5Str,
"uid":uid "uid": uid
} }
this.$http.post(apiNewurl, postData, { this.$http.post(apiNewurl, postData, {
...@@ -349,14 +349,14 @@ export default { ...@@ -349,14 +349,14 @@ export default {
this.$router.push({ this.$router.push({
path: '/SupplierLogin' path: '/SupplierLogin'
}); });
} else { } else {
successCall(res); successCall(res);
} }
}, faildCall) }, faildCall)
}, },
Vue.prototype.apiJavaPost = function (cmd, msg, successCall, faildCall) { Vue.prototype.apiJavaPost = function (cmd, msg, successCall, faildCall) {
if (this.$route.name.indexOf('login') === -1 && this.$route.name.indexOf('confirmationOrderDownLoad') === -1 && this.$route.name.indexOf('PrintPage') === -1) { if (this.$route.name.indexOf('login') === -1 && this.$route.name.indexOf('confirmationOrderDownLoad') === -1 && this.$route.name.indexOf('PrintPage') === -1) {
let previousPathInfo = { let previousPathInfo = {
path: this.$route.name, path: this.$route.name,
query: this.$route.query query: this.$route.query
...@@ -495,7 +495,7 @@ export default { ...@@ -495,7 +495,7 @@ export default {
var oss = new OSS({ var oss = new OSS({
region: 'oss-cn-hangzhou', region: 'oss-cn-hangzhou',
accessKeyId: 'LTAIwE7l9dImZSa3', accessKeyId: 'LTAIwE7l9dImZSa3',
accessKeySecret: 'j47Ajn0d0WzUCIX8Biyj3P2r8QDltI', accessKeySecret: 'j47Ajn0d0WzUCIX8Biyj3P2r8QDltI',
bucket: 'reborndev' bucket: 'reborndev'
}) })
...@@ -612,7 +612,7 @@ export default { ...@@ -612,7 +612,7 @@ export default {
let fileName = nameList[index] let fileName = nameList[index]
fileName = path + fileName + "." + files[index].name.split('.').pop() fileName = path + fileName + "." + files[index].name.split('.').pop()
var formData = new FormData(); var formData = new FormData();
var uploadUrl = that.domainManager().UploadUrl + "/Upload?filePath=" + path +'&ocr='+ ocr; var uploadUrl = that.domainManager().UploadUrl + "/Upload?filePath=" + path + '&ocr=' + ocr;
formData.append("myfile", files[index]); formData.append("myfile", files[index]);
that.$http.post(uploadUrl, formData, {}) that.$http.post(uploadUrl, formData, {})
.then(res => { .then(res => {
...@@ -636,7 +636,7 @@ export default { ...@@ -636,7 +636,7 @@ export default {
h = h ? h : '' h = h ? h : ''
if (type === 'w') { if (type === 'w') {
poise = 'm_w' poise = 'm_w'
} else if (type === 'h') { } else if (type === 'h') {
poise = 'm_h' poise = 'm_h'
} }
return url + '/image/index?filePath=' + path.replace('http://192.168.2.214:8130', '').replace('http://imgfile.oytour.com', '').split('?')[0] + '&process=resize,' + poise + ',w_' + w + ',h_' + h; return url + '/image/index?filePath=' + path.replace('http://192.168.2.214:8130', '').replace('http://imgfile.oytour.com', '').split('?')[0] + '&process=resize,' + poise + ',w_' + w + ',h_' + h;
...@@ -698,7 +698,7 @@ export default { ...@@ -698,7 +698,7 @@ export default {
} }
item[filed] = value; item[filed] = value;
} }
Vue.prototype.checkTime = function(item, filed){ Vue.prototype.checkTime = function (item, filed) {
var date = item[filed]; var date = item[filed];
if (date.length == 1) { if (date.length == 1) {
var v1 = date.substring(0, 1); var v1 = date.substring(0, 1);
......
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