优化页面性能
This commit is contained in:
parent
c7cf0a33e7
commit
ecc275426d
|
@ -299,9 +299,11 @@ export default {
|
|||
list: {
|
||||
service: {
|
||||
url: "/wxapp/index/goodsevaluation",
|
||||
showLoading: true,
|
||||
},
|
||||
worker: {
|
||||
url: "/wxapp/orderb/allevaluation",
|
||||
showLoading: true,
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="service-detail-group">
|
||||
<view v-if="tabIndex == 0" class="tab-item tab0">
|
||||
<view v-show="tabIndex == 0" class="tab-item tab0">
|
||||
<view class="service-section banner-box">
|
||||
<swiper class="service-banner-swiper" circular autoplay @change="changeBanner">
|
||||
<swiper-item v-for="(item, index) in detail.images" :key="index">
|
||||
|
@ -59,7 +59,7 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="tabIndex == 1" class="tab-item tab1">
|
||||
<view v-show="tabIndex == 1" class="tab-item tab1">
|
||||
<view class="reviews">
|
||||
<app-appraise-section
|
||||
:total="appraise.total"
|
||||
|
@ -206,7 +206,6 @@ export default {
|
|||
* 切换评价分类
|
||||
*/
|
||||
changeAppraiseCate(currentAppraiseCate, index) {
|
||||
currentAppraiseCate.list = [];
|
||||
currentAppraiseCate.more = true;
|
||||
currentAppraiseCate.page = 1;
|
||||
this.currentAppraiseCate = currentAppraiseCate;
|
||||
|
@ -225,8 +224,12 @@ export default {
|
|||
})
|
||||
.then((list) => {
|
||||
if (list.length > 0) {
|
||||
this.currentAppraiseCate.page++;
|
||||
if (this.currentAppraiseCate.page == 1) {
|
||||
this.currentAppraiseCate.list = list;
|
||||
} else {
|
||||
this.currentAppraiseCate.list = this.currentAppraiseCate.list.concat(list);
|
||||
}
|
||||
this.currentAppraiseCate.page++;
|
||||
} else {
|
||||
this.currentAppraiseCate.more = false;
|
||||
}
|
||||
|
|
|
@ -123,7 +123,6 @@ export default {
|
|||
* 切换评价分类
|
||||
*/
|
||||
changeAppraiseCate(currentAppraiseCate, index) {
|
||||
currentAppraiseCate.list = [];
|
||||
currentAppraiseCate.more = true;
|
||||
currentAppraiseCate.page = 1;
|
||||
this.currentAppraiseCate = currentAppraiseCate;
|
||||
|
@ -142,8 +141,12 @@ export default {
|
|||
})
|
||||
.then((list) => {
|
||||
if (list.length > 0) {
|
||||
this.currentAppraiseCate.page++;
|
||||
if (this.currentAppraiseCate.page == 1) {
|
||||
this.currentAppraiseCate.list = list;
|
||||
} else {
|
||||
this.currentAppraiseCate.list = this.currentAppraiseCate.list.concat(list);
|
||||
}
|
||||
this.currentAppraiseCate.page++;
|
||||
} else {
|
||||
this.currentAppraiseCate.more = false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue