diff --git a/src/config/getData2.js b/src/config/getData2.js index 0e4dbbb..64fcc15 100644 --- a/src/config/getData2.js +++ b/src/config/getData2.js @@ -126,3 +126,9 @@ export const paramEdit = (id, code, name, value, remark) => post('api/param/edit export const paramDelete = (paramsIds) => post('api/param/delete', { paramsIds: paramsIds }) + +// 修改密码 +export const updatePass = (newPass, oldPass) => post('api/users/updatePass', { + newPass: newPass, + oldPass: oldPass +}) diff --git a/src/pages/modules/systemmanage/user.vue b/src/pages/modules/systemmanage/user.vue index 6e8ddbe..71ecaec 100644 --- a/src/pages/modules/systemmanage/user.vue +++ b/src/pages/modules/systemmanage/user.vue @@ -256,9 +256,11 @@ export default { rolesIds.push(el) } }) - await usersAdd(this.username, this.name, this.sex, this.phone, rolesIds, this.password) - this.toast('操作成功') - this._usersQuery() + let res = await usersAdd(this.username, this.name, this.sex, this.phone, rolesIds, this.password) + if (res.code === '1') { + this._usersQuery() + } + this.toast(res.desc) this.$refs.child.active = false this.$refs.child.disabled = false } catch (e) { diff --git a/src/pages/shells/index/index.vue b/src/pages/shells/index/index.vue index 7e4109d..2887496 100644 --- a/src/pages/shells/index/index.vue +++ b/src/pages/shells/index/index.vue @@ -21,22 +21,69 @@
90%
-
-
{{ username }}
+
+
+
+
{{ username }}
+
+
+ +
+
+
+ +
+
+
+
*旧的密码
+
+ +
+
+
+
+
+
*新的密码
+
+ +
+
+
+
+
+
*新的密码
+
+ +
+
+
+
+