hookehuyr

提示文案从接口获取

/*
* @Date: 2023-12-22 10:29:37
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-05-21 20:51:57
* @LastEditTime: 2024-06-06 09:31:34
* @FilePath: /meihuaApp/src/api/index.js
* @Description: 文件描述
*/
......@@ -21,7 +21,7 @@ const Api = {
PAY: '/srv/?a=pay',
PAY_CHECK: '/srv/?a=pay_check',
ORDER_SUCCESS: '/srv/?a=room_data&t=order_success',
TMP_SYS_PARAM: '/srv/?a=get_item&item_title=参数名称',
TMP_SYS_PARAM: '/srv/?a=get_item',
}
/**
......
<!--
* @Date: 2022-09-19 14:11:06
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-05-28 17:52:48
* @LastEditTime: 2024-06-06 10:11:42
* @FilePath: /meihuaApp/src/pages/detail/index.vue
* @Description: 房间详情页面
-->
......@@ -52,7 +52,8 @@
<view class="notice-content">
<view>
<view class="title">入住须知</view>
<view class="content">1、本味山居三面环水,为了您的安全,请远离水边,禁止戏水、垂钓、游泳、奔跑等。如有违反,自行承担后果。</view>
<view v-html="state.roomInNote " class="taro_html"></view>
<!-- <view class="content">1、本味山居三面环水,为了您的安全,请远离水边,禁止戏水、垂钓、游泳、奔跑等。如有违反,自行承担后果。</view>
<view class="content">2、为了防范火灾,禁止携带火种上岛,全岛禁烟。如需使用壁炉,请和工作人员联系,做到人走火息。</view>
<view class="content">3、本味山居周边有野生动物出没,为了安全,禁止进入山居经营范围外的区域。夜间照明范围有限,慎勿外出行走。如有违反,自行承担后果。</view>
<view class="content">4、山居远离喧嚣,倡导舒缓本味生活,禁止携带荤食、含酒精饮品、宠物,勿穿吊带、短裤、短裙、凉鞋、拖鞋等暴露衣装。</view>
......@@ -64,7 +65,7 @@
<view class="content">9、取消或变更请及时联系我们。</view>
<view class="content">若入住前一天取消,扣除50%费用作为违约金。</view>
<view class="content">若入住当天取消,扣除100%费用。</view>
<view class="content mb-1">此须知为入住本味山居之前提,请预订前仔细阅读。若有预订,视为同意上述须知。</view>
<view class="content mb-1">此须知为入住本味山居之前提,请预订前仔细阅读。若有预订,视为同意上述须知。</view> -->
</view>
<nut-row :gutter="10">
......@@ -82,10 +83,11 @@
<script setup>
import Taro from '@tarojs/taro'
import '@tarojs/taro/html.css'
import { ref, computed, reactive, onMounted } from "vue";
import calendarSelect from '@/components/calendarSelect.vue'
import { getCurrentPageParam } from "@/utils/weapp";
import { getRoomAPI, showMyInfoAPI } from '@/api/index'
import { getRoomAPI, showMyInfoAPI, tmpSysParamAPI } from '@/api/index'
/**
* 获取日期星期几
......@@ -197,6 +199,7 @@ const state = reactive({
imgData: [],
roomInfo: {},
phone: '',
roomInNote: ''
});
onMounted(async () => {
......@@ -229,6 +232,11 @@ onMounted(async () => {
return el
}
}
// 获取入住须知
const { code, data } = await tmpSysParamAPI({ item_title: '梅花岛入住须知' });
if (code) {
state.roomInNote = data.description.replace(/\r\n/g, '<br />')
}
});
// TODO: 在预定房之前弹出须知,预订者要同意须知
......
This diff is collapsed. Click to expand it.