improve: 订单列表返回更新

This commit is contained in:
From-wh 2023-05-09 10:05:48 +08:00
parent 10a2435f42
commit 2bf11253f3

View File

@ -189,39 +189,40 @@
isShowAuth: false //是否隐藏授权
};
},
computed: mapGetters(['isLogin']),
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
if (options.status) this.orderStatus = options.status;
console.log('1')
if (this.isLogin) {
this.page = 1;
this.orderList = []
this.loadend = false;
this.pay_close = false;
this.onLoadFun();
this.getOrderList();
} else {
toLogin();
}
let EnOptions = wx.getEnterOptionsSync();
if (EnOptions.scene == '1038' && EnOptions.referrerInfo.appId == 'wxef277996acc166c3' && this.initIn) {
// 代表从收银台小程序返回
let extraData = EnOptions.referrerInfo.extraData;
this.initIn = false
if (!extraData) {
this.getOrderList();
// "当前通过物理按键返回,未接收到返参,建议自行查询交易结果";
} else {
if (extraData.code == 'success') {
this.getOrderList();
} else if (extraData.code == 'cancel') {} else {
// "支付失败:" + extraData.errmsg;
}
}
}
computed: mapGetters(['isLogin']),
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
if (options.status) this.orderStatus = options.status;
let EnOptions = wx.getEnterOptionsSync();
if (EnOptions.scene == '1038' && EnOptions.referrerInfo.appId == 'wxef277996acc166c3' && this.initIn) {
// 代表从收银台小程序返回
let extraData = EnOptions.referrerInfo.extraData;
this.initIn = false
if (!extraData) {
this.getOrderList();
// "当前通过物理按键返回,未接收到返参,建议自行查询交易结果";
} else {
if (extraData.code == 'success') {
this.getOrderList();
} else if (extraData.code == 'cancel') {} else {
// "支付失败:" + extraData.errmsg;
}
}
}
},
onShow() {
if (this.isLogin) {
this.page = 1;
this.orderList = []
this.loadend = false;
this.pay_close = false;
this.onLoadFun();
this.getOrderList();
} else {
toLogin();
}
},
methods: {
onLoadFun() {
@ -248,7 +249,7 @@
payClose: function() {
this.pay_close = false;
},
/**
* 获取订单统计数据
*