bug修改

This commit is contained in:
zzyuan 2024-11-01 20:00:51 +08:00
parent 8a76f43cea
commit 28818df411
4 changed files with 26 additions and 25 deletions

View File

@ -47,15 +47,11 @@ export function resetPwd(data) {
}
// 用户密码修改
export function updateUserPwd(oldPassword, newPassword) {
const data = {
oldPassword,
newPassword
}
export function updateUserPwd(data) {
return request({
url: '/system/user/profile/updatePwd',
method: 'put',
params: data
url: '/system/user/updatePwd',
method: 'post',
data: data
})
}

View File

@ -65,14 +65,14 @@ export const constantRoutes = [
path: '',
component: Layout,
redirect: 'index',
// children: [
// {
// path: 'index',
// component: () => import('@/views/dashboard'),
// name: 'Index',
// meta: { title: '首页', icon: 'dashboard', affix: true }
// }
// ]
children: [
{
path: 'index',
component: () => import('@/views/index'),
name: 'Index',
meta: { title: '首页', icon: 'dashboard', affix: true }
}
]
},
{
path: '/user',

View File

@ -2,13 +2,11 @@
<div class="app-container home">
<el-row :gutter="20">
<el-col :sm="24" :lg="12" style="padding-left: 20px">
<h2>博诺思后台管理框架</h2>
<p>
<b>当前版本:</b> <span>v{{ version }}</span>
</p>
<h2>考勤后台管理系统</h2>
</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-col :span="12">
<h2>技术选型</h2>
@ -40,10 +38,10 @@
</ul>
</el-col>
</el-row>
</el-col>
</el-col> -->
</el-row>
<el-divider />
<el-row :gutter="20">
<!-- <el-row :gutter="20">
<el-col :xs="24" :sm="24" :md="12" :lg="8">
<el-card class="update-log">
<div slot="header" class="clearfix">
@ -156,7 +154,7 @@
</el-card>
</el-col>
</el-row>
</el-row> -->
</div>
</template>

View File

@ -29,6 +29,7 @@ export default {
}
};
return {
userInfo:this.$store.state.user,
user: {
oldPassword: undefined,
newPassword: undefined,
@ -55,7 +56,13 @@ export default {
submit() {
this.$refs["form"].validate(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("修改成功");
});
}