修改个人信息bug

This commit is contained in:
jmal 2020-03-24 18:02:50 +08:00
parent 4324e9dfd2
commit 1bd1da3e85
5 changed files with 16 additions and 12 deletions

View File

@ -37,7 +37,7 @@ npm run dev
```
### 4. Build
```bush
```bash
# build for test environment
npm run build:stage

View File

@ -34,7 +34,7 @@ export function logout() {
export function userUpdate(data) {
return request({
url: 'user/update',
method: 'post',
method: 'put',
data
})
}
@ -58,7 +58,7 @@ export function validOldPass(data) {
export function updatePass(data) {
return request({
url: 'user/update-pass',
method: 'post',
method: 'put',
data
})
}
@ -66,7 +66,7 @@ export function updatePass(data) {
export function resetPass(id) {
return request({
url: 'user/reset-pass',
method: 'post',
method: 'put',
params: {id}
})
}
@ -74,7 +74,7 @@ export function resetPass(id) {
export function delUser(id) {
return request({
url: 'user/delete',
method: 'get',
method: 'delete',
params: {id}
})
}

View File

@ -5,6 +5,10 @@
.avatar-value{
position: absolute;
z-index: 1;
/deep/.el-icon-user-solid{
font-size: 50px;
padding: 25px;
}
}
.avatar-value:hover {
cursor: pointer;

View File

@ -448,8 +448,8 @@ export default {
dragLoop: null,
positionX:0,
positionY:0,
grid: true,
vmode: 'grid',
grid: false,
vmode: 'list',
gridColumnNum: -1,
gridHoverItemIndex: -1,
gridHoverIntermediate: -1,

View File

@ -22,7 +22,7 @@
</el-dialog>
<el-form ref="cusomerInfoForm" :model="cusomerInfoForm" label-width="120px">
<el-form-item label="头像" class="form-item-avatar">
<el-avatar class="avatar-value" shape="circle" :size="100" fit="fit" :src="srcImage" ></el-avatar>
<el-avatar icon="el-icon-user-solid" class="avatar-value" shape="circle" :size="100" fit="fit" :src="srcImage" ></el-avatar>
<el-avatar class="avatar-overlay" shape="circle" :size="100" @click.native="dialogAvatar=true"> 修改头像 </el-avatar>
</el-form-item>
<el-form-item label="密码">
@ -175,10 +175,10 @@
}else{
// 验证旧密码
this.userUpdateLoading = true
let data = new FormData()
data.append("id",this.$store.state.user.userId)
data.append("password",this.passwordForm.oldPassword)
validOldPass(data).then(() => {
validOldPass({
id: this.$store.state.user.userId,
password: this.passwordForm.oldPassword
}).then(() => {
this.userUpdateLoading = false
this.validOldPass = true
this.passwordFormTitle = '新密码'