// pages/index/index.js import Dialog from '../../../components/dialog/dialog' import { getStatisticsInfo } from "../../../api/saas" import util from '../../../utils/util' const event = require('../../../utils/event') const app = getApp() Component({ options: { addGlobalClass: true, multipleSlots: true }, /** 页面的初始数据 */ data: { userInfo: app.userInfo, height: app.globalData.safeFragmentHeight, tabList: [ { status: 50, badge: '', name: '待预约', icon: '/assets/agent/icon-dyy.png' }, { status: 51, badge: '', name: '待送货', icon: '/assets/agent/icon-dsh.png' }, { status: 53, badge: '', name: '结算中', icon: '/assets/agent/icon-sjz.png' }, { status: 54, badge: '', name: '已完成', icon: '/assets/agent/icon-ywc.png' } ] }, lifetimes: { attached: function () { var height = app.globalData.safeFragmentHeight - 100 this.setData({userInfo: app.userInfo, height }) event.on('EventMessage', this, this.onEvent) }, detached: function () { event.remove('EventMessage', this) } }, methods: { onRestart: function () { // this.fetchStatisticsInfo(this.data.vdate) }, onEvent: function (message) { if (message.what == 888) { } }, agentList: function (e) { if(app.userInfo.applicationStatus == 0){ Dialog.alert({ title: '温馨提示', message: '您的申请还在审核中,如有疑问请联系管理员。' }).then(() => { }) return } if(e.currentTarget.dataset.status){ wx.navigateTo({ url: '/pages/agent/order-list/index?status=' + e.currentTarget.dataset.status }) } else { wx.navigateTo({ url: '/pages/agent/order-list/index' }) } }, fetchStatisticsInfo: function(vdate){ }, settlementInfo: function(vdate){ wx.navigateTo({ url: '/pages/settlement/index/index' }) }, } })