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