1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
| // pages/info/info.js
|
| import { ComponentWithStore } from 'mobx-miniprogram-bindings'
| import { userStore } from '@/stores/userstore'
|
| ComponentWithStore({
| // 页面的初始数据
| data: {
| // 初始化第二个面板数据
| initpanel: [
| {
| url: '/modules/orderPayModule/pages/order/list/list',
| title: '商品订单',
| iconfont: 'icon-dingdan'
| },
| {
| url: '/modules/orderPayModule/pages/order/list/list',
| title: '礼品卡订单',
| iconfont: 'icon-lipinka'
| },
| {
| url: '/modules/orderPayModule/pages/order/list/list',
| title: '退款/售后',
| iconfont: 'icon-tuikuan'
| }
| ]
| },
|
| storeBindings: {
| store: userStore,
| fields: ['token', 'userInfo']
| },
|
| methods: {
| // 跳转到登录页面
| toLoginPage() {
| wx.navigateTo({
| url: '/pages/login/login'
| })
| }
| },
|
|
| pageLifetimes: {
| show() {
| if (typeof this.getTabBar === 'function' &&
| this.getTabBar()) {
| this.getTabBar().setData({
| selected: 2
| })
| }
| }
| }
| })
|
|