Commit 68bfa9d4 by 胡悦

修改历史订单

1 parent a904a0aa
......@@ -37,7 +37,7 @@
>
</view>
</template>
<template>
<template v-else>
<view class="no-data">
<glsx-image
class="no-data-img"
......@@ -53,7 +53,7 @@
<!-- </uni-grid-item>
</uni-grid> -->
</view>
<view class="end-text" v-if="historyList.length > 0 && sEnd">我是一个有底线的人</view>
<view class="end-text" v-if="historyList.length > 0 && isEnd">我是一个有底线的人</view>
</view>
</view>
</template>
......@@ -112,10 +112,9 @@ export default {
this.shopMerchantId = shopMerchantId
this.getQuotationList();
},
async getQuotationList() {
async getQuotationList(isSwitch = false) {
const { goodsName, shopMerchantId, currentPage } = this
this.currentPage++
this.isEnd = false
const data = await uni.$api.commonApi.getQuotationList({
currentPage,
pageSize: 18,
......@@ -123,15 +122,23 @@ export default {
orderStatus: 3,
goodsName
})
if (data.list.length !== 0) {
this.historyList = this.historyList.concat(data.list)
if (isSwitch) {
this.historyList = data.list
this.isEnd = false
} else {
this.isEnd = true
if (data.list.length > 0) {
this.historyList = this.historyList.concat(data.list)
this.isEnd = false
} else {
this.isEnd = true
}
}
},
tabclick(index) {
this.goodsName = this.list[index].value
this.getQuotationList()
this.goodsName = this.list[index].value
this.currentPage = 1
this.getQuotationList(true)
},
// 脱敏
nameHide(name) {
......@@ -186,7 +193,7 @@ export default {
grid-template-columns: repeat(3, 664rpx);
justify-content: center;
grid-gap: 32rpx;
min-height: calc(100vh - 380rpx);
min-height: calc(100vh - 368rpx);
.card-item {
margin: 16rpx auto;
padding: 24rpx 40rpx;
......@@ -234,10 +241,9 @@ export default {
margin: 50rpx 0;
}
.no-data {
position: absolute;
left: 50%;
top: 50%;
top: 30%;
transform: translate(-50%, -50%);
&-img {
width: 640rpx;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!