소스 검색

地图只15个显示修复,地图跳转恢复,酒店详情页预约控制

yfso 2 년 전
부모
커밋
90b858b6d9
4개의 변경된 파일18개의 추가작업 그리고 57개의 파일을 삭제
  1. 1 1
      manifest.json
  2. 10 33
      pages/map/hotel-book/index.vue
  3. 5 21
      pages/map/map.vue
  4. 2 2
      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",

+ 10 - 33
pages/map/hotel-book/index.vue

xqd xqd
@@ -70,7 +70,8 @@
 				<text>预订</text>
 			</view>
 		</view>
-
+		<!-- 弹出层/核销码 -->
+		<dialogPanel ref="dialogPanel"/>
 	</view>
 </template>
 
@@ -150,39 +151,15 @@
 			},
 			//预约跳转
 			goJump() {
-				//跳转h5
-				if (this.hotelDetail.reserve_jump_type == 1) {
-					const url = this.hotelDetail.reserve_jump_config; // 跳转的外链
-					const navtitle = 'H5'; // 这个标题是你自己可以设置的
-					uni.navigateTo({
-						// 跳转到webview页面
-						url: `/pages/webview/webview?url=${url}&nav=${navtitle}`,
-						success: () => {
-							console.log('成功')
-						},
-						fail: (e) => {
-							console.log(e, "失败")
-						}
-					});
-				} else if (this.hotelDetail.reserve_jump_type == 2) {
-					let obj = JSON.parse(this.hotelDetail.reserve_jump_config)
-					console.log(obj);
-					wx.navigateToMiniProgram({
-						appId: `${obj.appid}`, //appid
-						path: `${obj.path}`, //path
-						extraData: { //参数
-							foo: 'bar'
-						},
-						// envVersion: 'develop', //开发版develop 开发版 trial   体验版 release 正式版 
-						success(res) {
-							console.log('成功')
-							// 打开成功
-						},
-						fail(e) {
-							console.log(e, '失败')
-						}
-					})
+				if(this.hotelDetail.reserve_jump_type == 3){
+					this.$refs.dialogPanel.show(this.hotelDetail.reserve_jump_config);
+					return	
 				}
+				
+				this.$utils.jump({
+					jump_type: this.hotelDetail.reserve_jump_type,
+					jump_config: this.hotelDetail.reserve_jump_config
+				})
 			},
 			//获取酒店详情
 			getDetail() {

+ 5 - 21
pages/map/map.vue

xqd xqd xqd
@@ -178,8 +178,7 @@
 		</view>
 		<view style="height: 110rpx;"></view>
 		<tab-bar></tab-bar>
-		<!-- 弹出层/核销码 -->
-		<dialogPanel ref="dialogPanel"/>
+		
 	</view>
 </template>
 
@@ -456,7 +455,7 @@
 					})
 					this.$refs.map.updateContent(this.hotelList, true);
 					if(res.data.data.length >= 15){
-						// this.requestHotelPage(tempobj)
+						this.requestHotelPage(tempobj)
 					}else if(this.beginConfig.hotel_id&&this.beginConfig.isBegin){
 						let targetIndex = 0;
 						
@@ -481,25 +480,10 @@
 			},
 			//去预定页面
 			goBook(index) {
-				if(!this.$store.getters.userInfo){
-					uni.navigateTo({
-						url: '/pages/login/login'
-					})
-					return;
-				}
 				const hotel = this.hotelList[index];
-				if(hotel.buy_jump_type == 1 || hotel.buy_jump_type == 2){
-					this.$utils.jump({
-						jump_type: hotel.buy_jump_type,
-						jump_config: hotel.buy_jump_config
-					})
-				}else if(hotel.buy_jump_type == 3){
-					this.$refs.dialogPanel.show(hotel.buy_jump_config);
-				}else if(hotel.buy_jump_type == 4){
-					uni.navigateTo({
-						url: `/pages/map/hotel-book/index?hotel_id=${hotel.id}&latitude=${hotel.latitude}&longitude=${hotel.longitude}&name=${hotel.name}&address=${hotel.address}`
-					})
-				}
+				uni.navigateTo({
+					url: `/pages/map/hotel-book/index?hotel_id=${hotel.id}&latitude=${hotel.latitude}&longitude=${hotel.longitude}&name=${hotel.name}&address=${hotel.address}`
+				})
 			},
 			//返回上一级
 			returnBtn() {

+ 2 - 2
setting.js

xqd
@@ -3,8 +3,8 @@
  */
 const IS_DEV = process.env.NODE_ENV === 'development'
 
-// const URL = 'https://t9.9026.com'
-const URL = 'https://ihg.9026.com'
+const URL = 'https://t9.9026.com'
+// const URL = 'https://ihg.9026.com'
 
 	
 module.exports = {