From bcf5df3d0802030ef2085bbb722419bea84039bb Mon Sep 17 00:00:00 2001 From: Default User Date: Tue, 3 Mar 2026 16:42:09 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E9=99=90=E5=88=B6=EF=BC=8C?= =?UTF-8?q?=E4=B8=8D=E5=AF=B9=E5=A4=96=E5=B1=95=E7=A4=BA=E8=BF=90=E8=B4=B9?= =?UTF-8?q?=E4=BC=B0=E7=AE=97=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/goods-detail/goods-detail.js | 10 ++++++++++ pages/goods-detail/goods-detail.wxml | 1 + pages/index/index.js | 10 ++++++++++ pages/index/index.wxml | 2 +- 4 files changed, 22 insertions(+), 1 deletion(-) diff --git a/pages/goods-detail/goods-detail.js b/pages/goods-detail/goods-detail.js index 5759da7..fa5f9b2 100644 --- a/pages/goods-detail/goods-detail.js +++ b/pages/goods-detail/goods-detail.js @@ -1452,6 +1452,16 @@ Page({ // 导航到运费计算器 navigateToFreightCalculator: function() { + // 权限检查 + if (!this.data.isInternalUser) { + wx.showModal({ + title: '权限不足', + content: '您没有权限使用此功能', + showCancel: false + }); + return; + } + const goodsDetail = this.data.goodsDetail; if (!goodsDetail) { wx.showToast({ diff --git a/pages/goods-detail/goods-detail.wxml b/pages/goods-detail/goods-detail.wxml index cf038fb..5a988d1 100644 --- a/pages/goods-detail/goods-detail.wxml +++ b/pages/goods-detail/goods-detail.wxml @@ -397,6 +397,7 @@ class="chat-button bottom-button" bindtap="navigateToFreightCalculator" data-id="{{goodsDetail.id}}" + wx:if="{{isInternalUser}}" > 运费估算 diff --git a/pages/index/index.js b/pages/index/index.js index 32df629..3510949 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -434,6 +434,16 @@ Page({ // 跳转到物流运费估算页面 navigateToFreightCalculator() { + // 权限检查 + if (!this.data.isInPersonnel) { + wx.showModal({ + title: '权限不足', + content: '您没有权限使用此功能', + showCancel: false + }); + return; + } + // 记录用户操作历史 API.addUserHistory('运费估算'); diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 903e919..fdd8538 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -218,7 +218,7 @@ 📄 我们 - + 🚚 运费估算