diff --git a/components/FilterPopup/FilterPopup.vue b/components/FilterPopup/FilterPopup.vue index 1c92a0e..50e37f8 100644 --- a/components/FilterPopup/FilterPopup.vue +++ b/components/FilterPopup/FilterPopup.vue @@ -13,10 +13,10 @@ 不限 - + 女生 - + 男生 @@ -26,13 +26,13 @@ 伴宠师服务宠物类型 - + 猫咪 - + 狗狗 - + 异宠 @@ -42,7 +42,7 @@ 伴宠师等级 - + 初级伴宠师 diff --git a/components/addressMap.vue b/components/addressMap.vue index ce1456b..f9ac786 100644 --- a/components/addressMap.vue +++ b/components/addressMap.vue @@ -72,12 +72,16 @@ } // 根据最大距离设置缩放比例 // 距离越大,缩放比例越小 - if (maxDistance > 10) { // 10公里以上 - this.scale = 12 + if (maxDistance > 100) { // + this.scale = 2 + }else if (maxDistance > 50) { // + this.scale = 5 + }else if (maxDistance > 10) { // 10公里以上 + this.scale = 10 } else if (maxDistance > 5) { // 5-10公里 - this.scale = 13 + this.scale = 11 } else if (maxDistance > 2) { // 2-5公里 - this.scale = 14 + this.scale = 13 } else { // 2公里以内 this.scale = 15 } diff --git a/manifest.json b/manifest.json index 2203806..754f768 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "name" : "CMDF", - "appid" : "__UNI__6B015BD", + "appid" : "__UNI__197A38F", "description" : "猫妈狗爸", "versionName" : "1.1.0", "versionCode" : "100", diff --git a/mixins/position.js b/mixins/position.js index b3519f6..c8a1a41 100644 --- a/mixins/position.js +++ b/mixins/position.js @@ -23,13 +23,16 @@ export default { let minDistance = 0 - teacherAddress.forEach(item => { + teacherAddress.forEach((item, index) => { let distance = calculateDistance( this.position.latitude, this.position.longitude, item.latitude, item.longitude, ) + if(index == 0){ + minDistance = distance + } minDistance = Math.min(minDistance, distance) }) diff --git a/pages/companionPetList/companionPetList.vue b/pages/companionPetList/companionPetList.vue index 0b90ec3..4dce9e5 100644 --- a/pages/companionPetList/companionPetList.vue +++ b/pages/companionPetList/companionPetList.vue @@ -72,8 +72,21 @@ - + + + + + 点赞数{{ item.appletUsersTeacher.thumbsUp || 0 }} @@ -132,7 +146,7 @@ 距离{{ item.distanceText }}km - 暂无距离估测 + {{ '<' }}1km @@ -292,20 +306,25 @@ // } let data = { // address: "上海市浦东新区浦东南路150弄", - latitude: 29.56471, - longitude: 106.55073, + latitude: this.position.latitude, + longitude: this.position.longitude, + // latitude: 29.56471, + // longitude: 106.55073, // petTypes: ["1", "2"], - userName: this.value, + staffName: this.value,//搜素字段 } if(this.filterOptions.gender){ - data.sex = this.filterOptions.gender == '男' ? 0 : 1 + data.sex = this.filterOptions.gender } if(this.filterOptions.petTypes.length){ data.petTypes = this.filterOptions.petTypes.join(',') } if(this.filterOptions.level){ - data.level = this.filterOptions.level + data.teacherLevels = this.filterOptions.level + } + if(this.selectedDate.length > 0){ + data.selectedDate = this.selectedDate.map(n => n.date).join(',') } console.log('data', data); @@ -328,6 +347,8 @@ this.companionList.forEach(item => { item.distanceText = this.calculateDistanceAddress(item.appletAddresseList) }) + + this.companionList.sort((a,b) => a.distanceText - b.distanceText) }, iconClick() {}, changeSelectedPet(type) { @@ -404,6 +425,8 @@ } else { this.isCheckTime = false } + console.log(this.selectedDate); + this.getCompanionList() }, getCalendarDate() { let tomorrow = new Date() @@ -546,7 +569,7 @@ .personal-info-2 { display: flex; - flex-wrap: wrap; + // flex-wrap: wrap; .personal-info-title { display: flex; @@ -572,6 +595,8 @@ font-size: 24rpx; font-weight: 400; line-height: 32rpx; + flex-shrink: 0; + margin-left: auto; } } diff --git a/utils/getUrl.js b/utils/getUrl.js index d17ac11..42759e7 100644 --- a/utils/getUrl.js +++ b/utils/getUrl.js @@ -1,7 +1,7 @@ -let current ="release"; +let current ="develop"; const accountInfo = wx.getAccountInfoSync(); -current = accountInfo.miniProgram.envVersion; +// current = accountInfo.miniProgram.envVersion; const api={