From c017e9d31867b698064440171e442c11f9b51514 Mon Sep 17 00:00:00 2001 From: GaoHao <1210693421@qq.com> Date: Mon, 21 Oct 2024 10:39:42 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=9D=83=E9=99=90=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/product/category.vue | 7 +++++++ src/views/product/group/index.vue | 11 ++++++++++- src/views/product/index.vue | 18 +++++++++++++----- 3 files changed, 30 insertions(+), 6 deletions(-) diff --git a/src/views/product/category.vue b/src/views/product/category.vue index 50f658e..650c31f 100644 --- a/src/views/product/category.vue +++ b/src/views/product/category.vue @@ -64,6 +64,8 @@ // import Sortable from 'sortablejs' import addClassify from './components/addClassify' import { tbShopCategoryGet, tbShopCategoryDelete, tbShopCategoryPost, upCategorySort } from '@/api/shop' +import { hasPermission } from '@/utils/limits.js' + export default { components: { addClassify @@ -114,6 +116,9 @@ export default { // }, // 状态切换 async showChange(e, row) { + let res = await hasPermission('允许修改分类'); + if ( !res) { row.isShow = (e == 0 ? 1 : 0);return; } + try { await tbShopCategoryPost(row, 'put') this.getTableData() @@ -141,6 +146,8 @@ export default { }, // 删除 async delHandle(ids) { + let res = await hasPermission('允许修改分类'); + if ( !res) { return; } try { await tbShopCategoryDelete(ids) this.$notify({ diff --git a/src/views/product/group/index.vue b/src/views/product/group/index.vue index d887081..e6eb188 100644 --- a/src/views/product/group/index.vue +++ b/src/views/product/group/index.vue @@ -48,6 +48,7 @@