增加订单列表接口

This commit is contained in:
TOP糯米 2023-03-10 18:30:16 +08:00
parent 51ed3b1bd3
commit 088a3093fb
3 changed files with 26 additions and 4 deletions

View File

@ -127,5 +127,9 @@ export default {
createOrder: {
url: "/order/submitordera",
},
list: {
url: "/order/getmyorder",
showLoading: true,
},
}
}

View File

@ -109,5 +109,21 @@ export default {
throw e
});
});
},
/**
* 订单列表
*/
list(page, status) {
return new Promise((resolve, reject) => {
prototype.$request({
api: "order.list",
data: {
page: page,
status: status,
},
}).then(response => {
console.log(response);
}).catch(e => { });
});
}
}

View File

@ -62,6 +62,7 @@ export default {
{
type: "all",
name: "全部订单",
page: 1,
more: false,
list: [
{
@ -163,6 +164,7 @@ export default {
{
type: "refund",
name: "退款记录",
page: 1,
more: true,
list: [
{
@ -198,9 +200,7 @@ export default {
WidgetLoadMore,
},
onLoad() {
this.$nextTick(() => {
this.setTabHeight();
});
this.switchTab();
},
onShow() {},
onReady() {},
@ -227,7 +227,9 @@ export default {
}
});
},
loadData() {},
loadData() {
this.$models.order.list(1, -1);
},
toDetail(id, state) {
let type = "detail";
if (state == this.$models.order.state.NO_SELECT_WORKER) {