Commit 68a10ac9 authored by tyn's avatar tyn

Merge branch 'master' of http://47.105.106.177:66/root/sup-server

parents 9f4ff485 bc3be17e
...@@ -17,33 +17,34 @@ ...@@ -17,33 +17,34 @@
<div class="title" :class="{'on': type=='yzm'}" @click="type='yzm'">验证码登录</div> <div class="title" :class="{'on': type=='yzm'}" @click="type='yzm'">验证码登录</div>
<div class="title" :class="{'on': type=='mima'}" @click="type='mima'">密码登录</div> <div class="title" :class="{'on': type=='mima'}" @click="type='mima'">密码登录</div>
</div> </div>
<!--密码登录 -->
<div class="logoncont" v-if="type=='mima'"> <div class="logoncont" v-if="type=='mima'">
<div class="inputs"> <div class="inputs">
<el-input placeholder="请输入企业名称"></el-input> <el-input placeholder="请输入账号" v-model="mimaparam.username"></el-input>
</div> </div>
<div class="inputs"> <div class="inputs">
<el-input placeholder="请输入登录密码"></el-input> <el-input placeholder="请输入登录密码" v-model="mimaparam.password"></el-input>
</div> </div>
<div class="inputs"> <div class="inputs">
<el-input width="191px" class="small" placeholder="请输入验证码"></el-input> <el-input width="191px" class="small" placeholder="请输入验证码" v-model="mimaparam.code" ></el-input>
<div class="login-code"> <div class="login-code">
<img :src="codeUrl" @click="getCode" class="login-code-img"/> <img :src="codeUrl" @click="getCode" class="login-code-img"/>
</div> </div>
</div> </div>
<div class="loginin" @click="login">登录</div> <div class="loginin" @click="login">登录</div>
<div class="loginzc"> <div class="loginzc">
<p @click="type='wjmm'">忘记密码</p> <p @click="wjmm">忘记密码</p>
<p>没加入我们?现在就 <span @click="dialogVisible = true">注册</span></p> <p>没加入我们?现在就 <span @click="dialogVisible = true">注册</span></p>
</div> </div>
</div> </div>
<!-- 验证码登录-->
<div class="logoncont" v-if="type=='yzm'"> <div class="logoncont" v-if="type=='yzm'">
<div class="inputs"> <div class="inputs">
<el-input placeholder="请输入手机号" oninput="value=value.replace(/[^0-9]/g,'')"></el-input> <el-input placeholder="请输入手机号" v-model="yzmparam.phone" oninput="value=value.replace(/[^0-9]/g,'')"></el-input>
</div> </div>
<div class="inputs"> <div class="inputs">
<el-input placeholder="短信验证码" class="hqyzm"> <el-input placeholder="短信验证码" v-model="yzmparam.smsCode" class="hqyzm">
<template slot="append">获取验证码 <template slot="append"><span @click="getSmsCode(1)">{{ timer }}</span></template>
</template>
</el-input> </el-input>
</div> </div>
<div class="loginin" @click="yzmlogin">登录</div> <div class="loginin" @click="yzmlogin">登录</div>
...@@ -51,32 +52,34 @@ ...@@ -51,32 +52,34 @@
<p>没加入我们?现在就 <span @click="dialogVisible = true">注册</span></p> <p>没加入我们?现在就 <span @click="dialogVisible = true">注册</span></p>
</div> </div>
</div> </div>
<!-- 忘记密码-->
<div class="logoncont" v-if="type=='wjmm'"> <div class="logoncont" v-if="type=='wjmm'">
<div class="inputs"> <div class="inputs">
<el-input placeholder="请输入手机号" oninput="value=value.replace(/[^0-9]/g,'')"></el-input> <el-input placeholder="请输入手机号" v-model="resetparam.phone" oninput="value=value.replace(/[^0-9]/g,'')"></el-input>
</div> </div>
<div class="inputs"> <div class="inputs">
<el-input placeholder="短信验证码" class="hqyzm"> <el-input placeholder="短信验证码" v-model="resetparam.smsCode" class="hqyzm">
<template slot="append">获取验证码</template> <template slot="append"><span @click="getSmsCode(1)">{{ timer }}</span></template>
</el-input> </el-input>
</div> </div>
<div class="inputs"> <div class="inputs">
<el-input class="small" placeholder="请输入验证码"></el-input> <el-input class="small" v-model="resetparam.code" placeholder="请输入验证码"></el-input>
<div class="login-code"> <div class="login-code">
<img :src="codeUrl" @click="getCode" class="login-code-img"/> <img :src="codeUrl" @click="getCode" class="login-code-img"/>
</div> </div>
</div> </div>
<div class="loginin" @click="type='tjmm'">下一步</div> <div class="loginin" @click="yzSmscode">下一步</div>
<div class="loginzc" style="justify-content: center"> <div class="loginzc" style="justify-content: center">
<p><span @click="type='mima'">返回登录</span></p> <p><span @click="type='mima'">返回登录</span></p>
</div> </div>
</div> </div>
<!-- 提交重置的密码-->
<div class="logoncont" v-if="type=='tjmm'"> <div class="logoncont" v-if="type=='tjmm'">
<div class="inputs"> <div class="inputs">
<el-input placeholder="请输入密码"></el-input> <el-input v-model="resetparam.passWord" placeholder="请输入密码"></el-input>
</div> </div>
<div class="inputs"> <div class="inputs">
<el-input placeholder="请再次输入密码"></el-input> <el-input v-model="resetparam.passWord1" placeholder="请再次输入密码"></el-input>
</div> </div>
<div class="loginin" @click="resetpwd">提交</div> <div class="loginin" @click="resetpwd">提交</div>
<div class="loginzc" style="justify-content: center"> <div class="loginzc" style="justify-content: center">
...@@ -327,617 +330,736 @@ ...@@ -327,617 +330,736 @@
</template> </template>
<script> <script>
import footers from '@/components/foots' import footers from '@/components/foots'
export default { export default {
components: {footers}, components: {footers},
data() { data() {
return { return {
codeUrl:'',//图形验证码 codeUrl:'',//图形验证码
dialogVisible: false, uuid:'',//图形验证码唯一凭证
agreeRegister: false, dialogVisible: false,
registerType: 2, agreeRegister: false,
form: { registerType: 2,
phone:"", form: {
code: "", phone:"",
sex: 0, code: "",
name: "", sex: 0,
password: "", name: "",
passwordCheck: "", password: "",
email: "", passwordCheck: "",
}, email: "",
ruleForm:{
companyName: "",
code: "",
name: "",
date: "",
amount: "",
region: "",
address: "",
detail: "",
imageUrl: ''
},
rules: {
companyName: [
{ required: true, message: '请输入公司名称', trigger: 'change' }
],
code: [
{ required: true, message: '请输入统一社会信用代码', trigger: 'change' }
],
name: [
{ required: true, message: '请输入法定代表人', trigger: 'change' }
],
date: [
{ required: true, message: '请输入成立日期', trigger: 'change' }
],
amount: [
{ required: true, message: '请输入注册资本', trigger: 'change' }
],
region: [
{ required: true, message: '请选择企业注册地', trigger: 'change' }
],
address: [
{ required: true, message: '请输入办公地址', trigger: 'change' }
],
detail: [
{ required: true, message: '请输入企业简介', trigger: 'change' }
],
},
type:"yzm",//登录方式 密码:mima 验证码:yzm 忘记密码:wjmm 提交密码:tjmm
yzmparam:{
phone:'',
code:''
} ,
mimaparam:{
name:'',
pwd:'',
code:''
},
wjparam:{
name:'',
pwd:'',
code:'',
code1:''
},
resetparam:{
pwd:'',
}
};
},
computed: {
},
mounted() {
// this.getCode()
},
watch:{
type(val){
this.cleardata()
}
},
methods: {
//清空填写的登录数据
cleardata(){
}, },
//登录 ruleForm:{
login(){}, companyName: "",
//验证码登录 code: "",
yzmlogin(){}, name: "",
//重置密码 date: "",
resetpwd(){}, amount: "",
//获取验证码 region: "",
getCode(){ address: "",
this.getYZMimage().then(res=>{ detail: "",
this.codeUrl = res.data.imag imageUrl: ''
})
}, },
handleAvatarSuccess(res, file) { rules: {
console.log("上传成功") companyName: [
this.ruleForm.imageUrl = URL.createObjectURL(file.raw) { required: true, message: '请输入公司名称', trigger: 'change' }
],
code: [
{ required: true, message: '请输入统一社会信用代码', trigger: 'change' }
],
name: [
{ required: true, message: '请输入法定代表人', trigger: 'change' }
],
date: [
{ required: true, message: '请输入成立日期', trigger: 'change' }
],
amount: [
{ required: true, message: '请输入注册资本', trigger: 'change' }
],
region: [
{ required: true, message: '请选择企业注册地', trigger: 'change' }
],
address: [
{ required: true, message: '请输入办公地址', trigger: 'change' }
],
detail: [
{ required: true, message: '请输入企业简介', trigger: 'change' }
],
}, },
changeUpload: function (file) { type:"tjmm",//登录方式 密码:mima 验证码:yzm 忘记密码:wjmm 提交密码:tjmm
let fileName = file.name; yzmparam:{
console.log(fileName) phone:'',
let regex = /(.jpg|.jpeg)$/ smsCode:''
if (regex.test(fileName.toLowerCase())) { } ,
this.ruleForm.imageUrl = URL.createObjectURL(file.raw) mimaparam:{
} username:'',
password:'',
code:'',
uuid:''
},
resetparam:{
phone:'',
passWord:'',
passWord1:'',
code:'',
smsCode:''
}, },
beforeAvatarUpload(file) { timer:'获取验证码',//倒计时
const isJPG = file.type === 'image/jpeg'; };
const isLt2M = file.size / 1024 / 1024 < 2; },
computed: {
},
mounted() {
this.getCode()
},
watch:{
type(val){
this.cleardata()
}
},
methods: {
//清空填写的登录数据
cleardata(){
console.log(isJPG) },
if (!isJPG) { //登录 /login
this.$message.error('上传头像图片只能是 JPG 格式!'); login(){
this.mimaparam.uuid = this.uuid
if(!(this.mimaparam.username || this.mimaparam.code || this.mimaparam.code)){
this.$message.error('账号、密码、验证码不能为空!');
return false;
}
login(this.mimaparam).then(res=>{
if(res.code == 200){
this.toList()
}else{
this.$message.error(res.msg);
} }
if (!isLt2M) { })
this.$message.error('上传头像图片大小不能超过 2MB!'); },
//验证码登录 /smsLogin
yzmlogin(){
if(!(this.yzmparam.phone || this.yzmparam.smsCode)){
this.$message.error('账号、验证码不能为空!');
return false;
}
smsLogin(this.yzmparam).then(res=>{
if(res.code == 200){
this.toList()
}else{
this.$message.error(res.msg);
} }
return isJPG && isLt2M; })
},
//验证短信验证码、图形验证码
yzSmscode(){
let param = {
phone:this.resetparam.phone,
code:this.resetparam.smsCode
} }
} //校验短信验证码 /sms/validateSmsCode
} validateSmsCode(param).then(res=>{
</script> if (res.code == 200){
let params = {
<style scoped lang="scss"> uuid:this.uuid,
.main { code:this.resetparam.code
position: relative; }
height: 100%; //校验图形验证码 /validateCaptcha
width: 100%; validateCaptcha(params).then(res=>{
.loginbox{ if(res.code == 200){
margin-bottom: 24px; this.type='tjmm'
.logionhead { }else{
border-bottom: 1px solid #F0F0F0; this.$message.error(res.msg);
text-align: center; }
margin-bottom: 32px; })
.title { }else{
font-size: 18px; this.$message.error(res.msg);
color: #666;
display: inline-block;
margin: 0 20px;
padding-bottom: 18px;
cursor: pointer;
} }
.title.on { })
color: #0081FF; },
position: relative; //重置密码
resetpwd(){
let pwd = this.resetparam.passWord
let pwd1 = this.resetparam.passWord1
if(pwd!=pwd1){
this.$message.error('两次输入密码不一致');
}else{
//重置 /forgotPassword
let param = {phone:this.resetparam.phone,passWord:this.resetparam.passWord}
forgotPassword(param).then(res=>{
if(res.code == 200){
this.type = 'mima'
this.getCode()
}else{
this.$message.error(res.msg);
}
})
}
},
//获取验图形证码
getCode(){
this.getYZMimage().then(res=>{
this.codeUrl = res.data.imag
this.uuid = res.data.uuid
})
},
//获取手机验证码
getSmsCode(type){
if(type == 1){//短信登录
if(this.yzmparam.phone)
this.yzPohne(this.yzmparam.phone)
else
this.$message({
message: '请输入手机号!',
type: 'warning'
});
}
},
// 验证手机号发送验证码 /sms/sendRegisterCode
yzPohne(phone){
var param = {
phone:phone,
type:1 //0:注册,1:短信登录/忘记密码
}
//验证账户发送短信 /checkUser
checkUser(param).then(res=>{
if(res.code == 200){
this.getTimer()
}else{
this.$message.error(res.msg);
} }
.title.on::after { })
content: ' ';
width: 42px; },
height: 3px; getTimer(){//倒计时
background: #0081FF; let num = 60
border-radius: 1px 1px 1px 1px; var timers = setInterval(()=>{
position: absolute; if(num>0){
bottom: 0; num--;
margin-left: -21px; this.timer = num+'s重新发送'
left: 50%; }else{
clearInterval(timers)
this.timer = '发送验证码'
timers = null
} }
},1000)
},
wjmm(){
this.type='wjmm'
this.getCode()
},
//登录成功跳转
toList(){
},
handleAvatarSuccess(res, file) {
console.log("上传成功")
this.ruleForm.imageUrl = URL.createObjectURL(file.raw)
},
changeUpload: function (file) {
let fileName = file.name;
console.log(fileName)
let regex = /(.jpg|.jpeg)$/
if (regex.test(fileName.toLowerCase())) {
this.ruleForm.imageUrl = URL.createObjectURL(file.raw)
}
},
beforeAvatarUpload(file) {
const isJPG = file.type === 'image/jpeg';
const isLt2M = file.size / 1024 / 1024 < 2;
console.log(isJPG)
if (!isJPG) {
this.$message.error('上传头像图片只能是 JPG 格式!');
}
if (!isLt2M) {
this.$message.error('上传头像图片大小不能超过 2MB!');
} }
return isJPG && isLt2M;
} }
.loginzc{ }
font-size: 12px; }
margin-top: 24px; </script>
display: flex;
justify-content: space-between; <style scoped lang="scss">
padding: 0 52px 32px; .main {
>p{ position: relative;
line-height: 20px; height: 100%;
color: #999999; width: 100%;
.loginbox{
margin-bottom: 24px;
.logionhead {
border-bottom: 1px solid #F0F0F0;
text-align: center;
margin-bottom: 32px;
.title {
font-size: 18px;
color: #666;
display: inline-block;
margin: 0 20px;
padding-bottom: 18px;
cursor: pointer; cursor: pointer;
>span{ }
cursor: pointer; .title.on {
color: #0081ff; color: #0081FF;
} position: relative;
}
.title.on::after {
content: ' ';
width: 42px;
height: 3px;
background: #0081FF;
border-radius: 1px 1px 1px 1px;
position: absolute;
bottom: 0;
margin-left: -21px;
left: 50%;
} }
} }
.registration-head { }
position: absolute; .loginzc{
width: 100vw; font-size: 12px;
height: 75px; margin-top: 24px;
background: #FFFFFF; display: flex;
justify-content: space-between;
padding: 0 52px 32px;
>p{
line-height: 20px;
color: #999999;
cursor: pointer;
>span{
cursor: pointer;
color: #0081ff;
}
} }
}
.registration-head {
position: absolute;
width: 100vw;
height: 75px;
background: #FFFFFF;
}
.login-video { .login-video {
position: absolute; position: absolute;
left: 0; left: 0;
top: 0; top: 0;
width: 100%;
height: 100%;
object-fit: cover;
source {
width: 100%; width: 100%;
height: 100%; height: 100%;
object-fit: cover;
source {
width: 100%;
height: 100%;
}
} }
}
.bot { .bot {
position: fixed; position: fixed;
bottom: 0; bottom: 0;
left: 0; left: 0;
} }
.logo {
position: absolute;
left: 16px;
top: 16px;
}
.logo { .righttop {
position: absolute;
right: 16px;
top: 17px;
z-index: 1;
}
.login {
width: 426px;
/*height: 451px;*/
background: #FFFFFF;
border-radius: 8px;
opacity: 1;
position: absolute;
top: 50%;
transform: translate(0,-50%);
right: 61px;
.logintop {
position: absolute; position: absolute;
left: 16px; left: 12px;
top: 16px; top: 12px;
} }
.righttop { > h3 {
position: absolute; font-size: 24px;
right: 16px; font-weight: bold;
top: 17px; color: #0081FF;
z-index: 1; text-align: center;
margin-top: 60px;
margin-bottom: 40px;
line-height: 17px;
} }
.login { .inputs {
width: 426px; margin-bottom: 24px;
/*height: 451px;*/ padding: 0 43px;
background: #FFFFFF;
border-radius: 8px;
opacity: 1;
position: absolute;
top: 50%;
transform: translate(0,-50%);
right: 61px;
.logintop {
position: absolute;
left: 12px;
top: 12px;
}
> h3 { ::v-deep .el-input__inner {
font-size: 24px; width: 100%;
font-weight: bold; height: 48px;
color: #0081FF; border-radius: 8px;
text-align: center; border: 1px solid #E3E3E3;
margin-top: 60px; text-indent: 16px;
margin-bottom: 40px; outline: none;
line-height: 17px; font-size: 14px;
padding: 0;
} }
.inputs { .hqyzm {
margin-bottom: 24px; position: relative;
padding: 0 43px; ::v-deep .el-input-group__append {
cursor: pointer;
::v-deep .el-input__inner { width: 102px;
width: 100%;
height: 48px;
border-radius: 8px;
border: 1px solid #E3E3E3;
text-indent: 16px;
outline: none;
font-size: 14px;
padding: 0; padding: 0;
display: block;
position: absolute;
top: 12px;
right: 0;
background: 0;
border: 0;
line-height: 24px;
text-align: center;
color: #0081ff;
font-size: 14px;
border-left: 1px solid #D8D8D8;
} }
}
.hqyzm { input::-webkit-input-placeholder,
position: relative; textarea::-webkit-input-placeholder {
::v-deep .el-input-group__append { color: #9E9E9E;
cursor: pointer;
width: 102px;
padding: 0;
display: block;
position: absolute;
top: 12px;
right: 0;
background: 0;
border: 0;
line-height: 24px;
text-align: center;
color: #0081ff;
font-size: 14px;
border-left: 1px solid #D8D8D8;
}
}
input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
color: #9E9E9E;
}
.small {
width: 191px;
}
.login-code {
float: right;
width: 131px;
height: 46px;
background: #FFFFFF;
border-radius: 8px;
border: 1px solid #F1F1F1;
}
} }
.loginin { .small {
width: 340px; width: 191px;
height: 48px;
background: #0081FF;
border-radius: 4px;
margin: 0 auto;
line-height: 48px;
font-size: 16px;
font-family: Microsoft YaHei-Bold, Microsoft YaHei;
font-weight: bold;
color: #FFFFFF;
text-align: center;
} }
.loginbot { .login-code {
position: absolute; float: right;
bottom: 32px; width: 131px;
left: 169px; height: 46px;
background: #FFFFFF;
border-radius: 8px;
border: 1px solid #F1F1F1;
} }
} }
}
/*注册样式*/
::v-deep .el-dialog.registration {
height: calc(100% - 132px);
overflow-y: auto;
overflow-x: hidden;
.el-dialog__header { .loginin {
display: none; width: 340px;
height: 48px;
background: #0081FF;
border-radius: 4px;
margin: 0 auto;
line-height: 48px;
font-size: 16px;
font-family: Microsoft YaHei-Bold, Microsoft YaHei;
font-weight: bold;
color: #FFFFFF;
text-align: center;
} }
.el-dialog__body { .loginbot {
padding: 30px 0; position: absolute;
bottom: 32px;
.header { left: 169px;
display: flex; }
justify-content: center; }
}
/*注册样式*/
::v-deep .el-dialog.registration {
height: calc(100% - 132px);
overflow-y: auto;
overflow-x: hidden;
.el-dialog__header {
display: none;
}
.el-steps { .el-dialog__body {
padding: 0; padding: 30px 0;
background: #FFFFFF;
margin-left: -8px;
.el-step__title {
width: 226px;
max-width: 226px;
padding: 8px 0 8px 16px;
background: #F2F2F2;
height: 18px;
font-size: 14px;
font-weight: 400;
color: #999999;
line-height: 18px;
}
.el-step__title.is-finish { .header {
font-weight: bold; display: flex;
color: #FFFFFF; justify-content: center;
background: #0081FF;
} .el-steps {
padding: 0;
background: #FFFFFF;
margin-left: -8px;
.el-step__title {
width: 226px;
max-width: 226px;
padding: 8px 0 8px 16px;
background: #F2F2F2;
height: 18px;
font-size: 14px;
font-weight: 400;
color: #999999;
line-height: 18px;
}
.el-step__title::before, .el-step__title::after { .el-step__title.is-finish {
content: ''; font-weight: bold;
display: block; color: #FFFFFF;
position: absolute; background: #0081FF;
top: 0; }
width: 0;
height: 0;
}
.el-step__title::before { .el-step__title::before, .el-step__title::after {
left: 0; content: '';
border-top: 17px solid transparent; display: block;
border-left: 8px solid #FFFFFF; position: absolute;
border-bottom: 17px solid transparent; top: 0;
z-index: 9; width: 0;
} height: 0;
}
.el-step__title::before {
left: 0;
border-top: 17px solid transparent;
border-left: 8px solid #FFFFFF;
border-bottom: 17px solid transparent;
z-index: 9;
}
.el-step__title::after {
right: -8px;
border-top: 17px solid transparent;
border-left: 8px solid #F2F2F2;
border-bottom: 17px solid transparent;
}
.el-step__title.is-finish::after { .el-step__title::after {
right: -8px; right: -8px;
border-top: 17px solid transparent; border-top: 17px solid transparent;
border-left: 8px solid #0081FF; border-left: 8px solid #F2F2F2;
border-bottom: 17px solid transparent; border-bottom: 17px solid transparent;
} }
.el-step:first-child .el-step__title::before, .el-step:last-child .el-step__title::after { .el-step__title.is-finish::after {
display: none; right: -8px;
} border-top: 17px solid transparent;
border-left: 8px solid #0081FF;
border-bottom: 17px solid transparent;
}
.el-step.is-simple { .el-step:first-child .el-step__title::before, .el-step:last-child .el-step__title::after {
.el-step__arrow { display: none;
display: none; }
}
}
.el-step__icon.is-text { .el-step.is-simple {
.el-step__arrow {
display: none; display: none;
} }
} }
.el-step__icon.is-text {
display: none;
}
} }
}
.content { .content {
.el-form { .el-form {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: space-between; justify-content: space-between;
width: 750px; width: 750px;
margin: 24px auto; margin: 24px auto;
.el-form-item {
margin-bottom: 16px;
.send-email {
position: absolute;
right: 16px;
padding: 0;
padding-left: 16px;
border-left: 1px solid #D8D8D8;
margin: 12px 0;
}
}
.el-input { .el-form-item {
width: 260px; margin-bottom: 16px;
input { .send-email {
height: 34px; position: absolute;
} right: 16px;
padding: 0;
padding-left: 16px;
border-left: 1px solid #D8D8D8;
margin: 12px 0;
} }
}
.email-input .el-input { .el-input {
width: 668px; width: 260px;
input {
height: 34px;
} }
} }
.form-title { .email-input .el-input {
width: 750px; width: 668px;
height: 24px;
font-size: 14px;
font-weight: bold;
color: #333333;
line-height: 24px;
margin: 24px auto;
} }
}
.line-box { .form-title {
position: relative; width: 750px;
width: 100vw; height: 24px;
height: 1px; font-size: 14px;
background: #EEEEEE; font-weight: bold;
} color: #333333;
line-height: 24px;
margin: 24px auto;
}
.checkBtn { .line-box {
display: block; position: relative;
width: 178px; width: 100vw;
padding: 9px 20px; height: 1px;
margin: 24px auto; background: #EEEEEE;
} }
.agreement { .checkBtn {
width: 345px; display: block;
height: 18px; width: 178px;
font-size: 14px; padding: 9px 20px;
color: #9E9E9E; margin: 24px auto;
line-height: 18px; }
margin: auto;
.agreement {
width: 345px;
height: 18px;
font-size: 14px;
color: #9E9E9E;
line-height: 18px;
margin: auto;
}
.company-detail {
.el-input {
width: 240px;
} }
.company-detail { .upload-image {
display: flex;
flex-wrap: wrap;
width: 300px;
.el-input { .el-form-item__label-wrap {
width: 240px; margin-left: 0 !important;
} }
.upload-image { .el-form-item__content {
display: flex; width: 287px;
flex-wrap: wrap; height: 176px;
width: 300px; background: #F4F4F4;
border-radius: 8px 8px 8px 8px;
.el-form-item__label-wrap { opacity: 1;
margin-left: 0 !important; border: 1px solid #DCDCDC;
} margin-left: 0 !important;
.el-form-item__content { .avatar-uploader {
width: 287px; height: 100%;
height: 176px;
background: #F4F4F4;
border-radius: 8px 8px 8px 8px;
opacity: 1;
border: 1px solid #DCDCDC;
margin-left: 0 !important;
.avatar-uploader { .el-upload {
width: 100%;
height: 100%; height: 100%;
.el-upload { div {
width: 100%; display: flex;
height: 100%; flex-wrap: wrap;
justify-content: center;
div { margin-top: 46px;
display: flex; }
flex-wrap: wrap;
justify-content: center; img {
margin-top: 46px; width: 56px;
}
img {
width: 56px;
}
p {
margin: 16px;
width: 100%;
height: 18px;
font-size: 14px;
color: #999999;
line-height: 18px;
}
} }
.el-upload__tip { p {
margin: 16px;
width: 100%;
height: 18px; height: 18px;
font-size: 14px; font-size: 14px;
color: #9E9E9E; color: #999999;
line-height: 18px; line-height: 18px;
margin-left: 7px;
margin-top: 16px;
} }
} }
.el-upload__tip {
height: 18px;
font-size: 14px;
color: #9E9E9E;
line-height: 18px;
margin-left: 7px;
margin-top: 16px;
}
} }
} }
}
.left-title { .left-title {
.el-form-item__label-wrap { .el-form-item__label-wrap {
margin-left: 0 !important; margin-left: 0 !important;
} }
.el-form-item__content { .el-form-item__content {
margin-left: 79px !important; margin-left: 79px !important;
}
} }
}
.more-left-title { .more-left-title {
.el-form-item__label-wrap { .el-form-item__label-wrap {
margin-left: -14px !important; margin-left: -14px !important;
}
} }
} }
}
.register-results { .register-results {
width: 480px; width: 480px;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
margin: 96px auto; margin: 96px auto;
img { img {
width: 130px; width: 130px;
height: 108px; height: 108px;
} }
p { p {
width: 100%; width: 100%;
height: 21px; height: 21px;
font-size: 16px; font-size: 16px;
font-weight: bold; font-weight: bold;
color: #333333; color: #333333;
line-height: 21px; line-height: 21px;
text-align: center; text-align: center;
margin: 32px 0 24px; margin: 32px 0 24px;
} }
span { span {
height: 18px; height: 18px;
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
color: #999999; color: #999999;
line-height: 18px; line-height: 18px;
}
} }
} }
} }
} }
::v-deep .el-dialog.registration-policy { }
.el-dialog__body { ::v-deep .el-dialog.registration-policy {
height: 567px; .el-dialog__body {
overflow-y: auto; height: 567px;
padding: 16px 16px 3px; overflow-y: auto;
margin: 10px 16px 0; padding: 16px 16px 3px;
background: #F9F9F9; margin: 10px 16px 0;
} background: #F9F9F9;
}
.el-dialog__footer { .el-dialog__footer {
text-align: left; text-align: left;
.el-button { .el-button {
padding: 9px 20px; padding: 9px 20px;
}
} }
} }
}
</style> </style>
...@@ -12,11 +12,13 @@ import com.supServer.framework.web.domain.AjaxResult; ...@@ -12,11 +12,13 @@ import com.supServer.framework.web.domain.AjaxResult;
import com.supServer.project.entity.UserInfo; import com.supServer.project.entity.UserInfo;
import com.supServer.project.entity.vo.ForgotPasswordVo; import com.supServer.project.entity.vo.ForgotPasswordVo;
import com.supServer.project.entity.vo.UserResetPwdVo; import com.supServer.project.entity.vo.UserResetPwdVo;
import com.supServer.project.mapper.UserInfoMapper;
import com.supServer.project.service.SmsService; import com.supServer.project.service.SmsService;
import com.supServer.project.service.UserInfoService; import com.supServer.project.service.UserInfoService;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.crypto.bcrypt.BCrypt;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
...@@ -63,6 +65,10 @@ public class UserController { ...@@ -63,6 +65,10 @@ public class UserController {
if(userInfo.getAccountStatus().equals("3")){ if(userInfo.getAccountStatus().equals("3")){
return AjaxResult.error("当前账号已注销"); return AjaxResult.error("当前账号已注销");
} }
String oldPassword = BCrypt.hashpw(loginBody.getPassword(), userInfo.getPassword());
if (!oldPassword.equals(userInfo.getPassword())) {
return AjaxResult.error("密码错误");
}
//AesUtil.decode(loginBody.getUserName()),AesUtil.decode(loginBody.getPassword()),loginBody.getCode(),loginBody.getUuid(),loginBody.getType() //AesUtil.decode(loginBody.getUserName()),AesUtil.decode(loginBody.getPassword()),loginBody.getCode(),loginBody.getUuid(),loginBody.getType()
String token = userLoginService.login(loginBody.getUserName(),loginBody.getPassword(),loginBody.getCode(),loginBody.getUuid()); String token = userLoginService.login(loginBody.getUserName(),loginBody.getPassword(),loginBody.getCode(),loginBody.getUuid());
AjaxResult ajax = AjaxResult.success(); AjaxResult ajax = AjaxResult.success();
......
...@@ -112,7 +112,7 @@ public class UserInfoServiceImpl implements UserInfoService { ...@@ -112,7 +112,7 @@ public class UserInfoServiceImpl implements UserInfoService {
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
UserInfo userInfoToken = loginUser.getUser(); UserInfo userInfoToken = loginUser.getUser();
// 查询最新的数据 // 查询最新的数据
UserInfo userInfo = userInfoMapper.selectUserByUserName(userInfoToken.getUserName()); UserInfo userInfo = userInfoMapper.selectUserByUserName(userInfoToken.getPhone());
// 原密码 // 原密码
String oldPassword = BCrypt.hashpw(userInfoVo.getOldPassword(), userInfo.getPassword()); String oldPassword = BCrypt.hashpw(userInfoVo.getOldPassword(), userInfo.getPassword());
if (!oldPassword.equals(userInfo.getPassword())) { if (!oldPassword.equals(userInfo.getPassword())) {
......
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