123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- const app = getApp()
- Component({
- data: {
- selected: '',
- color: "#7A7E83",
- selectedColor: "#409eff",
- list: [{
- "pagePath": "/pages/home/index",
- "iconPath": "/image/home1.png",
- "selectedIconPath": "/image/home2.png",
- "text": "首页"
- },
- {
- "pagePath": "/pages/reserve/index",
- "iconPath": "/image/reserve1.png",
- "selectedIconPath": "/image/reserve2.png",
- "text": "报餐"
- },
- {
- "pagePath": "/pages/news/index",
- "iconPath": "/image/news1.png",
- "selectedIconPath": "/image/news2.png",
- "text": "新闻"
- },
- {
- "pagePath": "/pages/my/index",
- "iconPath": "/image/my1.png",
- "selectedIconPath": "/image/my2.png",
- "text": "我的"
- }]
- },
- attached() {
- },
- methods: {
- switchTab(e) {
- const { index, path } = e.currentTarget.dataset;
- wx.switchTab({ url: path })
- // wx.switchTab({ url })
- // wx.reLaunch({ url })
- // this.setData({
- // selected: data.index
- // })
- }
- }
- })
|