diff --git a/template/uni-app/pages/goods/order_list/index.vue b/template/uni-app/pages/goods/order_list/index.vue index 8bc05835d..62cba3dc7 100644 --- a/template/uni-app/pages/goods/order_list/index.vue +++ b/template/uni-app/pages/goods/order_list/index.vue @@ -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; }, - + /** * 获取订单统计数据 *