Commit ee276389 authored by 黄奎's avatar 黄奎
parents 43b6e796 a416a50a
<style>
@import "../assets/css/login.css";
.Supplier_Login .item img{
width:100%;
}
.Supplier_Left_Line,.Supplier_Right_Line{
background-color: #5182E4;
}
.Supplier_Login .login-Div input.input{
caret-color: #5182E4;
}
.Supplier_Login .login-Div .loginBtn:hover{
background-color: #5182E4;
}
</style>
<template>
<div class="login-box">
<div class="login-box Supplier_Login">
<div class="homepage-hero-module">
<div class="silder-box" ref='box' :style="{'height':'100vh'}" v-show="height>0">
<div class="item" v-for="(item,index) in imgs" :key="index">
<img :style="{'height':'100vh'}" :class="index==crtIndex?'active':''" ref="swiper" :src="item">
<div :style="{'height':'100vh'}">
<div class="item">
<img :style="{'height':'100vh'}" src="../assets/img/supplierBg.png"/>
</div>
</div>
</div>
<div class="cover"></div>
<form class="login-Div">
<div v-if="isShow==1">
......@@ -22,8 +32,8 @@
<input class="input" @focus="name_bline=true" @blur="name_bline=false" maxlength="20"
autocomplete="new-password" v-model="userInfo.name" style="background-color:transparent !important;"
type="text" :placeholder="$t('login.login_account')" @keyup.enter="doLogin" />
<div class="name_bline_left" :class="name_bline==true?'_bline_w':''"></div>
<div class="name_bline_right" :class="name_bline==true?'_bline_w':''"></div>
<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>
......@@ -33,8 +43,8 @@
<input class="input" @focus="pwd_bline=true" @blur="pwd_bline=false" maxlength="20"
autocomplete="new-password" v-model="userInfo.password" style="background-color:transparent !important"
type="password" :placeholder="$t('login.login_password')" @keyup.enter="doLogin" />
<div class="pwd_bline_left" :class="pwd_bline==true?'_bline_w':''"></div>
<div class="pwd_bline_right" :class="pwd_bline==true?'_bline_w':''"></div>
<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="error-msg">
<div v-show="passwordIsShow"><img src="../assets/img/login-error-tips.png" />{{ passwordErrorMsg }}</div>
......@@ -42,7 +52,7 @@
<button type="button" class="loginBtn" :class="{'loginIng':loginState==1}" :disabled="loginState==1"
@click="doLogin">{{loginState==1?'登录中...':'登录'}}</button>
<div class="forgetPw">
<span @click="updatePwd">{{$t('login.login_forgetpwd')}}?</span>
<span @click="updatePwd" style="display:none;">{{$t('login.login_forgetpwd')}}?</span>
</div>
<div class="login-way">
<div class="wayLeft">
......@@ -63,8 +73,8 @@
<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" :class="name_bline==true?'_bline_w':''"></div>
<div class="name_bline_right" :class="name_bline==true?'_bline_w':''"></div>
<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>
......@@ -75,8 +85,8 @@
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" :class="pwd_bline==true?'_bline_w':''"></div>
<div class="pwd_bline_right" :class="pwd_bline==true?'_bline_w':''"></div>
<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>
......@@ -96,8 +106,8 @@
<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" :class="name_bline==true?'_bline_w':''"></div>
<div class="name_bline_right" :class="name_bline==true?'_bline_w':''"></div>
<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>
......@@ -107,8 +117,8 @@
<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" :class="pwd_bline==true?'_bline_w':''"></div>
<div class="pwd_bline_right" :class="pwd_bline==true?'_bline_w':''"></div>
<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">
......@@ -116,8 +126,8 @@
<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" :class="validate_bline==true?'_bline_w':''"></div>
<div class="pwd_bline_right" :class="validate_bline==true?'_bline_w':''"></div>
<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>
......@@ -136,8 +146,6 @@
</template>
<script>
import url_1 from "@/assets/img/login_bg_1.jpg";
import url_2 from "@/assets/img/login_bg_2.jpg";
export default {
name: "login-box",
data() {
......@@ -147,7 +155,7 @@
password: "",
Domain: ""
},
groupModel: "",
groupModel: [],
password: "",
mobileNumber: "",
code: "",
......@@ -169,10 +177,6 @@
height: 0,
clock: null,
crtIndex: 0,
imgs: [
url_1,
url_2
]
};
},
mounted() {
......@@ -187,7 +191,6 @@
} catch (error) {}
this.getGroup();
this.initData();
window.onresize = () => {
const windowWidth = document.body.clientWidth;
const windowHeight = document.body.clientHeight;
......@@ -246,20 +249,18 @@
else
this.crtIndex = 0
},
//初始化数据
initData() {
//判断是否是线上环境
if (!this.isOnline()) {
this.userInfo.name = "13551126756";
this.userInfo.password = "123456";
}
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 => {})
},
......@@ -311,104 +312,6 @@
err => {}
);
},
getCode() {
// var phoneReg = /(^1[3|4|5|7|8|9]\d{9}$)|(^09\d{8}$)/;
// //电话
// var phone = this.mobileNumber.replace(/^\s+|\s+$/gm, "");
// if (!phoneReg.test(phone)) {
// this.nameIsShow = true;
// this.nameErrorMsg = "请输入有效的手机号码!";
// return false;
// } else {
// this.nameIsShow = false;
// }
// const TIME_COUNT = 60;
// this.code = "";
// if (!this.timer) {
// this.count = TIME_COUNT;
// this.show = false;
// this.timer = setInterval(() => {
// if (this.count > 0 && this.count <= TIME_COUNT) {
// this.count--;
// } else {
// this.show = true;
// clearInterval(this.timer);
// this.timer = null;
// }
// }, 1000);
// }
// let msg = {
// mobileNumber: this.mobileNumber,
// mobileCodeType: this.mobileCodeType
// };
// this.ApiPost2("user_get_moblieNumber_code", msg, res => {
// if (res.data.resultCode == 1) {} else {
// this.$notify.error({
// title: "提示",
// customClass: "msgTips",
// message: res.data.message,
// showClose: false,
// duration: 3000
// });
// }
// });
},
doBind() {
// if (this.mobileNumber == "") {
// this.nameIsShow = true;
// this.nameErrorMsg = "请输入手机号";
// return;
// } else if (this.code == "") {
// this.passwordIsShow = true;
// this.passwordErrorMsg = "请输入验证码";
// return;
// }
// let msg = {
// account: this.userInfo.name,
// password: this.userInfo.password,
// mobileNumber: this.mobileNumber,
// code: this.code
// };
// this.ApiPost2("user_account_bind_moblieNumber", msg, res => {
// if (res.data.resultCode == 1) {
// this.isShow = 1;
// this.loginState = 0;
// this.userInfo.name = this.mobileNumber;
// } else {
// this.$notify.error({
// title: "提示",
// customClass: "msgTips",
// message: res.data.message,
// showClose: false,
// duration: 3000
// });
// }
// });
},
updatePwd() {
// this.isShow = 3;
// this.mobileCodeType = 2;
},
changePwd() {
// let msg = {
// password: this.password,
// mobileNumber: this.mobileNumber,
// code: this.code
// };
// this.ApiPost2("user_change_password_by_mobileNumber", msg, res => {
// if (res.data.resultCode == 1) {
// this.isShow = 1;
// } else {
// this.$notify.error({
// title: "提示",
// customClass: "msgTips",
// message: res.data.message,
// showClose: false,
// duration: 3000
// });
// }
// });
},
goLogin() {
this.isShow = 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