6.30 版本提交

This commit is contained in:
尚政杰
2025-06-30 19:02:44 +08:00
commit c4267a0e27
338 changed files with 27942 additions and 0 deletions

View File

@@ -0,0 +1,75 @@
// components/custom-tab-bar/index.js
const app = getApp();
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
color: "#858C9A",
selected:0,
selectedColor: "#F97316",
list: [
{
"pagePath": "/pages/index/index",
"text": "新闻动量",
"iconPath": "/static/icon/tabbar/home.png",
"selectedIconPath": "/static/icon/tabbar/home_s.png"
},
{
"pagePath": "/pages/invest/invest",
"text": "投资日历",
"iconPath": "/static/icon/tabbar/invest.png",
"selectedIconPath": "/static/icon/tabbar/invest_s.png"
},
{
"pagePath": "/pages/mine/mine",
"text": "个人中心",
"iconPath": "/static/icon/tabbar/mine.png",
"selectedIconPath": "/static/icon/tabbar/mine_s.png"
}
]
},
attached() {
this.setData({
selected:app.globalData.tabIndex
})
},
/**
* 组件的方法列表
*/
methods: {
switchTab(e) {
const data = e.currentTarget.dataset;
const url = data.path;
const index = data.index
// if(index==2||index==4)
// {
// //如果是购物车和我的,需要登录
// let token = wx.getStorageSync('token')
// if (!token) {
// wx.navigateTo({
// url:'/pages/login/login'
// })
// return
// }
// }
app.globalData.tabIndex = index
wx.switchTab({url})
},
navigateTo(e) {
const data = e.currentTarget.dataset;
const url = data.path;
wx.navigateTo({
url: url
})
}
}
})