123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- const app = getApp();
- Component({
- /**
- * 组件的属性列表
- */
- properties: {
-
- },
- data: {
- selected: null,
- color: "#999999",
- selectedColor: "#508FF4",
- list: [{
- "selectedIconPath": "/pages/images/f-sy2.png",
- "iconPath": "/pages/images/f-sy.png",
- "pagePath": "/pages/index/index",
- "text": "首页"
- },
- {
- "selectedIconPath": "/pages/images/f-gk2.png",
- "iconPath": "/pages/images/f-gk.png",
- "pagePath": "/pages/publics/index/index",
- "text": "公开"
- },
- {
- "pagePath": "/pages/nais/nais",
- "isSpecial": true,
- "text": "这是南岸"
- },
- {
- "selectedIconPath": "/pages/images/f-fw2.png",
- "iconPath": "/pages/images/f-fw.png",
- "pagePath": "/pages/serve/serve",
- "text": "服务"
- },
- {
- "selectedIconPath": "/pages/images/f-wd2.png",
- "iconPath": "/pages/images/f-wd.png",
- "pagePath": "/pages/myCenter/myCenter",
- "text": "我的"
- }
- ]
- },
- methods: {
- switchTab(e) {
- const data = e.currentTarget.dataset
- const url = data.path
- this.setData({
- selected: data.index
- })
- wx.switchTab({url})
- }
- }
- })
|