From fb7067007c1292e2241640c0e6c8b9ef6c976249 Mon Sep 17 00:00:00 2001 From: oldHome Date: Fri, 27 Jun 2025 17:57:05 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E6=9D=83=E9=99=90=E4=B8=8B=E6=8C=BC?= =?UTF-8?q?=E5=90=97init=E5=88=9D=E5=A7=8B=E5=8C=96=20=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E9=BB=98=E8=AE=A4=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/layout/components/main/admin/add.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/views/layout/components/main/admin/add.vue b/src/views/layout/components/main/admin/add.vue index 75278b8..12b17f8 100644 --- a/src/views/layout/components/main/admin/add.vue +++ b/src/views/layout/components/main/admin/add.vue @@ -77,7 +77,7 @@ export default { upFile: '', oldFile: '', pwd: '', - role: 'admin' + role: '' }, adminId: this.$route.params.id, // get参数 获取管理员id 没有为添加页面 pageState: 'add', // 页面状态 @@ -121,6 +121,7 @@ export default { this.form.name = data.name this.form.uname = data.uname this.form.oldFile = data.oldFile + this.form.role = data.role if (Object.keys(data).length === 0) { this.$message.warning('清空表单') } @@ -136,7 +137,7 @@ export default { const data = { name: this.admin.name, uname: this.admin.uname, - role: this.admin.role === 5 ? 'admin' : 'editor', + role: (Number(this.admin.role) === 5 || Number(this.admin.role) === 4) ? 'admin' : 'editor', oldFile: this.admin.photo, shop_id: this.admin.shop_id }