纸通宝商家版本的小程序,原生微信开发。
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.
 

68 lines
2.2 KiB

const math = require('../../../utils/math')
const event = require('../../../utils/event')
const app = getApp()
Component({
options: {
addGlobalClass: true,
multipleSlots: true
},
/** 页面的初始数据 */
data: {
firstShow: false,
userInfo: null,
menuList: [
{url: '/pages/home/factory-list/index', text: '客户管理', icon: '/assets/image/reconciliation-icon.png'},
{url: '/pages/home/factory-list/index', text: '电子合同', icon: '/assets/image/reconciliation-icon.png'}
],
tabIndex: 0,
tabList: [
{id: 1, name: '待预约', badge: 0, status: 1 , icon: '/assets/image/reconciliation-icon.png'},
{id: 2, name: '待上传', badge: 0, status: 2 , icon: '/assets/image/reconciliation-icon.png'},
{id: 3, name: '待审核', badge: 0, status: 3 , icon: '/assets/image/reconciliation-icon.png'},
{id: 3, name: '待结算', badge: 0, status: 3 , icon: '/assets/image/reconciliation-icon.png'},
{id: 3, name: '已完成', badge: 0, status: 3 , icon: '/assets/image/reconciliation-icon.png'}
]
},
lifetimes: {
attached: function () {
event.on('EventMessage', this, this.onEvent)
},
detached: function () {
event.remove('EventMessage', this)
}
},
methods: {
onRestart: function () {
if(!this.data.firstShow) {
this.setData({height: app.globalData.windowHeight - app.globalData.safeBottom - 100, userInfo: app.userInfo })
}
// this.fetchStatisticsInfo()
this.data.firstShow = true
},
onEvent: function (message) {
if (message.what == 888) {
}
},
fetchStatisticsInfo: function(loading){
getBalanceInfo().then(result => {
if(result.data){
result.data.accountMoney = math.minus(result.data.accountMoney, result.data.frozenMoney)
this.setData({ banlanceInfo: result.data })
}
if(loading){
wx.hideLoading()
}
}).catch(err => {
if(loading){
wx.hideLoading()
}
})
},
menuClick: function(e){
if(e.currentTarget.id == 'order'){
wx.navigateTo({ url: '/pages/process/order-list/index' })
}
}
}
})