|
@@ -1,64 +1,60 @@
|
|
|
const app = getApp();
|
|
|
Component({
|
|
|
- /**
|
|
|
- * 组件的属性列表
|
|
|
- */
|
|
|
- properties: {
|
|
|
-
|
|
|
- tabbar: {
|
|
|
- type: Object,
|
|
|
- value: {
|
|
|
- "backgroundColor": "#ffffff",
|
|
|
- "color": "#979795",
|
|
|
- "selectedColor": "#1c1c1b",
|
|
|
- "currentTab": 0, // 默认首页为选中页面
|
|
|
- "list": [
|
|
|
- {
|
|
|
- "selectedIconPath": "../../pages/images/f-fw2.png",
|
|
|
- "iconPath": "../../pages/images/f-sy.png",
|
|
|
- "pagePath": "../../pages/index/index",
|
|
|
- "selected":false,
|
|
|
- "text": "首页"
|
|
|
+ /**
|
|
|
+ * 组件的属性列表
|
|
|
+ */
|
|
|
+ properties: {
|
|
|
+
|
|
|
+ },
|
|
|
+ data: {
|
|
|
+ isIphoneX: app.globalData.systemInfo.model.search('iPhone') != -1 ? true : false,
|
|
|
+ selected: 0,
|
|
|
+ backgroundColor: "#ffffff",
|
|
|
+ color: "#979795",
|
|
|
+ selectedColor: "#1c1c1b",
|
|
|
+ currentTab: 0, // 默认首页为选中页面
|
|
|
+ list: [{
|
|
|
+ "selectedIconPath": "../../pages/images/f-fw2.png",
|
|
|
+ "iconPath": "../../pages/images/f-sy.png",
|
|
|
+ "pagePath": "../../pages/index/index",
|
|
|
+ "selected": false,
|
|
|
+ "text": "首页"
|
|
|
},
|
|
|
{
|
|
|
- "selectedIconPath": "../../pages/images/f-gk2.png",
|
|
|
- "iconPath": "../../pages/images/f-gk.png",
|
|
|
- "pagePath": "../../pages/publics/publics",
|
|
|
- "selected":false,
|
|
|
- "text": "公开"
|
|
|
+ "selectedIconPath": "../../pages/images/f-gk2.png",
|
|
|
+ "iconPath": "../../pages/images/f-gk.png",
|
|
|
+ "pagePath": "../../pages/publics/publics",
|
|
|
+ "text": "公开"
|
|
|
},
|
|
|
{
|
|
|
- "selectedIconPath": "../../pages/images/f-zsna.png",
|
|
|
- "iconPath": "../../pages/images/l-grzl.png",
|
|
|
- "pagePath": "../../pages/nais/nais",
|
|
|
- "selected":false,
|
|
|
- "isSpecial":true,
|
|
|
- "text": ""
|
|
|
+ "selectedIconPath": "../../pages/images/f-gk2.png",
|
|
|
+ "iconPath": "../../pages/images/f-gk.png",
|
|
|
+ "pagePath": "../../pages/nais/nais",
|
|
|
+ "isSpecial": true,
|
|
|
+ "text": "这是南岸"
|
|
|
},
|
|
|
{
|
|
|
- "selectedIconPath": "../../pages/images/l-grzl.png",
|
|
|
- "iconPath": "../../pages/images/l-grzl.png",
|
|
|
- "pagePath": "../../pages/serve/serve",
|
|
|
- "selected":false,
|
|
|
- "text": "服务"
|
|
|
+ "selectedIconPath": "../../pages/images/f-fw2.png",
|
|
|
+ "iconPath": "../../pages/images/f-fw.png",
|
|
|
+ "pagePath": "../../pages/serve/serve",
|
|
|
+ "text": "服务"
|
|
|
},
|
|
|
{
|
|
|
- "selectedIconPath": "../../pages/images/l-grzl.png",
|
|
|
- "iconPath": "../../pages/images/l-grzl.png",
|
|
|
- "pagePath": "../../pages/myCenter/myCenter",
|
|
|
- "selected":false,
|
|
|
- "text": "我的"
|
|
|
+ "selectedIconPath": "../../pages/images/f-wd2.png",
|
|
|
+ "iconPath": "../../pages/images/f-wd.png",
|
|
|
+ "pagePath": "../../pages/myCenter/myCenter",
|
|
|
+ "text": "我的"
|
|
|
}
|
|
|
- ]
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- data: {
|
|
|
- isIphoneX: app.globalData.systemInfo.model.search('iPhone') != -1 ? true : false,
|
|
|
- selected:0
|
|
|
- // isIphoneX: app.e
|
|
|
- },
|
|
|
- methods: {
|
|
|
-
|
|
|
- }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ switchTab(e) {
|
|
|
+ const data = e.currentTarget.dataset
|
|
|
+ const url = data.path
|
|
|
+ wx.switchTab({url})
|
|
|
+ this.setData({
|
|
|
+ selected: data.index
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
})
|