Commit b7c0c70d authored by 黄奎's avatar 黄奎

验证修改

parent 0a6e2f9b
<style>
@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;
}
.Supplier_Login .login-Div input.input{
.Supplier_Login .login-Div input.input {
caret-color: #5182E4;
}
.Supplier_Login .login_Title{
font-size:28px;
color:#fff;
width:100%;
.Supplier_Login .login_Title {
font-size: 28px;
color: #fff;
width: 100%;
text-align: center;
}
.Supplier_Login .loginXI{
font-size:20px;
color:#fff;
margin-top:18px;
.Supplier_Login .loginXI {
font-size: 20px;
color: #fff;
margin-top: 18px;
opacity: 0.6;
}
.Supplier_Login .login-Div .loginBtn:hover{
.Supplier_Login .login-Div .loginBtn:hover {
background-color: #5182E4;
}
</style>
<template>
......@@ -31,7 +39,7 @@
<div class="homepage-hero-module">
<div :style="{'height':'100vh'}">
<div class="item">
<img :style="{'height':'100vh'}" src="../assets/img/supplierBg.png"/>
<img :style="{'height':'100vh'}" src="../assets/img/supplierBg.png" />
</div>
</div>
</div>
......@@ -39,11 +47,11 @@
<form class="login-Div">
<div v-if="isShow==1">
<div class="mainTitle">
<div class="login_Title">
<div class="login_Title">
{{groupModel.GroupName?groupModel.GroupName:''}}
</div>
<div class="loginXI">供应商登录</div>
</div>
</div>
<div class="login-commonBotm T1">
<i class="icon-login-name iconfont icon-user11"></i>
<input class="input" @focus="name_bline=true" @blur="name_bline=false" maxlength="20"
......@@ -68,95 +76,6 @@
</div>
<button type="button" class="loginBtn" :class="{'loginIng':loginState==1}" :disabled="loginState==1"
@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>
</form>
</div>
......@@ -168,20 +87,13 @@
data() {
return {
userInfo: {
name: "13551126756",
password: "123456",
name: "",
password: "",
Domain: ""
},
groupModel: [],
password: "",
mobileNumber: "",
code: "",
mobileCodeType: 1,
show: true,
count: "",
groupModel: {},
timer: null,
isShow: 1,
vedioCanPlay: false,
fixStyle: "",
nameIsShow: false,
passwordIsShow: false,
......@@ -189,7 +101,6 @@
passwordErrorMsg: "",
name_bline: false,
pwd_bline: false,
validate_bline: false,
loginState: 0,
height: 0,
clock: null,
......@@ -206,8 +117,8 @@
try {
_audio.playbackRate = 0.5;
} catch (error) {}
this.getGroup();
this.getGroup();
this.initData();
window.onresize = () => {
const windowWidth = document.body.clientWidth;
const windowHeight = document.body.clientHeight;
......@@ -260,30 +171,31 @@
}, 8000)
}
},
//初始化数据
initData() {
//判断是否是线上环境
if (!this.isOnline()) {
this.userInfo.name = "13551126756";
this.userInfo.password = "123456";
}
this.userInfo.Domain = window.location.hostname
},
change() {
if (this.crtIndex < this.imgs.length - 1)
this.crtIndex++
else
this.crtIndex = 0
},
updatePwd() {
this.isShow = 3;
this.mobileCodeType = 2;
},
getGroup() { //获取集团
let Domain = window.location.hostname
console.log(Domain,'domainsss');
this.ApiPost2('admin_get_GetModelByDomain', {
'Domain': Domain
}, res => {
this.groupModel = res.data.data;
console.log(this.groupModel,'groupmodel');
document.title = "欢迎使用 " + this.groupModel.GroupName + " ERP系统";
}, err => {})
},
canplay() {
this.vedioCanPlay = true;
},
doLogin() {
if (this.userInfo.name == "") {
this.nameIsShow = true;
......@@ -328,9 +240,6 @@
},
err => {}
);
},
goLogin() {
this.isShow = 1;
}
}
};
......
......@@ -241,17 +241,17 @@ export default {
}
//HTTP提交数据
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) {
let previousPathInfo = {
path: this.$route.name,
query: this.$route.query
if (this.$route.name.indexOf('login') === -1 && this.$route.name.indexOf('confirmationOrderDownLoad') === -1 && this.$route.name.indexOf('PrintPage') === -1) {
let previousPathInfo = {
path: this.$route.name,
query: this.$route.query
}
localStorage.previousPathInfo = JSON.stringify(previousPathInfo);
}
localStorage.previousPathInfo = JSON.stringify(previousPathInfo);
}
if (msg == null || msg == "") {
msg = {}
}
......@@ -310,17 +310,17 @@ export default {
}
var apiNewurl = this.domainManager().PostUrl;
var timestamp = (new Date()).valueOf();
var uid=0;
if (this.getLocalStorageSupplier() && this.getLocalStorageSupplier().userInfo && this.getLocalStorageSupplier().userInfo != "" && this.$route.path.toLowerCase() != "/supplierlogin") {
uid=this.getLocalStorageSupplier().SupplierAccountId;
}
else
{
this.$router.push({
path: '/SupplierLogin'
})
}
var uid = 0;
console.log("this.getLocalStorageSupplier()",this.getLocalStorageSupplier());
if (this.getLocalStorageSupplier()) {
uid = this.getLocalStorageSupplier().SupplierAccountId;
} else {
this.$router.push({
path: '/SupplierLogin'
})
}
var token = "";
var key = "";
if (this.getLocalStorageSupplier() != null) {
......@@ -335,7 +335,7 @@ export default {
"timestamp": timestamp,
"token": token,
"sign": md5Str,
"uid":uid
"uid": uid
}
this.$http.post(apiNewurl, postData, {
......@@ -349,14 +349,14 @@ export default {
this.$router.push({
path: '/SupplierLogin'
});
} else {
} else {
successCall(res);
}
}, 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 = {
path: this.$route.name,
query: this.$route.query
......@@ -495,7 +495,7 @@ export default {
var oss = new OSS({
region: 'oss-cn-hangzhou',
accessKeyId: 'LTAIwE7l9dImZSa3',
accessKeySecret: 'j47Ajn0d0WzUCIX8Biyj3P2r8QDltI',
accessKeySecret: 'j47Ajn0d0WzUCIX8Biyj3P2r8QDltI',
bucket: 'reborndev'
})
......@@ -612,7 +612,7 @@ export default {
let fileName = nameList[index]
fileName = path + fileName + "." + files[index].name.split('.').pop()
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]);
that.$http.post(uploadUrl, formData, {})
.then(res => {
......@@ -636,7 +636,7 @@ export default {
h = h ? h : ''
if (type === 'w') {
poise = 'm_w'
} else if (type === 'h') {
} else if (type === '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;
......@@ -698,7 +698,7 @@ export default {
}
item[filed] = value;
}
Vue.prototype.checkTime = function(item, filed){
Vue.prototype.checkTime = function (item, filed) {
var date = item[filed];
if (date.length == 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