hookehuyr

首页新增须知提示逻辑

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: 2023-12-22 17:41:02 4 + * @LastEditTime: 2024-05-24 17:36:35
5 * @FilePath: /meihuaApp/src/pages/auth/index.vue 5 * @FilePath: /meihuaApp/src/pages/auth/index.vue
6 * @Description: 文件描述 6 * @Description: 文件描述
7 --> 7 -->
...@@ -65,8 +65,9 @@ export default { ...@@ -65,8 +65,9 @@ export default {
65 url: `../../${params.url}?id=${params.id}&start_date=${params.start_date}&end_date=${params.end_date}` 65 url: `../../${params.url}?id=${params.id}&start_date=${params.start_date}&end_date=${params.end_date}`
66 }) 66 })
67 } else { // 其他页面分享跳首页 67 } else { // 其他页面分享跳首页
68 + // 新增首页须知是否打开的判断
68 Taro.reLaunch({ 69 Taro.reLaunch({
69 - url: `/pages/index/index` 70 + url: `/pages/index/index?first_in=${wx.getStorageSync("first_in")}`
70 }) 71 })
71 } 72 }
72 Taro.hideLoading(); 73 Taro.hideLoading();
......
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: 2023-12-19 14:37:58 4 + * @LastEditTime: 2024-05-20 18:00:48
5 * @FilePath: /meihuaApp/src/pages/index/index.config.js 5 * @FilePath: /meihuaApp/src/pages/index/index.config.js
6 * @Description: 文件描述 6 * @Description: 文件描述
7 */ 7 */
8 export default { 8 export default {
9 - navigationBarTitleText: '梅花岛民宿', 9 + navigationBarTitleText: '梅花岛本味山居',
10 usingComponents: { 10 usingComponents: {
11 }, 11 },
12 enableShareAppMessage: true 12 enableShareAppMessage: true
......
...@@ -18,6 +18,23 @@ ...@@ -18,6 +18,23 @@
18 .index-list { 18 .index-list {
19 background-color: #f9f9f9; overflow: auto; 19 background-color: #f9f9f9; overflow: auto;
20 } 20 }
21 +
22 + .notice-wrapper {
23 + padding: 1rem;
24 + .notice-content {
25 + .title {
26 + font-weight: bold;
27 + text-align: center;
28 + margin-bottom: 0.5rem;
29 + }
30 + .content {
31 + margin-bottom: 0.5rem;
32 + }
33 + .mb-1 {
34 + margin-bottom: 1rem !important;
35 + }
36 + }
37 + }
21 } 38 }
22 .slide-box { 39 .slide-box {
23 height: 15rem; 40 height: 15rem;
......
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: 2023-12-28 13:33:21 4 + * @LastEditTime: 2024-05-24 17:36:51
5 * @FilePath: /meihuaApp/src/pages/index/index.vue 5 * @FilePath: /meihuaApp/src/pages/index/index.vue
6 * @Description: 首页 6 * @Description: 首页
7 --> 7 -->
...@@ -9,6 +9,9 @@ ...@@ -9,6 +9,9 @@
9 <view class="index-page"> 9 <view class="index-page">
10 <scroll-view :style="scrollStyle" :scroll-y="true" :scroll-top="scrollTop" :scroll-with-animation="true" @scroll="onScroll" @scrolltoupper="onScrollToUpper" @scrolltolower="onScrollToLower"> 10 <scroll-view :style="scrollStyle" :scroll-y="true" :scroll-top="scrollTop" :scroll-with-animation="true" @scroll="onScroll" @scrolltoupper="onScrollToUpper" @scrolltolower="onScrollToLower">
11 <view class="index-cover"> 11 <view class="index-cover">
12 + <view @tap="onShowNotice" style="position: fixed; right: 0.5rem; top: 1rem;">
13 + <IconFont size="22" name="ask" color="#fff"></IconFont>
14 + </view>
12 <image :style="coverStyle" mode="aspectFill" :src="banner_url" /> 15 <image :style="coverStyle" mode="aspectFill" :src="banner_url" />
13 <view @tap="onArrowDown" class="cover-arrow"> 16 <view @tap="onArrowDown" class="cover-arrow">
14 <IconFont color="#f9f9f9" size="30" name="joy-smile" class="nut-icon-am-jump nut-icon-am-infinite"></IconFont> 17 <IconFont color="#f9f9f9" size="30" name="joy-smile" class="nut-icon-am-jump nut-icon-am-infinite"></IconFont>
...@@ -21,6 +24,55 @@ ...@@ -21,6 +24,55 @@
21 </scroll-view> 24 </scroll-view>
22 <view style="height: 6rem;"></view> 25 <view style="height: 6rem;"></view>
23 <nav-bar activated="index" /> 26 <nav-bar activated="index" />
27 + <nut-popup
28 + v-model:visible="show_notice"
29 + position="right"
30 + :style="{ height: '100%' }"
31 + >
32 + <view class="notice-wrapper">
33 + <!-- <view style="text-align: center; margin-bottom: 1rem;">梅花岛的描述和入住须知</view> -->
34 + <view class="notice-content">
35 + <view class="title">本味略影</view>
36 + <view class="content" style="text-indent: 2rem;">外象多变,本心至简。人生百味,回归本味。</view>
37 + <view class="content" style="text-indent: 2rem;">梅花岛本味山居,位于福建省三明市泰宁世界地质公园、世界自然遗产地核心景区大金湖中心。2022年动工,将岛上23幢夯土、砖彻或全木结构的旧民居进行适当修复,成为中国旧乡村改造为禅意民宿的优秀样板。山中景色四时不同,十里平湖美丽如画,空气清新,泉水清洌,可以感受大自然的静谧祥和,享受水天相接、与天地融为一体的自在惬意,完全地放松、放空、放下。</view>
38 + <view class="content mb-1" style="text-indent: 2rem;">聆听安静,安顿身心,静候您。</view>
39 +
40 + <view class="title">本味生活</view>
41 + <view class="content">1、提供三餐天然纯净素食(不含五辛)。</view>
42 + <view class="content">2、古早作息方式,日出而作,日落而息。</view>
43 + <view class="content">3、正念、静心、慢生活。</view>
44 + <view class="content mb-1">4、静心服务:健身气功八段锦,湖景茶室、咖啡室,可参与甘露别院静心茶会、别院巡礼等活动(该项看时间因缘)。</view>
45 +
46 + <view class="title">入住须知</view>
47 + <view class="content">1、本味山居三面环水,为了您的安全,请远离水边,禁止戏水、垂钓、游泳、奔跑等。如有违反,自行承担后果。</view>
48 + <view class="content">2、为了防范火灾,禁止携带火种上岛,全岛禁烟。如需使用壁炉,请和工作人员联系,做到人走火息。</view>
49 + <view class="content">3、本味山居周边有野生动物出没,禁止进入山居经营范围外的区域(详见提示牌)。夜间照明范围有限,慎勿外出行走。如有违反,自行承担后果。</view>
50 + <view class="content">4、山居远离喧嚣,倡导舒缓本味生活,禁止携带荤食、含酒精饮品、宠物,勿穿吊带、短裤、短裙、凉鞋、拖鞋等暴露衣装。</view>
51 + <view class="content">5、山居统一安排渡船上岛,为保证湖内通行安全,禁止私自雇船进出岛。如有违反,视为当天取消预订,山居不予办理入住。</view>
52 + <view class="content">6、岛内自然生态茂盛,蚊虫较多,尽量穿着长衣长裤、平底鞋。房间内备有风油精,如果出现过敏等严重症状,请及时和工作人员联系。</view>
53 + <view class="content">7、工作时间:8:00-5:00,上岛时间:8:00-4:50。</view>
54 + <view class="content mb-1">此须知为入住本位山居之前提,请预订前仔细阅读。若有预订,视为同意上述须知。</view>
55 +
56 + <view class="title">配套设施</view>
57 + <view class="content">1、24小时热水供应,部分房间有空调、吊扇,部分区域Wi-Fi。</view>
58 + <view class="content">2、独栋配有茶室、客厅、书房,部分独栋配有独立厨房、餐厅和院子。</view>
59 + <view class="content">3、独栋二楼配有景观天窗。</view>
60 + <view class="content">4、设有公共洗衣房(部分独栋配独立洗衣房)。</view>
61 + <view class="content">5、公共区域有湖景餐厅、湖景咖啡屋。</view>
62 + <view class="content">6、房内配有烧水壶、茶具、台灯、吹风机、衣架、拖鞋、洗发水、沐浴露。</view>
63 + <view class="content mb-1">7、岛上环保需要,牙膏、牙刷、毛巾、浴巾等私人用品请自带。</view>
64 +
65 + <view class="title">入住人员</view>
66 + <view class="content mb-1">需年满18周岁。</view>
67 +
68 + <view class="title">取消规定</view>
69 + <view class="content">取消或变更请及时联系我们。</view>
70 + <view class="content">若入住前一天取消,扣除50%费用作为违约金。</view>
71 + <view class="content">若入住当天取消,扣除100%费用。</view>
72 + </view>
73 + <nut-button @tap="onCloseNotice" color="#6a4925" block type="primary" style="margin-top: 1rem;">关闭</nut-button>
74 + </view>
75 + </nut-popup>
24 </view> 76 </view>
25 </template> 77 </template>
26 78
...@@ -51,7 +103,7 @@ import "./index.less"; ...@@ -51,7 +103,7 @@ import "./index.less";
51 // import { activityHomeAPI } from '@/api/Host/index' 103 // import { activityHomeAPI } from '@/api/Host/index'
52 import { $ } from '@tarojs/extend' 104 import { $ } from '@tarojs/extend'
53 import mixin from '@/utils/mixin'; 105 import mixin from '@/utils/mixin';
54 -import { sysParamAPI } from '@/api/index' 106 +import { sysParamAPI, tmpSysParamAPI } from '@/api/index'
55 107
56 export default { 108 export default {
57 name: "indexPage", 109 name: "indexPage",
...@@ -134,6 +186,21 @@ export default { ...@@ -134,6 +186,21 @@ export default {
134 if (code) { 186 if (code) {
135 this.banner_url = data.home_banner ? data.home_banner : 'https://cdn.ipadbiz.cn/meihua/banner1@2x.png'; 187 this.banner_url = data.home_banner ? data.home_banner : 'https://cdn.ipadbiz.cn/meihua/banner1@2x.png';
136 } 188 }
189 + //
190 + // const { code: tmpCode, data: tmpData } = await tmpSysParamAPI();
191 + // if (tmpCode) {
192 + // // console.warn(tmpData);
193 + // // this.notice = tmpData.notice;
194 + // // 第一次进入时,弹出提示
195 + // if (!wx.getStorageSync("first_in")) {
196 + // this.show_notice = true;
197 + // wx.setStorageSync("first_in", 1);
198 + // }
199 + // }
200 + // 第一次进入时,弹出提示入住须知
201 + if (!wx.getStorageSync("first_in")) {
202 + this.show_notice = true;
203 + }
137 }, 204 },
138 data() { 205 data() {
139 return { 206 return {
...@@ -144,6 +211,8 @@ export default { ...@@ -144,6 +211,8 @@ export default {
144 flag: true, 211 flag: true,
145 page: 1, 212 page: 1,
146 limit: 10, 213 limit: 10,
214 + show_notice: false,
215 + notice: '',
147 }; 216 };
148 }, 217 },
149 methods: { 218 methods: {
...@@ -177,6 +246,13 @@ export default { ...@@ -177,6 +246,13 @@ export default {
177 }, 246 },
178 onArrowDown () { 247 onArrowDown () {
179 this.scrollTop = this.indexCoverHeight; // 调整滚动控件高度 248 this.scrollTop = this.indexCoverHeight; // 调整滚动控件高度
249 + },
250 + onShowNotice () { // 显示须知
251 + this.show_notice = true;
252 + },
253 + onCloseNotice () { // 关闭须知
254 + this.show_notice = false;
255 + wx.setStorageSync("first_in", 1);
180 } 256 }
181 }, 257 },
182 onPageScroll ({ scrollTop }) { 258 onPageScroll ({ scrollTop }) {
......