Browse Source

删除鸡蛋估价页面跳转逻辑,简化代码结构

pull/3/head
徐飞洋 2 months ago
parent
commit
db8618cdff
  1. 23
      custom-tab-bar/index.js
  2. 2
      custom-tab-bar/index.wxml
  3. 3
      pages/evaluate/index.js

23
custom-tab-bar/index.js

@ -176,29 +176,6 @@ Component({
})
},
// 跳转到鸡蛋估价页面
goToEvaluatePage() {
console.log('点击鸡蛋估价按钮,跳转到估价页面');
wx.switchTab({
url: '/pages/evaluate/index',
success: (res) => {
console.log('跳转到估价页面成功:', res);
},
fail: (err) => {
console.error('跳转到估价页面失败,尝试使用reLaunch:', err);
wx.reLaunch({
url: '/pages/evaluate/index',
success: (res) => {
console.log('reLaunch到估价页面成功:', res);
},
fail: (err) => {
console.error('reLaunch到估价页面也失败:', err);
}
});
}
});
},
// 从全局数据同步状态的方法 - 增强版

2
custom-tab-bar/index.wxml

@ -51,7 +51,7 @@
<view class="tab-bar-icon">
<view class="tab-bar-badge" wx:if="{{badges['profile']}}">{{badges['profile']}}</view>
</view>
<view class="tab-bar-text">我</view>
<view class="tab-bar-text">我</view>
</view>
</view>
</view>

3
pages/evaluate/index.js

@ -30,7 +30,8 @@ Page({
],
// 品种选项
breedOptions: [
'黄蛋(红蛋)'
'黄蛋(红蛋)',
'粉蛋'
]
},

Loading…
Cancel
Save