Commit 5aa21f33 by liimin

fix(我的订单): 修复订单列表请求参数错误并添加页面显示时刷新逻辑

修复请求参数中phone重复传递的问题
添加页面显示时的自动刷新功能,提升用户体验
1 parent 5bfb1b53
......@@ -21,7 +21,12 @@ Component({
this.getOrderNumberList();
},
},
pageLifetimes: {
show: function() {
// 页面被展示时执行
this.getOrderNumberList();
}
},
/**
* 组件的方法列表
*/
......@@ -44,10 +49,11 @@ Component({
pageSize: 1,
currentPage: 1,
scoreSource: channelSource,
phone
};
const orderList = this.data.orderList;
orderList.forEach((item) => {
const p = { ...params, requestType: item.requestType,phone };
const p = { ...params, requestType: item.requestType };
wx.p.api.mineApi[item.requestMethod](p).then((data) => {
if(data.total){
item.___count = data.total;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!