Commit 70318f23 authored by 黄媛媛's avatar 黄媛媛

update

parent e9999eb7
This diff is collapsed.
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
<view style="padding: 10px 0; background: #fff;"> <view style="padding: 10px 0; background: #fff;">
<u-tabs <u-tabs
:list="list" :list="list"
:is-scroll="false"
:current="current" :current="current"
name="Name"
@change="change" @change="change"
:active-color="mainColor" :active-color="mainColor"
bg-color="#FFF" bg-color="#FFF"
...@@ -221,15 +221,7 @@ export default { ...@@ -221,15 +221,7 @@ export default {
return { return {
pageTitle: "我的订单", pageTitle: "我的订单",
current: 0, current: 0,
list: [ list: [],
{ name: "全部" },
{ name: "待付款" },
{ name: "待发货" },
{ name: "待收货" },
{ name: "待评价" },
// { name: "已完成" },
// { name: "已取消" },
],
mainColor: "", mainColor: "",
contentHeight: 0, contentHeight: 0,
page: 1, page: 1,
...@@ -252,6 +244,17 @@ export default { ...@@ -252,6 +244,17 @@ export default {
padding: "0 30rpx", padding: "0 30rpx",
}, },
template_message: [], template_message: [],
msg:{
pageIndex:1,
pageSize:15,
OrderId:0,
OrderType:0,
DeliveryMethod:0,
StartTime:'',
EndTime:'',
OrderStatus:0,
OrderNo:'',
},
}; };
}, },
created() { created() {
...@@ -280,8 +283,30 @@ export default { ...@@ -280,8 +283,30 @@ export default {
this.current = option.status || -1; this.current = option.status || -1;
this.loading = true; this.loading = true;
this.init(); this.init();
this.getOrderStatus();
}, },
methods: { methods: {
getOrderStatus() {
this.request2(
{
url: '/api/order/GetOrderStatusEnumList',
data: {}
},
res => {
uni.hideNavigationBarLoading();
if(res.resultCode==1){
this.isloading = false;
this.list = res.data;
let obj={
Name:'全部',
Id:0,
}
this.list.unshift(obj)
console.log("this.list",this.list)
}
}
);
},
redirectToDetail(id) { redirectToDetail(id) {
uni.navigateTo({ uni.navigateTo({
url: "/pages/order/order-detail?id=" + id, url: "/pages/order/order-detail?id=" + id,
...@@ -315,43 +340,61 @@ export default { ...@@ -315,43 +340,61 @@ export default {
}); });
}, },
change(index) { change(index) {
this.current = index; this.current = index;
this.page = 1; this.msg.OrderStatus=this.list[index].Id;
this.g = []; this.msg.pageIndex = 1;
this.loading = true; this.g = [];
this.init(); this.loading = true;
this.init();
}, },
init() { init() {
this.isover = false; this.isover = false;
let h = this.apiheader(); let h = this.apiheader();
this.request( this.request2(
{ {
url: "", url: '/api/AppletOrder/GetAppletGoodsMyOrderPageList',
header: h, data: this.msg
data: { },
r: "api/order/list", res => {
status: this.current, uni.hideNavigationBarLoading();
page: this.page, if(res.resultCode==1){
}, this.loading = false;
}, this.g = this.g.concat(res.data.pageData);
(res) => { this.page_count = res.data.page_count;
this.loading = false; if (this.page_count == 1) {
this.g = this.g.concat(res.data.list); this.isover = true;
this.template_message = res.data.template_message; }
this.page_count = res.data.pagination.page_count; }
if (this.page_count == 1) { }
this.isover = true; );
} // this.request(
} // {
); // url: "",
// header: h,
// data: {
// r: "api/order/list",
// status: this.current,
// page: this.page,
// },
// },
// (res) => {
// this.loading = false;
// this.g = this.g.concat(res.data.list);
// this.template_message = res.data.template_message;
// this.page_count = res.data.pagination.page_count;
// if (this.page_count == 1) {
// this.isover = true;
// }
// }
// );
}, },
lower(e) { lower(e) {
if (this.page < this.page_count) { if (this.msg.pageIndex < this.page_count) {
this.page++; this.msg.pageIndex++;
this.init(); this.init();
} else { } else {
this.isover = true; this.isover = true;
} }
}, },
cancel(e, index) { cancel(e, index) {
this.showModal = true; this.showModal = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment