Browse Source

Update files

蛋吧eggbar
徐飞洋 1 month ago
parent
commit
686c87c538
  1. 26
      custom-tab-bar/index.js
  2. 4
      custom-tab-bar/index.wxml
  3. 40
      pages/evaluate2/one.js
  4. 16
      project.private.config.json

26
custom-tab-bar/index.js

@ -56,31 +56,9 @@ Component({
console.log('修正后路径:', url) console.log('修正后路径:', url)
// 当点击"估"字时,判断partnerstatus是否为approved // 当点击"估"字时,直接跳转到估价页面,不再检查入驻状态
if (key === 'evaluate') { if (key === 'evaluate') {
const app = getApp() console.log('点击估价tab,直接跳转到估价页面')
const userInfo = app.globalData.userInfo || wx.getStorageSync('userInfo') || {}
const partnerstatus = userInfo.partnerstatus
console.log('用户partnerstatus:', partnerstatus)
// 如果partnerstatus不是approved,提示用户并跳转到入驻页面
if (partnerstatus !== 'approved') {
wx.showToast({
title: '该功能需要入驻之后才能使用',
icon: 'none',
duration: 5000
})
// 5秒后自动跳转到入驻页面
setTimeout(() => {
wx.navigateTo({
url: '/pages/settlement/index'
})
}, 2000)
return
}
} }
// 更新全局数据 - 先更新全局状态,确保状态一致性 // 更新全局数据 - 先更新全局状态,确保状态一致性

4
custom-tab-bar/index.wxml

@ -33,13 +33,13 @@
<!-- 右侧按钮组 --> <!-- 右侧按钮组 -->
<view class="tab-bar-right"> <view class="tab-bar-right">
<view class="tab-bar-item {{selected === 'settlement' ? 'active' : ''}}" <view class="tab-bar-item {{selected === 'settlement' ? 'active' : ''}}"
data-path="pages/eggbar/eggbar" data-path="pages/settlement/index"
data-key="settlement" data-key="settlement"
bindtap="switchTab"> bindtap="switchTab">
<view class="tab-bar-icon"> <view class="tab-bar-icon">
<view class="tab-bar-badge" wx:if="{{badges['settlement']}}">{{badges['settlement']}}</view> <view class="tab-bar-badge" wx:if="{{badges['settlement']}}">{{badges['settlement']}}</view>
</view> </view>
<view class="tab-bar-text">蛋吧</view> <view class="tab-bar-text">入驻</view>
</view> </view>

40
pages/evaluate2/one.js

@ -469,26 +469,7 @@ Page({
return; return;
} }
// 检查用户合作状态 // 跳过合作状态检查,直接跳转到商品列表页面
const userInfo = wx.getStorageSync('userInfo') || {};
const partnerStatus = userInfo.partnerstatus || '';
if (partnerStatus !== 'approved') {
// 合作状态未批准,显示提示
wx.showModal({
title: '提示',
content: '需要入住成功才能查看',
confirmText: '立即入驻',
success: function(res) {
if (res.confirm) {
wx.navigateTo({
url: '/pages/profile/authentication/index'
});
}
}
});
return;
}
// 跳转到商品列表页面,并传递分类参数 // 跳转到商品列表页面,并传递分类参数
wx.redirectTo({ wx.redirectTo({
@ -733,24 +714,7 @@ Page({
}; };
wx.setStorageSync('userInfo', updatedUserInfo); wx.setStorageSync('userInfo', updatedUserInfo);
// 5. 检查partnerstatus值 // 跳过合作状态检查,不再显示入驻提示
if (partnerStatus !== 'approved') {
// 显示入驻提示
setTimeout(() => {
wx.showModal({
title: '提示',
content: '需要入住成功才能查看',
confirmText: '立即入驻',
success: function(res) {
if (res.confirm) {
wx.navigateTo({
url: '/pages/profile/authentication/index'
});
}
}
});
}, 2000);
}
} }
} catch (error) { } catch (error) {
wx.hideLoading(); wx.hideLoading();

16
project.private.config.json

@ -1,6 +1,6 @@
{ {
"libVersion": "3.10.3", "libVersion": "3.10.3",
"projectname": "Mini-Program", "projectname": "wechatapp",
"setting": { "setting": {
"urlCheck": false, "urlCheck": false,
"coverView": true, "coverView": true,
@ -19,17 +19,5 @@
"ignoreDevUnusedFiles": true, "ignoreDevUnusedFiles": true,
"bigPackageSizeSupport": false "bigPackageSizeSupport": false
}, },
"condition": { "condition": {}
"miniprogram": {
"list": [
{
"name": "pages/test-tools/order-test",
"pathName": "pages/test-tools/order-test",
"query": "",
"scene": null,
"launchMode": "default"
}
]
}
}
} }
Loading…
Cancel
Save