diff --git a/pages/index/worker-home.vue b/pages/index/worker-home.vue
index 9bfe76e..8c57d0a 100644
--- a/pages/index/worker-home.vue
+++ b/pages/index/worker-home.vue
@@ -47,13 +47,17 @@
,
-
+
服务范围:
{{getLastSplitAreaName(area.mergerName)}}
,
+
+ 查看全部服务区域
+
+
@@ -127,13 +131,17 @@
,
-
+
服务范围:
{{getLastSplitAreaName(area.mergerName)}}
,
+
+ 查看全部服务区域
+
+
@@ -207,10 +215,13 @@
pageSize: 0,
stickyTop: this.CustomBar,
searchInfo: {},
+ curPositionDistrictId: -1,
areaList: [],
areaMultiIndex: [0, 0],
categoryList: [],
- categoryMultiIndex: [0, 0, 0]
+ categoryMultiIndex: [0, 0, 0],
+ isShowAllAreaCurCity: [],
+ isShowAllAreaOtherCity: []
}
},
onReady() {
@@ -230,6 +241,7 @@
let areaArr = await this.$request.getCurArea();
if (areaArr) {
this.searchInfo.area = [areaArr[1], areaArr[2]];
+ this.curPositionDistrictId = this.searchInfo.area[1].areaId;
}
},
async reloadData(params = {}) {
@@ -253,6 +265,21 @@
let res = await this.$request.getWorkerList(params);
let rowsLength = res.rows.length;
if (rowsLength > 0) {
+ for (let i = 0; i < res.rows.length; i++) {
+ let curDistrictWorkerAreas = [];
+ let notCurDistrictWorkerAreas = [];
+ let sortedWorkerAreas = [];
+ for (let j = 0; j < res.rows[i].workerAreas.length; j++) {
+ let curWorkerArea = res.rows[i].workerAreas[j];
+ if (this.areaMultiIndex[1] === 0 && curWorkerArea.districtId === this.curPositionDistrictId) {
+ curDistrictWorkerAreas.push(curWorkerArea);
+ } else {
+ notCurDistrictWorkerAreas.push(curWorkerArea);
+ }
+ }
+ sortedWorkerAreas = curDistrictWorkerAreas.concat(notCurDistrictWorkerAreas);
+ res.rows[i].workerAreas = sortedWorkerAreas;
+ }
this.workerInfos = this.workerInfos.concat(res.rows);
this.pageNum++;
if (rowsLength === this.pageSize) {
@@ -479,7 +506,15 @@
getLastSplitAreaName(mergeName) {
let arr = mergeName.split(",");
return arr[arr.length - 1];
- }
+ },
+ showAllArea(type, index) {
+ let arr = this["isShowAllArea" + type];
+ if (arr[index] == undefined) {
+ arr[index] = false;
+ }
+ arr[index] = !arr[index];
+ this["isShowAllArea" + type] = [].concat(arr);
+ },
}
}
@@ -512,5 +547,10 @@
.text-beside-avatar {
width: 75%;
+ }
+
+ .certern-height {
+ max-height: 200rpx;
+ overflow: hidden;
}
diff --git a/pages/product/product-detail.vue b/pages/product/product-detail.vue
index 9a562a8..6923a86 100644
--- a/pages/product/product-detail.vue
+++ b/pages/product/product-detail.vue
@@ -16,7 +16,7 @@
-
+
@@ -352,9 +352,11 @@
});
},
pauseVideo(e) {
- if (this.productVideoPlaying) {
+ if (this.productVideoPlaying) {
+ this.productVideoContext.exitFullScreen();
this.productVideoContext.pause();
- } else {
+ } else {
+ this.productVideoContext.requestFullScreen();
this.productVideoContext.play();
}
this.productVideoPlaying = !this.productVideoPlaying;
diff --git a/pages/product/shop-detail.vue b/pages/product/shop-detail.vue
index 1ae229c..32924d8 100644
--- a/pages/product/shop-detail.vue
+++ b/pages/product/shop-detail.vue
@@ -18,13 +18,17 @@
企业认证
-
+
服务范围:
{{getLastSplitAreaName(area.mergerName)}}
,
+
+
+ 查看全部服务区域
+
@@ -129,7 +133,8 @@
areaList: [],
areaMultiIndex: [0, 0],
categoryList: [],
- stickyTop: this.CustomBar
+ stickyTop: this.CustomBar,
+ isShowAllAreaCurCity: false
}
},
onLoad(option) {
@@ -278,6 +283,9 @@
getLastSplitAreaName(mergeName) {
let arr = mergeName.split(",");
return arr[arr.length - 1];
+ },
+ showAllArea(index) {
+ this.isShowAllAreaCurCity = !this.isShowAllAreaCurCity;
}
}
}
@@ -286,5 +294,9 @@