You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
1.4 KiB
JavaScript

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

var app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
hidden: true,
pageNumber: 1,
pageSize: 100,
tabs: ["外卖订单", "手机订单"],
activeIndex: 0,
sliderOffset: 0,
sliderLeft: 0,
isUpdate: false,
couponList1: [],
couponList2: [],
couponList3: []
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
this.cy_getOrder();
},
/**
* 下载订单数据
*/
cy_getOrder: function() {
var that = this;
var params = {
"method": "wxdc.sales.order.list",
"memberId": app.userId,
"orderField": "saleDate", // 排序字段
"orderType": "DESC", // 排序方式ASC,DESC
"status": "",
"startDate": "",
"endDate": "",
"pageNumber": that.data.pageNumber,
"pageSize": that.data.pageSize
}
// 不签名参数
var ignores = [];
ignores.push("pageNumber");
ignores.push("pageSize");
app.jsapi.api(app.globalData.appKey, app.globalData.appSecret, app.globalData.serverUrl).ajax(params, ignores,
function(json) {
var result = json.data;
console.log(result);
if (result.status == 1) {
} else {
app.msg.showMsg("提示", json.data.message);
}
},
function(error) {
app.msg.showMsg("提示", "网络中断,获取品类失败");
}
);
},
/**
*
*/
cy_onceAgain: function() {
}
})