Jelajahi Sumber

Merge branch 'master' of ssh://git.9026.com:2212/gubai/IHG

gubai 2 tahun lalu
induk
melakukan
3780cac66e
3 mengubah file dengan 31 tambahan dan 23 penghapusan
  1. 1 1
      manifest.json
  2. 29 21
      pages/map/map.vue
  3. 1 1
      setting.js

+ 1 - 1
manifest.json

xqd
@@ -1,6 +1,6 @@
 {
     "name" : "hotel_uni",
-    "appid" : "__UNI__807A871",
+    "appid" : "__UNI__9140D70",
     "description" : "",
     "versionName" : "1.0.0",
     "versionCode" : "100",

+ 29 - 21
pages/map/map.vue

xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd
@@ -59,7 +59,7 @@
 					<view class="search-detail-btn-left">
 						<text>取消</text>
 					</view>
-					<view class="search-detail-btn-right">
+					<view class="search-detail-btn-right" @click="toSearchList">
 						<text>确认</text>
 					</view>
 				</view>
@@ -77,7 +77,7 @@
 					<view class="search-detail-btn-left">
 						<text>取消</text>
 					</view>
-					<view class="search-detail-btn-right">
+					<view class="search-detail-btn-right" @click="toSearchList">
 						<text>确认</text>
 					</view>
 				</view>
@@ -94,11 +94,10 @@
 					</view>
 					<view class="partner-main" v-if="isPartner">
 						<uni-data-checkbox multiple 
-							v-model="value" 
+							v-model="search.coop" 
 							:localdata="search.content.coop" 
 							emptyText="无"
-							:map="{text: 'name',value: 'name'}"
-							@change="change"
+							:map="{text: 'name',value: 'id'}"
 						/>
 					</view>
 
@@ -111,11 +110,10 @@
 					</view>
 					<view class="partner-main" v-if="isJoin">
 						<uni-data-checkbox multiple
-							v-model="value" 
+							v-model="search.league" 
 							:localdata="search.content.league" 
 							emptyText="无"
-							:map="{text: 'name',value: 'name'}"
-							@change="change"
+							:map="{text: 'name',value: 'id'}"
 						/>
 					</view>
 
@@ -123,7 +121,7 @@
 						<view class="search-detail-btn-left">
 							<text>取消</text>
 						</view>
-						<view class="search-detail-btn-right">
+						<view class="search-detail-btn-right" @click="toSearchList">
 							<text>确认</text>
 						</view>
 					</view>
@@ -316,7 +314,7 @@
 					brand: "",
 					coop: [],
 					league: [],
-					isActiveIds:[3,26],
+					isActiveIds:[],
 					content: {
 						area: [],
 						brand: [],
@@ -347,7 +345,6 @@
 		},
 		onLoad() {
 			//获取经纬度
-			this.updated()
 			this.getHotelCategory()
 			uni.getSystemInfo({
 				success:(res)=>{
@@ -363,7 +360,13 @@
 					this.search.content.area = res.data[0]?.sub;
 					this.search.content.brand = res.data[1]?.sub;
 					this.search.content.coop = res.data[2]?.sub;
+					this.search.content.league = res.data[3]?.sub;
+										
+					this.updated()
 				})
+			},
+			getArround(){
+				
 			},
 			goLocation(){
 				let _this = this
@@ -390,6 +393,7 @@
 						_this.latitude = res.latitude
 						_this.longitude = res.longitude
 						_this.$refs.map.goLocation(res.latitude,res.longitude)
+						_this.toSearchList(_this.latitude,_this.longitude)
 						//获取酒店列表
 						_this.getList()
 					},
@@ -409,9 +413,19 @@
 			  return s  // 单位千米
 			},
 			//-------------------------------------
-			getList() {
+			//菜单index切换
+			checked(id,categoreName) {
+				this.search[categoreName] = id;
+			},
+			toSearchList(latitude, longitude){
+				this.search.isActiveIds = [this.search.area,this.search.brand,...this.search.coop,...this.search.league]
+				this.getList({latitude: latitude, longitude: longitude});
+			},
+			getList(param={}) {
 				this.$api.hotel.getHotelList({
-					page: 1
+					page: 1,
+					// 'category_ids[0]':this.search.isActiveIds,
+					...param
 				}).then(res => {
 					this.hotelList = res.data.data.map(item=>{
 						return {
@@ -488,13 +502,7 @@
 			//合作伙伴刷选
 			change(e) {
 			},
-			//菜单index切换
-			checked(id,categoreName) {
-				const tempSet = new Set(this.search.isActiveIds);
-				tempSet.add(id);
-				this.search[categoreName] = id;
-				this.search.isActiveIds = Object.assign(Array.from(tempSet));
-			},
+			
 			//展开地区选择
 			openArea() {
 				this.isSelectArea = !this.isSelectArea
@@ -544,7 +552,7 @@
 					this.scrollData.spa = false;
 				}, 10)
 			}
-		}
+		},
 	}
 </script>
 

+ 1 - 1
setting.js

xqd
@@ -1,7 +1,7 @@
 /**
  * Created by JianJia.Zhou<jianjia.zhou> on 2022/3/18.
  */
-const IS_DEV = process.env.NODE_ENV === 'development'
+const IS_DEV = process.env.NODE_ENV === 'development1'
 // const URL = 'https://t9.9026.com'
 const URL = 'https://ihg.9026.com'