Commit aef46923 authored by Mac's avatar Mac

1

parent 2213deb5
......@@ -99,3 +99,15 @@ export function getEmployeeAddrBook(data)
data
})
}
/**
* 个人资料-修改密码
*/
export function updateUserPassword(data)
{
return request({
url: '/UserInfo/UpdateUserPassword',
method: 'post',
data
})
}
......@@ -137,6 +137,8 @@
<div class="headportrait">
<q-avatar size="120px" font-size="36px" rounded style="background:#C9F7F5" text-color="white">
<img :src="datamodify.UserIcon" v-if="datamodify.UserIcon">
<span v-else>{{showObj.AccountName.substring(0,1)}}</span>
</q-avatar>
<el-upload class="editbianji" :http-request="uploadFileBtn" :multiple="false" action=''
accept=".JPG, .PNG, .JPEG,.jpg, .png, .jpeg" :show-file-list="false">
......@@ -176,6 +178,7 @@
<div class="box_r_input">
<q-input v-model="passwordMsg.OldPassWord" label="请输入旧密码" type='password' ref='OldPassWord'
:rules="[val => !!val || '请输入旧密码']" lazy-rules filled />
</div>
<div class="box_r_title">新密码</div>
<div class="box_r_input">
......@@ -196,7 +199,8 @@
</template>
<script>
import {
setEmployeeBaseInfo
setEmployeeBaseInfo,
updateUserPassword
} from '../../api/users/user'
import {
getSchoolDropdown,
......@@ -225,8 +229,6 @@
datamodify: {},
CompanyList: [],
passwordMsg:Object.assign({},defaultpassword),
name: '',
age: '',
}
},
created() {
......@@ -344,7 +346,20 @@
}
else {
// 掉接口
console.log('掉接口')
updateUserPassword(this.passwordMsg).then(res => {
if (res.Code == 1) {
this.$q.notify({
type: 'iconfont icon-chenggong',
color: 'accent',
position: "top",
message: res.Message
})
this.passwordMsg = Object.assign({},defaultpassword)
}
}).catch(() => {
})
}
},
......
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