|
@@ -1,70 +1,67 @@
|
|
import {
|
|
import {
|
|
- storeBindingsBehavior
|
|
+ storeBindingsBehavior
|
|
} from 'mobx-miniprogram-bindings'
|
|
} from 'mobx-miniprogram-bindings'
|
|
import {
|
|
import {
|
|
- store
|
|
+ store
|
|
} from '~/store/index'
|
|
} from '~/store/index'
|
|
Component({
|
|
Component({
|
|
- behaviors: [storeBindingsBehavior],
|
|
+ behaviors: [storeBindingsBehavior],
|
|
- storeBindings: {
|
|
+ storeBindings: {
|
|
- store,
|
|
+ store,
|
|
- fields: {
|
|
+ fields: {
|
|
- userInfo: 'userInfo'
|
|
+ userInfo: 'userInfo'
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ * 组件的属性列表
|
|
|
|
+ */
|
|
|
|
+ properties: {},
|
|
|
|
+
|
|
|
|
+ * 组件的初始数据
|
|
|
|
+ */
|
|
|
|
+ data: {
|
|
|
|
+ selected: 2,
|
|
|
|
+ color: "#999999",
|
|
|
|
+ selectedColor: "#32CA69",
|
|
|
|
+ mask: false,
|
|
|
|
+ listTab: [{
|
|
|
|
+ "pagePath": "/pages/message/index",
|
|
|
|
+ "text": "消息",
|
|
|
|
+ "iconPath": "/static/message.png",
|
|
|
|
+ "selectedIconPath": "/static/message2.png"
|
|
|
|
+ }, {
|
|
|
|
+ "pagePath": "/pages/activity/index",
|
|
|
|
+ "text": "活动",
|
|
|
|
+ "iconPath": "/static/activity.png",
|
|
|
|
+ "selectedIconPath": "/static/activity2.png"
|
|
|
|
+ }, {
|
|
|
|
+ "pagePath": "/pages/works/index",
|
|
|
|
+ "text": "作品",
|
|
|
|
+ "iconPath": "/static/zp.png",
|
|
|
|
+ "selectedIconPath": "/static/zp2.png"
|
|
|
|
+ }, {
|
|
|
|
+ "pagePath": "/pages/index/index",
|
|
|
|
+ "text": "推荐",
|
|
|
|
+ "iconPath": "/static/tj.png",
|
|
|
|
+ "selectedIconPath": "/static/tj2.png"
|
|
|
|
+ }, {
|
|
|
|
+ "pagePath": "/pages/my/index",
|
|
|
|
+ "text": "我的",
|
|
|
|
+ "iconPath": "/static/my.png",
|
|
|
|
+ "selectedIconPath": "/static/my2.png"
|
|
|
|
+ }]
|
|
},
|
|
},
|
|
- },
|
|
|
|
-
|
|
|
|
- * 组件的属性列表
|
|
|
|
- */
|
|
|
|
- properties: {
|
|
|
|
-
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- * 组件的初始数据
|
|
|
|
- */
|
|
|
|
- data: {
|
|
|
|
- selected: 0,
|
|
|
|
- color: "#999999",
|
|
|
|
- selectedColor: "#32CA69",
|
|
|
|
- mask:false,
|
|
|
|
- listTab: [{
|
|
|
|
- "pagePath": "/pages/index/index",
|
|
|
|
- "text": "推荐",
|
|
|
|
- "iconPath": "/static/tj.png",
|
|
|
|
- "selectedIconPath": "/static/tj2.png"
|
|
|
|
- }, {
|
|
|
|
- "pagePath": "/pages/activity/index",
|
|
|
|
- "text": "活动",
|
|
|
|
- "iconPath": "/static/activity.png",
|
|
|
|
- "selectedIconPath": "/static/activity2.png"
|
|
|
|
- }, {
|
|
|
|
- "pagePath": "/pages/works/index",
|
|
|
|
- "text": "作品",
|
|
|
|
- "iconPath": "/static/zp.png",
|
|
|
|
- "selectedIconPath": "/static/zp2.png"
|
|
|
|
- }, {
|
|
|
|
- "pagePath": "/pages/message/index",
|
|
|
|
- "text": "消息",
|
|
|
|
- "iconPath": "/static/message.png",
|
|
|
|
- "selectedIconPath": "/static/message2.png"
|
|
|
|
- }, {
|
|
|
|
- "pagePath": "/pages/my/index",
|
|
|
|
- "text": "我的",
|
|
|
|
- "iconPath": "/static/my.png",
|
|
|
|
- "selectedIconPath": "/static/my2.png"
|
|
|
|
- }]
|
|
|
|
- },
|
|
|
|
|
|
|
|
-
|
|
+
|
|
- * 组件的方法列表
|
|
+ * 组件的方法列表
|
|
- */
|
|
+ */
|
|
- methods: {
|
|
+ methods: {
|
|
- switchTab(e) {
|
|
+ switchTab(e) {
|
|
- const data = e.currentTarget.dataset;
|
|
+ const data = e.currentTarget.dataset;
|
|
- const url = data.path;
|
|
+ const url = data.path;
|
|
- wx.switchTab({
|
|
+ wx.switchTab({
|
|
- url
|
|
+ url
|
|
- });
|
|
+ });
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- }
|
|
|
|
})
|
|
})
|