Ver Fonte

opt:暂时单独处理选择房间页面图片

Shu há 1 mês atrás
pai
commit
3bcc232b15
2 ficheiros alterados com 11 adições e 3 exclusões
  1. 9 1
      config.js
  2. 2 2
      subpkg_checkin/selectRoomType/selectRoomType.vue

+ 9 - 1
config.js

@@ -1,15 +1,19 @@
 //生产
 const PRO_BASE_URL = "https://pro.cloud.boyuantech.net/manage/api/v1/miniScmApp"
 const PRO_IMG_BASE_URL = "https://pro.cloud.boyuantech.net/img"
+const PRO_ROOM_TYPE_PIC_URL = "https://pro.cloud.boyuantech.net/img"
 //测试
 const TEST_BASE_URL = "https://test.cloud.boyuantech.net/mp/api/v1"
 const TEST_IMG_BASE_URL = "https://test.cloud.boyuantech.net/img"
+const TEST_ROOM_TYPE_PIC_URL = "https://test.cloud.boyuantech.net/hotel-room-type-img/"
 //本地
 const DEV_BASE_URL = "http://localhost:9041/api/v1"
 const DEV_IMG_BASE_URL = "https://pro.cloud.boyuantech.net/img"
+const DEV_ROOM_TYPE_PIC_URL = "https://pro.cloud.boyuantech.net/img"
 
 let BASE_URL
 let IMG_BASE_URL
+let ROOM_TYPE_PIC_URL
 
 const accountInfo = uni.getAccountInfoSync();
 const env = accountInfo.miniProgram.envVersion
@@ -21,16 +25,20 @@ if (env === 'release') {
 	// 生产环境
 	// BASE_URL = PRO_BASE_URL
 	// IMG_BASE_URL = PRO_IMG_BASE_URL
+	// ROOM_TYPE_PIC_URL = PRO_ROOM_TYPE_PIC_URL
 
 	// 测试环境
 	BASE_URL = TEST_BASE_URL
 	IMG_BASE_URL = TEST_IMG_BASE_URL
+	ROOM_TYPE_PIC_URL =TEST_ROOM_TYPE_PIC_URL
 
 	// 开发环境
 	// BASE_URL = DEV_BASE_URL
 	// IMG_BASE_URL = DEV_IMG_BASE_URL
+	// ROOM_TYPE_PIC_URL= DEV_ROOM_TYPE_PIC_URL
 }
 export {
 	BASE_URL,
-	IMG_BASE_URL
+	IMG_BASE_URL,
+	ROOM_TYPE_PIC_URL
 }

+ 2 - 2
subpkg_checkin/selectRoomType/selectRoomType.vue

@@ -54,7 +54,7 @@
 	} from '../../utils/commonUtils.js'
 	import moment from 'moment'
 	import {
-		IMG_BASE_URL
+		ROOM_TYPE_PIC_URL
 	} from "../../config.js"
 	import {
 		mapState,
@@ -120,7 +120,7 @@
 				let res = await uni.$http.get(`/hotel/${this.currentHotel.hotelId}/roomType`)
 				this.roomTypeList = res.data.data
 				this.roomTypeList.forEach((item) => {
-					item.roomPicPath = IMG_BASE_URL + '/' + item.roomPicPath
+					item.roomPicPath = ROOM_TYPE_PIC_URL + item.roomPicPath
 				})
 			},
 			confirm(days) {