Commit aef46923 authored by Mac's avatar Mac

1

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