diff --git a/common/js/request.js b/common/js/request.js
index 99dcf8d..5e7d74f 100644
--- a/common/js/request.js
+++ b/common/js/request.js
@@ -90,7 +90,7 @@ export default {
let curLocation = uni.getStorageSync('curLocation');
if (curLocation && curLocation.updateTimes) {
let curTimes = new Date().getTime();
- let deltaSeconds = curTimes - Number(curLocation.updateTimes);
+ let deltaSeconds = curTimes - curLocation.updateTimes;
if (deltaSeconds >= 15 * 60 * 1000) {
// 设定重新获取定位的时间间隔为15分钟
await this.wxGetLocation();
diff --git a/pages/index/home.vue b/pages/index/home.vue
index b2127d1..089c57a 100644
--- a/pages/index/home.vue
+++ b/pages/index/home.vue
@@ -89,7 +89,11 @@
- ————当前城市————
+
+
+ 当前城市
+
+
@@ -99,7 +103,11 @@
- ————其他城市————
+
+
+ 其他城市
+
+
diff --git a/pages/index/worker-home.vue b/pages/index/worker-home.vue
index 4388b6b..3e7e461 100644
--- a/pages/index/worker-home.vue
+++ b/pages/index/worker-home.vue
@@ -29,77 +29,160 @@
-
-
-
-
-
-
-
- {{item.name}}
-
-
- 服务技能:
-
- {{skill.goodsCategoryName}}
- ,
-
-
-
- 服务范围:
-
- {{getLastSplitAreaName(area.mergerName)}}
- ,
-
+
+
+
+
+
+
+
+
+
+ {{item.name}}
+
+
+ 服务技能:
+
+ {{skill.goodsCategoryName}}
+ ,
+
+
+
+ 服务范围:
+
+ {{getLastSplitAreaName(area.mergerName)}}
+ ,
+
+
-
-
-
- 总评分5.0 /5.0分
-
-
-
-
-
- {{ratePoint.name}}{{ratePoint.score}}
-
+
+
+ 总评分5.0 /5.0分
+
+
+
+
+
+ {{ratePoint.name}}{{ratePoint.score}}
+
+
+ 评价({{vCard.rateInfo.commentNum}})
- 评价({{vCard.rateInfo.commentNum}})
+
+
+
+
+ {{product.goodsName}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.deptName}}
+
+
+
+ 进店看看
+
-
-
-
-
- {{product.goodsName}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{item.deptName}}
-
-
-
- 进店看看
-
+
-
+
+
+
+
+ 其他城市师傅
+
+
+
+
+
+
+
+
+
+
+ {{item.name}}
+
+
+ 服务技能:
+
+ {{skill.goodsCategoryName}}
+ ,
+
+
+
+ 服务范围:
+
+ {{getLastSplitAreaName(area.mergerName)}}
+ ,
+
+
+
+
+
+
+
+ 总评分5.0 /5.0分
+
+
+
+
+
+ {{ratePoint.name}}{{ratePoint.score}}
+
+
+ 评价({{vCard.rateInfo.commentNum}})
+
+
+
+
+
+
+
+ {{product.goodsName}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.deptName}}
+
+
+
+ 进店看看
+
+
+
+
@@ -115,10 +198,12 @@
},
data() {
return {
- workerInfos: [],
+ workerInfos: [],
+ otherCityWorkers: [],
loadMoreStatus: '',
hasMoreData: false,
pageNum: 0,
+ otherCityWorkersPageNum: 0,
pageSize: 0,
stickyTop: this.CustomBar,
searchInfo: {},
@@ -154,11 +239,14 @@
this.pageNum = this.$globalData.initPageNum;
this.workerInfos = [];
this.loadWorkerPage(params);
+
+ this.otherCityWorkers = [];
+ this.loadOtherCityWorkerPage();
},
async loadWorkerPage(params = {}) {
params.pageNum = this.pageNum;
params.pageSize = this.pageSize;
- this.$refs.loadStatusBar.showLoading();
+ this.$refs.loadStatusBar1.showLoading();
try {
let res = await this.$request.getWorkerList(params);
let rowsLength = res.rows.length;
@@ -166,13 +254,34 @@
this.workerInfos = this.workerInfos.concat(res.rows);
this.pageNum++;
if (rowsLength === this.pageSize) {
- this.$refs.loadStatusBar.showLoadMore();
+ this.$refs.loadStatusBar1.showLoadMore();
}
}
- this.$refs.loadStatusBar.showLoadOver();
+ this.$refs.loadStatusBar1.showLoadOver();
} catch (e) {
console.error(e)
- this.$refs.loadStatusBar.showLoadErr();
+ this.$refs.loadStatusBar1.showLoadErr();
+ }
+ },
+ async loadOtherCityWorkerPage(params = {}) {
+ params.pageNum = this.otherCityWorkersPageNum;
+ params.pageSize = this.pageSize;
+ params.exceptParentAreaId = this.searchInfo.area && this.searchInfo.area.length ? this.searchInfo.area[1].areaId : null;
+ this.$refs.loadStatusBar2.showLoading();
+ try {
+ let res = await this.$request.getWorkerList(params);
+ let rowsLength = res.rows.length;
+ if (rowsLength > 0) {
+ this.otherCityWorkers = this.otherCityWorkers.concat(res.rows);
+ this.otherCityWorkersPageNum++;
+ if (rowsLength === this.pageSize) {
+ this.$refs.loadStatusBar2.showLoadMore();
+ }
+ }
+ this.$refs.loadStatusBar2.showLoadOver();
+ } catch (e) {
+ console.error(e)
+ this.$refs.loadStatusBar2.showLoadErr();
}
},
async loadCategoryList(idArr) {
@@ -383,5 +492,9 @@
height: 6px;
border-radius: 50%;
margin-top: 50%;
+ }
+
+ .text-beside-avatar {
+ width: 75%;
}
diff --git a/style/default.css b/style/default.css
index 33a2ce2..4404ea3 100644
--- a/style/default.css
+++ b/style/default.css
@@ -129,4 +129,10 @@
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
+}
+
+.divider {
+ background: #E0E3DA;
+ width: 100%;
+ height: 5rpx;
}