Showing
3 changed files
with
77 additions
and
41 deletions
| 1 | /* | 1 | /* |
| 2 | * @Date: 2023-12-22 10:29:37 | 2 | * @Date: 2023-12-22 10:29:37 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2024-05-21 20:51:57 | 4 | + * @LastEditTime: 2024-06-06 09:31:34 |
| 5 | * @FilePath: /meihuaApp/src/api/index.js | 5 | * @FilePath: /meihuaApp/src/api/index.js |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | */ | 7 | */ |
| ... | @@ -21,7 +21,7 @@ const Api = { | ... | @@ -21,7 +21,7 @@ const Api = { |
| 21 | PAY: '/srv/?a=pay', | 21 | PAY: '/srv/?a=pay', |
| 22 | PAY_CHECK: '/srv/?a=pay_check', | 22 | PAY_CHECK: '/srv/?a=pay_check', |
| 23 | ORDER_SUCCESS: '/srv/?a=room_data&t=order_success', | 23 | ORDER_SUCCESS: '/srv/?a=room_data&t=order_success', |
| 24 | - TMP_SYS_PARAM: '/srv/?a=get_item&item_title=参数名称', | 24 | + TMP_SYS_PARAM: '/srv/?a=get_item', |
| 25 | } | 25 | } |
| 26 | 26 | ||
| 27 | /** | 27 | /** | ... | ... |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2022-09-19 14:11:06 | 2 | * @Date: 2022-09-19 14:11:06 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2024-05-28 17:52:48 | 4 | + * @LastEditTime: 2024-06-06 10:11:42 |
| 5 | * @FilePath: /meihuaApp/src/pages/detail/index.vue | 5 | * @FilePath: /meihuaApp/src/pages/detail/index.vue |
| 6 | * @Description: 房间详情页面 | 6 | * @Description: 房间详情页面 |
| 7 | --> | 7 | --> |
| ... | @@ -52,7 +52,8 @@ | ... | @@ -52,7 +52,8 @@ |
| 52 | <view class="notice-content"> | 52 | <view class="notice-content"> |
| 53 | <view> | 53 | <view> |
| 54 | <view class="title">入住须知</view> | 54 | <view class="title">入住须知</view> |
| 55 | - <view class="content">1、本味山居三面环水,为了您的安全,请远离水边,禁止戏水、垂钓、游泳、奔跑等。如有违反,自行承担后果。</view> | 55 | + <view v-html="state.roomInNote " class="taro_html"></view> |
| 56 | + <!-- <view class="content">1、本味山居三面环水,为了您的安全,请远离水边,禁止戏水、垂钓、游泳、奔跑等。如有违反,自行承担后果。</view> | ||
| 56 | <view class="content">2、为了防范火灾,禁止携带火种上岛,全岛禁烟。如需使用壁炉,请和工作人员联系,做到人走火息。</view> | 57 | <view class="content">2、为了防范火灾,禁止携带火种上岛,全岛禁烟。如需使用壁炉,请和工作人员联系,做到人走火息。</view> |
| 57 | <view class="content">3、本味山居周边有野生动物出没,为了安全,禁止进入山居经营范围外的区域。夜间照明范围有限,慎勿外出行走。如有违反,自行承担后果。</view> | 58 | <view class="content">3、本味山居周边有野生动物出没,为了安全,禁止进入山居经营范围外的区域。夜间照明范围有限,慎勿外出行走。如有违反,自行承担后果。</view> |
| 58 | <view class="content">4、山居远离喧嚣,倡导舒缓本味生活,禁止携带荤食、含酒精饮品、宠物,勿穿吊带、短裤、短裙、凉鞋、拖鞋等暴露衣装。</view> | 59 | <view class="content">4、山居远离喧嚣,倡导舒缓本味生活,禁止携带荤食、含酒精饮品、宠物,勿穿吊带、短裤、短裙、凉鞋、拖鞋等暴露衣装。</view> |
| ... | @@ -64,7 +65,7 @@ | ... | @@ -64,7 +65,7 @@ |
| 64 | <view class="content">9、取消或变更请及时联系我们。</view> | 65 | <view class="content">9、取消或变更请及时联系我们。</view> |
| 65 | <view class="content">若入住前一天取消,扣除50%费用作为违约金。</view> | 66 | <view class="content">若入住前一天取消,扣除50%费用作为违约金。</view> |
| 66 | <view class="content">若入住当天取消,扣除100%费用。</view> | 67 | <view class="content">若入住当天取消,扣除100%费用。</view> |
| 67 | - <view class="content mb-1">此须知为入住本味山居之前提,请预订前仔细阅读。若有预订,视为同意上述须知。</view> | 68 | + <view class="content mb-1">此须知为入住本味山居之前提,请预订前仔细阅读。若有预订,视为同意上述须知。</view> --> |
| 68 | </view> | 69 | </view> |
| 69 | 70 | ||
| 70 | <nut-row :gutter="10"> | 71 | <nut-row :gutter="10"> |
| ... | @@ -82,10 +83,11 @@ | ... | @@ -82,10 +83,11 @@ |
| 82 | 83 | ||
| 83 | <script setup> | 84 | <script setup> |
| 84 | import Taro from '@tarojs/taro' | 85 | import Taro from '@tarojs/taro' |
| 86 | +import '@tarojs/taro/html.css' | ||
| 85 | import { ref, computed, reactive, onMounted } from "vue"; | 87 | import { ref, computed, reactive, onMounted } from "vue"; |
| 86 | import calendarSelect from '@/components/calendarSelect.vue' | 88 | import calendarSelect from '@/components/calendarSelect.vue' |
| 87 | import { getCurrentPageParam } from "@/utils/weapp"; | 89 | import { getCurrentPageParam } from "@/utils/weapp"; |
| 88 | -import { getRoomAPI, showMyInfoAPI } from '@/api/index' | 90 | +import { getRoomAPI, showMyInfoAPI, tmpSysParamAPI } from '@/api/index' |
| 89 | 91 | ||
| 90 | /** | 92 | /** |
| 91 | * 获取日期星期几 | 93 | * 获取日期星期几 |
| ... | @@ -197,6 +199,7 @@ const state = reactive({ | ... | @@ -197,6 +199,7 @@ const state = reactive({ |
| 197 | imgData: [], | 199 | imgData: [], |
| 198 | roomInfo: {}, | 200 | roomInfo: {}, |
| 199 | phone: '', | 201 | phone: '', |
| 202 | + roomInNote: '' | ||
| 200 | }); | 203 | }); |
| 201 | 204 | ||
| 202 | onMounted(async () => { | 205 | onMounted(async () => { |
| ... | @@ -229,6 +232,11 @@ onMounted(async () => { | ... | @@ -229,6 +232,11 @@ onMounted(async () => { |
| 229 | return el | 232 | return el |
| 230 | } | 233 | } |
| 231 | } | 234 | } |
| 235 | + // 获取入住须知 | ||
| 236 | + const { code, data } = await tmpSysParamAPI({ item_title: '梅花岛入住须知' }); | ||
| 237 | + if (code) { | ||
| 238 | + state.roomInNote = data.description.replace(/\r\n/g, '<br />') | ||
| 239 | + } | ||
| 232 | }); | 240 | }); |
| 233 | 241 | ||
| 234 | // TODO: 在预定房之前弹出须知,预订者要同意须知 | 242 | // TODO: 在预定房之前弹出须知,预订者要同意须知 | ... | ... |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2022-09-19 14:11:06 | 2 | * @Date: 2022-09-19 14:11:06 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2024-05-29 09:48:54 | 4 | + * @LastEditTime: 2024-06-06 10:18:12 |
| 5 | * @FilePath: /meihuaApp/src/pages/index/index.vue | 5 | * @FilePath: /meihuaApp/src/pages/index/index.vue |
| 6 | * @Description: 首页 | 6 | * @Description: 首页 |
| 7 | --> | 7 | --> |
| ... | @@ -46,23 +46,29 @@ | ... | @@ -46,23 +46,29 @@ |
| 46 | <view class="notice-content"> | 46 | <view class="notice-content"> |
| 47 | <view v-if="notice_type === 1"> | 47 | <view v-if="notice_type === 1"> |
| 48 | <view class="title">本味掠影</view> | 48 | <view class="title">本味掠影</view> |
| 49 | - <view v-html="html1"></view> | 49 | + <!-- <view v-html="html1"></view> --> |
| 50 | - <view class="content mb-1">4、静心服务:健身气功八段锦,湖景茶室、咖啡室,可参与甘露别院静心茶会、别院巡礼等活动(该项看时间因缘)。</view> | 50 | + <view v-html="html_data" class="taro_html"></view> |
| 51 | + <view class="mb-1"></view> | ||
| 52 | + <!-- <view class="content mb-1">4、静心服务:健身气功八段锦,湖景茶室、咖啡室,可参与甘露别院静心茶会、别院巡礼等活动(该项看时间因缘)。</view> --> | ||
| 51 | </view> | 53 | </view> |
| 52 | <view v-if="notice_type === 2"> | 54 | <view v-if="notice_type === 2"> |
| 53 | <view class="title">入住须知</view> | 55 | <view class="title">入住须知</view> |
| 54 | - <view v-html="html2"></view> | 56 | + <view v-html="html_data" class="taro_html"></view> |
| 55 | - <view class="content mb-1">此须知为入住本味山居之前提,请预订前仔细阅读。若有预订,视为同意上述须知。</view> | 57 | + <view class="mb-1"></view> |
| 58 | + <!-- <view v-html="html2"></view> --> | ||
| 59 | + <!-- <view class="content mb-1">此须知为入住本味山居之前提,请预订前仔细阅读。若有预订,视为同意上述须知。</view> --> | ||
| 56 | </view> | 60 | </view> |
| 57 | <view v-if="notice_type === 3"> | 61 | <view v-if="notice_type === 3"> |
| 58 | <view class="title">配套设施</view> | 62 | <view class="title">配套设施</view> |
| 59 | - <view class="content">1、24小时热水供应,部分房间有空调、吊扇,部分区域Wi-Fi。</view> | 63 | + <view v-html="html_data" class="taro_html"></view> |
| 64 | + <view class="mb-1"></view> | ||
| 65 | + <!-- <view class="content">1、24小时热水供应,部分房间有空调、吊扇,部分区域Wi-Fi。</view> | ||
| 60 | <view class="content">2、独栋配有茶室、客厅、书房,部分独栋配有独立厨房、餐厅和院子。</view> | 66 | <view class="content">2、独栋配有茶室、客厅、书房,部分独栋配有独立厨房、餐厅和院子。</view> |
| 61 | <view class="content">3、独栋二楼配有景观天窗。</view> | 67 | <view class="content">3、独栋二楼配有景观天窗。</view> |
| 62 | <view class="content">4、设有公共洗衣房(部分独栋配独立洗衣房)。</view> | 68 | <view class="content">4、设有公共洗衣房(部分独栋配独立洗衣房)。</view> |
| 63 | <view class="content">5、公共区域有湖景餐厅、湖景咖啡屋。</view> | 69 | <view class="content">5、公共区域有湖景餐厅、湖景咖啡屋。</view> |
| 64 | <view class="content">6、房内配有烧水壶、茶具、台灯、吹风机、衣架、拖鞋、洗发水、沐浴露。</view> | 70 | <view class="content">6、房内配有烧水壶、茶具、台灯、吹风机、衣架、拖鞋、洗发水、沐浴露。</view> |
| 65 | - <view class="content mb-1">7、岛上环保需要,牙膏、牙刷、毛巾、浴巾等私人用品请自带。</view> | 71 | + <view class="content mb-1">7、岛上环保需要,牙膏、牙刷、毛巾、浴巾等私人用品请自带。</view> --> |
| 66 | </view> | 72 | </view> |
| 67 | </view> | 73 | </view> |
| 68 | 74 | ||
| ... | @@ -77,13 +83,14 @@ | ... | @@ -77,13 +83,14 @@ |
| 77 | 83 | ||
| 78 | <script setup> | 84 | <script setup> |
| 79 | import Taro from '@tarojs/taro' | 85 | import Taro from '@tarojs/taro' |
| 86 | +import '@tarojs/taro/html.css' | ||
| 80 | import { IconFont } from '@nutui/icons-vue-taro'; | 87 | import { IconFont } from '@nutui/icons-vue-taro'; |
| 81 | import { ref } from 'vue'; | 88 | import { ref } from 'vue'; |
| 82 | import roomCard from '@/components/roomCard.vue' | 89 | import roomCard from '@/components/roomCard.vue' |
| 83 | // import arrowDownImg from '@/assets/images/arrow-down.png' | 90 | // import arrowDownImg from '@/assets/images/arrow-down.png' |
| 84 | import navBar from '@/components/navBar.vue' | 91 | import navBar from '@/components/navBar.vue' |
| 85 | import { useDidShow } from '@tarojs/taro' | 92 | import { useDidShow } from '@tarojs/taro' |
| 86 | -import { getListAPI } from '@/api/index' | 93 | +import { getListAPI, tmpSysParamAPI } from '@/api/index' |
| 87 | 94 | ||
| 88 | // TAG: 模拟onShow事件 | 95 | // TAG: 模拟onShow事件 |
| 89 | useDidShow(() => { | 96 | useDidShow(() => { |
| ... | @@ -199,6 +206,7 @@ export default { | ... | @@ -199,6 +206,7 @@ export default { |
| 199 | notice_type: 1, | 206 | notice_type: 1, |
| 200 | html1: '', | 207 | html1: '', |
| 201 | html2: '', | 208 | html2: '', |
| 209 | + html_data: '', | ||
| 202 | }; | 210 | }; |
| 203 | }, | 211 | }, |
| 204 | methods: { | 212 | methods: { |
| ... | @@ -233,40 +241,60 @@ export default { | ... | @@ -233,40 +241,60 @@ export default { |
| 233 | onArrowDown () { | 241 | onArrowDown () { |
| 234 | this.scrollTop = this.indexCoverHeight; // 调整滚动控件高度 | 242 | this.scrollTop = this.indexCoverHeight; // 调整滚动控件高度 |
| 235 | }, | 243 | }, |
| 244 | + formattedContent(text) { | ||
| 245 | + return text.replace(/\r\n/g, '<br />'); | ||
| 246 | + }, | ||
| 236 | async onShowNotice (type) { // 显示须知 | 247 | async onShowNotice (type) { // 显示须知 |
| 237 | this.show_notice = true; | 248 | this.show_notice = true; |
| 238 | this.notice_type = type; | 249 | this.notice_type = type; |
| 250 | + let item_title= ''; | ||
| 251 | + switch (type) { | ||
| 252 | + case 1: | ||
| 253 | + item_title = '梅花岛本味掠影' | ||
| 254 | + break; | ||
| 255 | + case 2: | ||
| 256 | + item_title = '梅花岛入住须知' | ||
| 257 | + break; | ||
| 258 | + case 3: | ||
| 259 | + item_title = '梅花岛配套设施' | ||
| 260 | + break; | ||
| 261 | + } | ||
| 262 | + const { code, data } = await tmpSysParamAPI({ item_title }); | ||
| 263 | + if (code) { | ||
| 264 | + this.html_data = this.formattedContent(data.description) | ||
| 265 | + } | ||
| 239 | // 处理须知滚动,无法处理问题 | 266 | // 处理须知滚动,无法处理问题 |
| 240 | - const html1 = ` | 267 | + // const html1 = ` |
| 241 | - <view class="content" style="text-indent: 2rem;">外象多变,本心至简。人生百味,归本味。</view> | 268 | + // <view class="content" style="text-indent: 2rem;">外象多变,本心至简。人生百味,归本味。</view> |
| 242 | - <view class="content" style="text-indent: 2rem;">梅花岛本味山居,位于福建省三明市泰宁世界地质公园、世界自然遗产地核心景区大金湖中心。2022年动工,将岛上23幢夯土、砖彻或全木结构的旧民居进行适当修复,成为中国旧乡村改造为禅意民宿的优秀样板。山中景色四时不同,十里平湖美丽如画,空气清新,泉水清洌,可以感受大自然的静谧祥和,享受水天相接、与天地融为一体的自在惬意,完全地放松、放空、放下。</view> | 269 | + // <view class="content" style="text-indent: 2rem;">梅花岛本味山居,位于福建省三明市泰宁世界地质公园、世界自然遗产地核心景区大金湖中心。2022年动工,将岛上23幢夯土、砖彻或全木结构的旧民居进行适当修复,成为中国旧乡村改造为禅意民宿的优秀样板。山中景色四时不同,十里平湖美丽如画,空气清新,泉水清洌,可以感受大自然的静谧祥和,享受水天相接、与天地融为一体的自在惬意,完全地放松、放空、放下。</view> |
| 243 | - <view class="content" style="text-indent: 2rem;">聆听安静,安顿身心,静候您。</view> | 270 | + // <view class="content" style="text-indent: 2rem;">聆听安静,安顿身心,静候您。</view> |
| 244 | - <view class="content" style="text-indent: 2rem; font-weight: bold;">特色:</view> | 271 | + // <view class="content" style="text-indent: 2rem; font-weight: bold;">特色:</view> |
| 245 | - <view class="content">1、提供三餐天然纯净素食(不含五辛)。</view> | 272 | + // <view class="content">1、提供三餐天然纯净素食(不含五辛)。</view> |
| 246 | - <view class="content">2、古早作息方式,日出而作,日落而息。</view> | 273 | + // <view class="content">2、古早作息方式,日出而作,日落而息。</view> |
| 247 | - <view class="content">3、正念、静心、慢生活。</view> | 274 | + // <view class="content">3、正念、静心、慢生活。</view> |
| 248 | - `; | 275 | + // `; |
| 249 | - const html2 = ` | 276 | + // const html2 = ` |
| 250 | - <view class="content">1、本味山居三面环水,为了您的安全,请远离水边,禁止戏水、垂钓、游泳、奔跑等。如有违反,自行承担后果。</view> | 277 | + // <view class="content">1、本味山居三面环水,为了您的安全,请远离水边,禁止戏水、垂钓、游泳、奔跑等。如有违反,自行承担后果。</view> |
| 251 | - <view class="content">2、为了防范火灾,禁止携带火种上岛,全岛禁烟。如需使用壁炉,请和工作人员联系,做到人走火息。</view> | 278 | + // <view class="content">2、为了防范火灾,禁止携带火种上岛,全岛禁烟。如需使用壁炉,请和工作人员联系,做到人走火息。</view> |
| 252 | - <view class="content">3、本味山居周边有野生动物出没,为了安全,禁止进入山居经营范围外的区域。夜间照明范围有限,慎勿外出行走。如有违反,自行承担后果。</view> | 279 | + // <view class="content">3、本味山居周边有野生动物出没,为了安全,禁止进入山居经营范围外的区域。夜间照明范围有限,慎勿外出行走。如有违反,自行承担后果。</view> |
| 253 | - <view class="content">4、山居远离喧嚣,倡导舒缓本味生活,禁止携带荤食、含酒精饮品、宠物,勿穿吊带、短裤、短裙、凉鞋、拖鞋等暴露衣装。</view> | 280 | + // <view class="content">4、山居远离喧嚣,倡导舒缓本味生活,禁止携带荤食、含酒精饮品、宠物,勿穿吊带、短裤、短裙、凉鞋、拖鞋等暴露衣装。</view> |
| 254 | - <view class="content">5、山居统一安排渡船上岛,为保证湖内通行安全,禁止私自雇船进出岛。如有违反,视为当天取消预订,山居不予办理入住。</view> | 281 | + // <view class="content">5、山居统一安排渡船上岛,为保证湖内通行安全,禁止私自雇船进出岛。如有违反,视为当天取消预订,山居不予办理入住。</view> |
| 255 | - <view class="content">6、岛内自然生态茂盛,蚊虫较多,尽量穿着长衣长裤、平底鞋。房间内备有风油精,如果出现过敏等严重症状,请及时和工作人员联系。</view> | 282 | + // <view class="content">6、岛内自然生态茂盛,蚊虫较多,尽量穿着长衣长裤、平底鞋。房间内备有风油精,如果出现过敏等严重症状,请及时和工作人员联系。</view> |
| 256 | - <view class="content">7、客服回复时间:8:00-10:50;14:30-17:00。</view> | 283 | + // <view class="content">7、客服回复时间:8:00-10:50;14:30-17:00。</view> |
| 257 | - <view class="content">上岛渡船班次:上午:8:00;9:30;10:20;下午:14:30;16:30。</view> | 284 | + // <view class="content">上岛渡船班次:上午:8:00;9:30;10:20;下午:14:30;16:30。</view> |
| 258 | - <view class="content">8、入住人员需年满18周岁。</view> | 285 | + // <view class="content">8、入住人员需年满18周岁。</view> |
| 259 | - <view class="content">9、取消或变更请及时联系我们。</view> | 286 | + // <view class="content">9、取消或变更请及时联系我们。</view> |
| 260 | - <view class="content">若入住前一天取消,扣除50%费用作为违约金。</view> | 287 | + // <view class="content">若入住前一天取消,扣除50%费用作为违约金。</view> |
| 261 | - <view class="content">若入住当天取消,扣除100%费用。</view> | 288 | + // <view class="content">若入住当天取消,扣除100%费用。</view> |
| 262 | - `; | 289 | + // `; |
| 263 | - this.html1 = html1; | 290 | + // this.html1 = html1; |
| 264 | - this.html2 = html2; | 291 | + // this.html2 = html2; |
| 265 | }, | 292 | }, |
| 266 | onCloseNotice () { // 关闭须知 | 293 | onCloseNotice () { // 关闭须知 |
| 267 | this.show_notice = false; | 294 | this.show_notice = false; |
| 268 | - this.html1 = ''; | 295 | + // this.html1 = ''; |
| 269 | - this.html2 = ''; | 296 | + // this.html2 = ''; |
| 297 | + this.html_data = ''; | ||
| 270 | } | 298 | } |
| 271 | }, | 299 | }, |
| 272 | onPageScroll ({ scrollTop }) { | 300 | onPageScroll ({ scrollTop }) { | ... | ... |
-
Please register or login to post a comment