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