bug修改
This commit is contained in:
parent
8a76f43cea
commit
28818df411
|
|
@ -47,15 +47,11 @@ export function resetPwd(data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 用户密码修改
|
// 用户密码修改
|
||||||
export function updateUserPwd(oldPassword, newPassword) {
|
export function updateUserPwd(data) {
|
||||||
const data = {
|
|
||||||
oldPassword,
|
|
||||||
newPassword
|
|
||||||
}
|
|
||||||
return request({
|
return request({
|
||||||
url: '/system/user/profile/updatePwd',
|
url: '/system/user/updatePwd',
|
||||||
method: 'put',
|
method: 'post',
|
||||||
params: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -65,14 +65,14 @@ export const constantRoutes = [
|
||||||
path: '',
|
path: '',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
redirect: 'index',
|
redirect: 'index',
|
||||||
// children: [
|
children: [
|
||||||
// {
|
{
|
||||||
// path: 'index',
|
path: 'index',
|
||||||
// component: () => import('@/views/dashboard'),
|
component: () => import('@/views/index'),
|
||||||
// name: 'Index',
|
name: 'Index',
|
||||||
// meta: { title: '首页', icon: 'dashboard', affix: true }
|
meta: { title: '首页', icon: 'dashboard', affix: true }
|
||||||
// }
|
}
|
||||||
// ]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/user',
|
path: '/user',
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,11 @@
|
||||||
<div class="app-container home">
|
<div class="app-container home">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :sm="24" :lg="12" style="padding-left: 20px">
|
<el-col :sm="24" :lg="12" style="padding-left: 20px">
|
||||||
<h2>博诺思后台管理框架</h2>
|
<h2>考勤后台管理系统</h2>
|
||||||
<p>
|
|
||||||
<b>当前版本:</b> <span>v{{ version }}</span>
|
|
||||||
</p>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :sm="24" :lg="12" style="padding-left: 50px">
|
<!-- <el-col :sm="24" :lg="12" style="padding-left: 50px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<h2>技术选型</h2>
|
<h2>技术选型</h2>
|
||||||
|
|
@ -40,10 +38,10 @@
|
||||||
</ul>
|
</ul>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-divider />
|
<el-divider />
|
||||||
<el-row :gutter="20">
|
<!-- <el-row :gutter="20">
|
||||||
<el-col :xs="24" :sm="24" :md="12" :lg="8">
|
<el-col :xs="24" :sm="24" :md="12" :lg="8">
|
||||||
<el-card class="update-log">
|
<el-card class="update-log">
|
||||||
<div slot="header" class="clearfix">
|
<div slot="header" class="clearfix">
|
||||||
|
|
@ -156,7 +154,7 @@
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
</el-row>
|
</el-row> -->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@ export default {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
return {
|
return {
|
||||||
|
userInfo:this.$store.state.user,
|
||||||
user: {
|
user: {
|
||||||
oldPassword: undefined,
|
oldPassword: undefined,
|
||||||
newPassword: undefined,
|
newPassword: undefined,
|
||||||
|
|
@ -55,7 +56,13 @@ export default {
|
||||||
submit() {
|
submit() {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
updateUserPwd(this.user.oldPassword, this.user.newPassword).then(response => {
|
//this.user.oldPassword, this.user.newPassword
|
||||||
|
let param={
|
||||||
|
userId:this.userInfo.id,
|
||||||
|
oldPassword:this.user.oldPassword,
|
||||||
|
password:this.user.newPassword
|
||||||
|
}
|
||||||
|
updateUserPwd(param).then(response => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue