beefast-mini-merchant/pages/order/list/index.js
2025-03-26 20:06:10 +08:00

89 lines
1.7 KiB
JavaScript

import orderApi from '../../../api/order';
import userApi from '../../../api/user';
Page({
/**
* 页面的初始数据
*/
data: {
orderCategory:['及时达','定时达'],
categoryIndex:0,
list:[{
status:'PENDING',
packages:[{},{}]
}],
pager:{limit:10,loading:false,loadAll:false,pageIndex:0,refreshTrigger:false},
orderStatus:orderApi.status,
genderKV:userApi.genderKV
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
// orderApi.test({
// community_id:1,
// "user_id":3,"category_id":2,"name":"一乐拉面","business_hours":"08:00 - 21:00","address":"四川省成都市双流区怡心街道天府滨河湾(3号门)","longitude":104.046831,"latitude":30.518607,"phone":"13438370499","brand_image_url":"https://dman-1311994147.cos.ap-chengdu.myqcloud.com/uploads/1/ecb77b5a2d4075f6ff320070ac55f81c085e54b0_1e8ba893-9966-436e-90a4-63361f1fdf79.jpg"
// })
orderApi.list();
},
changeOrderCategory(event){
const index = event.currentTarget.dataset.index;
this.setData({
categoryIndex:index
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})