纸通宝SAAS仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

61 lines
1.9 KiB

// 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/image/icon_pricing.png' },
{ status: 51, badge: '', name: '待送货', icon: '/assets/image/icon_checking.png' },
{ status: 53, badge: '', name: '结算中', icon: '/assets/image/icon_payment.png' },
{ status: 54, badge: '', name: '已完成', icon: '/assets/image/icon_finish.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' })
},
}
})