106 lines
1.8 KiB
JavaScript
106 lines
1.8 KiB
JavaScript
// pagesA/bills/index.js
|
|
require('../common/vendor.js');
|
|
const app = getApp(); //全局app
|
|
|
|
Page({
|
|
/**
|
|
* 页面的初始数据
|
|
*/
|
|
data: {
|
|
BASE_IMG_URL: app.globalData.BASE_IMG_URL,
|
|
BASE_URL:app.globalData.BASE_URL,
|
|
page: 1,
|
|
totalPage: 1,
|
|
list: [
|
|
{
|
|
check_staff_ids: "126",
|
|
check_status: 2,
|
|
consume_time: "2023-02-27",
|
|
consume_type: "住酒店",
|
|
createtime: "2023-02-27 10:25:09"
|
|
},
|
|
{
|
|
check_staff_ids: "122",
|
|
check_status: 2,
|
|
consume_time: "2023-02-21",
|
|
consume_type: "住酒店",
|
|
createtime: "2023-02-27 10:25:09"
|
|
}
|
|
],
|
|
queryParams: {},
|
|
moneyInfo: {}
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面加载
|
|
*/
|
|
onLoad(options) {
|
|
this.getBillList();
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
*/
|
|
onReady() {
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面显示
|
|
*/
|
|
onShow() {
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面隐藏
|
|
*/
|
|
onHide() {
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面卸载
|
|
*/
|
|
onUnload() {
|
|
|
|
},
|
|
|
|
/**
|
|
* 页面相关事件处理函数--监听用户下拉动作
|
|
*/
|
|
onPullDownRefresh() {
|
|
|
|
},
|
|
|
|
/**
|
|
* 页面上拉触底事件的处理函数
|
|
*/
|
|
onReachBottom() {
|
|
|
|
},
|
|
|
|
/**
|
|
* 用户点击右上角分享
|
|
*/
|
|
onShareAppMessage() {
|
|
|
|
},
|
|
|
|
getBillList() {
|
|
console.log(this.data.BASE_URL)
|
|
wx.request({
|
|
url: this.data.BASE_URL + '/addons/crmx/bill/getContractList',
|
|
data: {
|
|
page: this.data.page
|
|
},
|
|
header: {
|
|
'content-type': 'application/json', // 默认值
|
|
'token': wx.getStorageSync('token'),
|
|
},
|
|
success (res) {
|
|
console.log(res.data)
|
|
}
|
|
})
|
|
}
|
|
}) |