Browse Source

进行限制,不对外展示运费估算功能

main
Default User 4 days ago
parent
commit
bcf5df3d08
  1. 10
      pages/goods-detail/goods-detail.js
  2. 1
      pages/goods-detail/goods-detail.wxml
  3. 10
      pages/index/index.js
  4. 2
      pages/index/index.wxml

10
pages/goods-detail/goods-detail.js

@ -1452,6 +1452,16 @@ Page({
// 导航到运费计算器 // 导航到运费计算器
navigateToFreightCalculator: function() { navigateToFreightCalculator: function() {
// 权限检查
if (!this.data.isInternalUser) {
wx.showModal({
title: '权限不足',
content: '您没有权限使用此功能',
showCancel: false
});
return;
}
const goodsDetail = this.data.goodsDetail; const goodsDetail = this.data.goodsDetail;
if (!goodsDetail) { if (!goodsDetail) {
wx.showToast({ wx.showToast({

1
pages/goods-detail/goods-detail.wxml

@ -397,6 +397,7 @@
class="chat-button bottom-button" class="chat-button bottom-button"
bindtap="navigateToFreightCalculator" bindtap="navigateToFreightCalculator"
data-id="{{goodsDetail.id}}" data-id="{{goodsDetail.id}}"
wx:if="{{isInternalUser}}"
> >
运费估算 运费估算
</button> </button>

10
pages/index/index.js

@ -434,6 +434,16 @@ Page({
// 跳转到物流运费估算页面 // 跳转到物流运费估算页面
navigateToFreightCalculator() { navigateToFreightCalculator() {
// 权限检查
if (!this.data.isInPersonnel) {
wx.showModal({
title: '权限不足',
content: '您没有权限使用此功能',
showCancel: false
});
return;
}
// 记录用户操作历史 // 记录用户操作历史
API.addUserHistory('运费估算'); API.addUserHistory('运费估算');

2
pages/index/index.wxml

@ -218,7 +218,7 @@
<text class="function-btn-icon">📄</text> <text class="function-btn-icon">📄</text>
<text class="function-btn-text">我们</text> <text class="function-btn-text">我们</text>
</view> </view>
<view class="function-btn" bindtap="navigateToFreightCalculator"> <view class="function-btn" bindtap="navigateToFreightCalculator" wx:if="{{isInPersonnel}}">
<text class="function-btn-icon">🚚</text> <text class="function-btn-icon">🚚</text>
<text class="function-btn-text">运费估算</text> <text class="function-btn-text">运费估算</text>
</view> </view>

Loading…
Cancel
Save