Commit e1e01409 authored by 罗超's avatar 罗超

1

parent 14a9079d
......@@ -44,6 +44,9 @@
</template>
<script>
export default {
props: {
data: Object,
},
data() {
return {};
},
......
......@@ -2,13 +2,22 @@
<view class="orderpage">
<view class="typebox flex-center">
<view class="typeItem flex-center">
<view class="typeItem1 flex-center activeType">普通订单</view>
<view class="typeItem1 flex-center">售后订单</view>
<view
class="typeItem1 flex-center"
:class="orderType === 1 ? 'activeType' : ''"
@click="changeOrderType(1)"
>普通订单</view
>
<view
class="typeItem1 flex-center"
:class="orderType === 2 ? 'activeType' : ''"
@click="changeOrderType(2)"
>售后订单</view
>
</view>
</view>
<view class="searchBox flex-between">
<view class="search flex-center">
<!-- <input type="text"> -->
<u-icon name="search"></u-icon>
<view>搜索</view>
</view>
......@@ -124,11 +133,14 @@
@change="changeTab"
></u-tabs>
</view>
<u-empty v-if="orderList.length == 0" text="暂无内容" mode="list"></u-empty>
<view
v-if="orderList.length > 0"
style="
height: calc(100vh - 50px);
height: calc(100vh - 350rpx);
width: calc(100vw);
overflow: hidden;
box-sizing: border-box;
padding-bottom: 20px;
"
>
......@@ -139,9 +151,24 @@
@scrolltolower="lower"
:style="{ height: '100%' }"
>
<orderItem />
<view v-for="(item, index) in orderList" :key="index">
<orderItem :data="item" />
</view>
<u-loadmore
:status="status"
:load-text="loadText"
:font-size="24"
:margin-top="20"
:margin-bottom="20"
bg-color="#999"
/>
</scroll-view>
</view>
<!-- 加载中 -->
<view class="flex-center" style="margin-top: 20rpx" v-if="loading">
<u-loading mode="flower" size="48"></u-loading>
<Text style="color: #999">加载中...</Text>
</view>
<tabbar></tabbar>
</view>
</template>
......@@ -171,6 +198,14 @@ export default {
days.push(i);
}
return {
orderType: 1, //1普通订单,2售后订单
loading: false,
status: "loadmore",
loadText: {
loadmore: "轻轻上拉,加载更多",
loading: "努力加载中",
nomore: "没有更多了",
},
showModel: false,
timeStr: "",
curIndex: 0,
......@@ -219,6 +254,7 @@ export default {
},
],
currentTab: 0,
page_count: 1,
msg: {
pageIndex: 1,
pageSize: 15,
......@@ -244,6 +280,7 @@ export default {
IsOffline: -1,
},
orderStatusList: [],
orderList: [],
};
},
methods: {
......@@ -264,7 +301,8 @@ export default {
changeTab(index) {
this.currentTab = index;
this.msg.OrderStatus = this.orderStatusList[index].Id;
console.log(this.msg.OrderStatus);
this.msg.pageIndex = 1;
this.getList();
},
lower(e) {
if (this.msg.pageIndex < this.page_count) {
......@@ -283,12 +321,23 @@ export default {
});
},
getList() {
this.requestAdmin(
"/api/order/GetGoodsOrderPageList",
this.msg,
(res) => {}
);
this.loading = true;
this.requestAdmin("/api/order/GetGoodsOrderPageList", this.msg, (res) => {
this.loading = false;
this.page_count = res.data.pageCount;
if (this.page_count == 1) {
this.status = "nomore";
}
if (this.msg.pageIndex === 1) {
this.orderList = res.data.pageData;
} else {
this.orderLis = [...this.orderList, ...res.data.pageData];
}
});
},
changeOrderType(n){
this.orderType=n
}
},
onLoad() {
this.timeStr = this.timeArr[0].name;
......
......@@ -773,7 +773,6 @@
this.showAuth = true;
}
this.isMallAdmin = this.mall_UserInfo.AdminId&&this.mall_UserInfo.AdminToken ? 1:0
console.log(445,this.isMallAdmin)
},
mounted() {
this.getComponyStatus()
......
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