hookehuyr

fix Bob细节样式调整

...@@ -37,6 +37,7 @@ declare module '@vue/runtime-core' { ...@@ -37,6 +37,7 @@ declare module '@vue/runtime-core' {
37 VanSwipeItem: typeof import('vant/es')['SwipeItem'] 37 VanSwipeItem: typeof import('vant/es')['SwipeItem']
38 VanTab: typeof import('vant/es')['Tab'] 38 VanTab: typeof import('vant/es')['Tab']
39 VanTabs: typeof import('vant/es')['Tabs'] 39 VanTabs: typeof import('vant/es')['Tabs']
40 + VanToast: typeof import('vant/es')['Toast']
40 VRViewer: typeof import('./src/components/VRViewer/index.vue')['default'] 41 VRViewer: typeof import('./src/components/VRViewer/index.vue')['default']
41 } 42 }
42 } 43 }
......
1 <!-- 1 <!--
2 * @Date: 2024-09-15 22:08:49 2 * @Date: 2024-09-15 22:08:49
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2024-09-22 21:59:49 4 + * @LastEditTime: 2024-09-23 10:52:10
5 * @FilePath: /map-demo/src/views/bieyuan/info.vue 5 * @FilePath: /map-demo/src/views/bieyuan/info.vue
6 * @Description: 文件描述 6 * @Description: 文件描述
7 --> 7 -->
8 <template> 8 <template>
9 <div class="info-page"> 9 <div class="info-page">
10 <div class="info-header-wrapper"> 10 <div class="info-header-wrapper">
11 + <div v-if="showBack" style="position: absolute; top: 1rem; left: 0.5rem; z-index: 9;">
12 + <van-icon name="arrow-left" color="white" size="1.75rem" @click="goBack()" />
13 + </div>
11 <van-config-provider :theme-vars="themeVars"> 14 <van-config-provider :theme-vars="themeVars">
12 <van-swipe class="my-swipe" indicator-color="#DD7850" lazy-render :autoplay="5000"> 15 <van-swipe class="my-swipe" indicator-color="#DD7850" lazy-render :autoplay="5000">
13 - <van-swipe-item v-for="image in images" :key="image"> 16 + <van-swipe-item v-for="image in page_details.banner" :key="image">
14 <van-image fit="cover" width="100%" height="13rem" :src="image" /> 17 <van-image fit="cover" width="100%" height="13rem" :src="image" />
15 </van-swipe-item> 18 </van-swipe-item>
16 </van-swipe> 19 </van-swipe>
...@@ -25,59 +28,20 @@ ...@@ -25,59 +28,20 @@
25 </div> 28 </div>
26 <div class="info-sub-title">{{ page_details.note }}</div> 29 <div class="info-sub-title">{{ page_details.note }}</div>
27 </div> 30 </div>
28 - <div class="van-hairline--bottom"> 31 + <div class="">
29 - <van-tabs ref="tabsRef" v-model:active="active" @click-tab="clickTab" color="#DD7850" title-active-color="#DD7850" sticky animated> 32 + <van-config-provider :theme-vars="themeVars">
33 + <van-tabs ref="tabsRef" v-model:active="active" @click-tab="clickTab" color="#DD7850" title-active-color="#DD7850" title-inactive-color="#DD7850" sticky animated>
30 <van-tab title="介 绍"> 34 <van-tab title="介 绍">
31 <div class="info-content"> 35 <div class="info-content">
32 - <!-- <p style="line-height: 1.75; padding: 0 0.85rem; color: #47525F;">选佛场是一个宗教活动场所,集禅堂与讲堂功能于一体。其设计仿制古代石窟样式,把古代人修行的场所“石窟”搬进室内。禅堂内的释迦牟尼佛像,仿麦积山石窟第44号特窟“东方的微笑”的造型。禅堂设计自然古朴,匠心独运,星光、烛光、月光三光辉映,营造出“一个人不孤单,一千人不喧闹”的宁静祥和的氛围。禅堂可容纳千人,开展讲经、禅修、法会等多种活动,提供礼佛、供灯、静坐等体验。</p>
33 - <div class="van-hairline--bottom" style="margin: 1rem 0;"></div>
34 - <div style="padding: 1rem;">
35 - <div style="color: #DD7850;">•&nbsp;五方塔</div>
36 - <div style="color: #47525F; margin-top: 1rem; line-height: 1.75;">禅堂外的草坪,安立着大小不一五座佛塔。信众可绕塔或悬挂风铃祝愿祈福,在肃静庄严的氛围中得到佛力加持,自净其意,心想事成。</div>
37 - </div> -->
38 <div v-html="page_details.introduction" style="padding: 0 1rem;"></div> 36 <div v-html="page_details.introduction" style="padding: 0 1rem;"></div>
39 </div> 37 </div>
40 </van-tab> 38 </van-tab>
41 <van-tab title="故 事"> 39 <van-tab title="故 事">
42 - <!-- <div style="padding: 0 1rem;">
43 - <div style="padding: 1rem;">
44 - <div style="color: #DD7850;">•&nbsp;选官何如选佛</div>
45 - </div>
46 - <div style="padding: 0 1rem;">
47 - <van-image width="100%" height="11rem" fit="cover" src="https://cdn.ipadbiz.cn/bieyuan/map/Mix_20230612_201951.png" />
48 - </div>
49 - <div style="padding: 1rem;">
50 - <p style="color: #47525F; line-height: 1.75;">过去把禅堂叫作选佛场,意思是选择作佛的场所。这个典故与丹霞禅师有关。 <br />他原本是一个秀才,赴京赶考的途中遇到一位禅师,这位禅师跟他讲,选官何如选佛?考官还不如成佛利益更大。世间功名如过眼云烟,即便追求得到也是暂时利益,执著于此就会烦恼重重,甚至不断造业。而学佛修行,考佛就是要成佛,成就生命永恒的福祉。这是永久的利益,尽未来际的利益。每个生命原本具备觉悟的潜质,具有无尽的功德宝藏,取之不尽用之不竭。成佛,可以断除一切迷惑烦恼,可以彻底地开发我们生命的潜质,全然觉醒,这个利益无量无边。丹霞禅师深具慧根,一经点拨,马上出家。</p>
51 - </div>
52 - <div class="van-hairline--bottom" style="margin: 0 1rem;"></div>
53 - </div>
54 - <div style="padding: 0 1rem;">
55 - <div style="padding: 1rem;">
56 - <div style="color: #DD7850;">•&nbsp;把洞窟搬进讲堂</div>
57 - </div>
58 - <div style="padding: 0 1rem;">
59 - <van-image width="100%" height="11rem" fit="cover" src="https://cdn.ipadbiz.cn/bieyuan/map/Mix_20240815_211927.png" />
60 - </div>
61 - <div style="padding: 1rem;">
62 - <p style="color: #47525F; line-height: 1.75;">洞窟,是传统的佛教建筑形式,最早在印度盛行,古代僧人喜欢在崇山峻岭的幽僻处开凿洞窟,遁世修行。选佛场集禅堂与讲堂的功能于一体,把洞窟搬进讲堂,既有回归佛教本怀的宁静温暖,又体现出融入泰宁岩穴文化的祥和之气。</p>
63 - </div>
64 - <div class="van-hairline--bottom" style="margin: 0 1rem;"></div>
65 - </div> -->
66 <div class="info-content"> 40 <div class="info-content">
67 <div v-html="page_details.story" style="padding: 0 1rem;"></div> 41 <div v-html="page_details.story" style="padding: 0 1rem;"></div>
68 </div> 42 </div>
69 </van-tab> 43 </van-tab>
70 <van-tab title="体 验" id="tab-3"> 44 <van-tab title="体 验" id="tab-3">
71 - <!-- <div style="padding: 0 1rem;">
72 - <div style="padding: 1rem;">
73 - <div style="color: #DD7850;">•&nbsp;供灯</div>
74 - <div style="color: #47525F; margin-top: 1rem; line-height: 1.75;">禅堂内自助供灯。</div>
75 - </div>
76 - <div style="padding: 0 1rem;">
77 - <van-image width="100%" height="11rem" fit="cover" src="https://cdn.ipadbiz.cn/bieyuan/map/Mix_20240815_211927.png" />
78 - </div>
79 - <div class="van-hairline--bottom" style="margin: 0 1rem;"></div>
80 - </div> -->
81 <div class="info-content"> 45 <div class="info-content">
82 <div v-html="page_details.experience" style="padding: 0 1rem;"></div> 46 <div v-html="page_details.experience" style="padding: 0 1rem;"></div>
83 </div> 47 </div>
...@@ -94,6 +58,7 @@ ...@@ -94,6 +58,7 @@
94 </div> --> 58 </div> -->
95 </van-tab> 59 </van-tab>
96 </van-tabs> 60 </van-tabs>
61 + </van-config-provider>
97 </div> 62 </div>
98 </div> 63 </div>
99 <div class="info-logo"> 64 <div class="info-logo">
...@@ -121,11 +86,13 @@ const $router = useRouter(); ...@@ -121,11 +86,13 @@ const $router = useRouter();
121 86
122 const themeVars = ref({ 87 const themeVars = ref({
123 swipeIndicatorInactiveBackground: '#fff', 88 swipeIndicatorInactiveBackground: '#fff',
124 - swipeIndicatorMargin: '1.5rem' 89 + swipeIndicatorMargin: '1.5rem',
90 + tabFontSize: '0.95rem',
125 }); 91 });
126 92
127 const props = defineProps({ 93 const props = defineProps({
128 info: Object, 94 info: Object,
95 + height: Number
129 }); 96 });
130 97
131 const page_details = ref({}); 98 const page_details = ref({});
...@@ -133,9 +100,10 @@ const page_details = ref({}); ...@@ -133,9 +100,10 @@ const page_details = ref({});
133 watch( 100 watch(
134 () => props.info, 101 () => props.info,
135 (v) => { 102 (v) => {
136 - // TODO:获取标记点详情进行后续处理
137 if (v.details.length) { 103 if (v.details.length) {
138 page_details.value = { ...v.details[0], position: v.position }; 104 page_details.value = { ...v.details[0], position: v.position };
105 + // 获取浏览器可视范围的高度
106 + $('.info-page').height(props.height + 'px');
139 } 107 }
140 } 108 }
141 ) 109 )
...@@ -205,7 +173,10 @@ onMounted(async () => { ...@@ -205,7 +173,10 @@ onMounted(async () => {
205 const current_marker = raw_list.filter(item => item.id == marker_id)[0]; 173 const current_marker = raw_list.filter(item => item.id == marker_id)[0];
206 // 174 //
207 page_details.value = { ...current_marker.details[0], position: current_marker.position }; 175 page_details.value = { ...current_marker.details[0], position: current_marker.position };
208 - console.log("🚀 ~ file: info.vue:201 ~ onMounted ~ page_details.value:", page_details.value); 176 + // 富文本转义, 分割线样式转换
177 + page_details.value.introduction = page_details.value.introduction?.replace(/\<hr\>/g, '<div class="van-hairline--bottom" style="margin: 1rem 0;"></div>')
178 + page_details.value.story = page_details.value.story?.replace(/\<hr\>/g, '<div class="van-hairline--bottom" style="margin: 1rem 0;"></div>')
179 + page_details.value.experience = page_details.value.experience?.replace(/\<hr\>/g, '<div class="van-hairline--bottom" style="margin: 1rem 0;"></div>')
209 } 180 }
210 }); 181 });
211 182
...@@ -240,6 +211,12 @@ const goTo = () => { // 打开标记地图显示 ...@@ -240,6 +211,12 @@ const goTo = () => { // 打开标记地图显示
240 } 211 }
241 } 212 }
242 213
214 +const goBack = () => {
215 + $router.go(-1);
216 +}
217 +
218 +const showBack = computed(() => $router.currentRoute.value.path === '/bieyuan/info');
219 +
243 const voicePause = () => { 220 const voicePause = () => {
244 audio.value.pause(); 221 audio.value.pause();
245 store.changeAudioStatus('pause'); 222 store.changeAudioStatus('pause');
...@@ -274,13 +251,14 @@ defineExpose({ ...@@ -274,13 +251,14 @@ defineExpose({
274 position: relative; 251 position: relative;
275 .info-header-wrapper { 252 .info-header-wrapper {
276 position: relative; 253 position: relative;
254 + min-height: 2rem;
277 .header-z { 255 .header-z {
278 position: absolute; 256 position: absolute;
279 bottom: 0; 257 bottom: 0;
280 left: 0; 258 left: 0;
281 right: 0; 259 right: 0;
282 height: 1rem; 260 height: 1rem;
283 - box-shadow: rgba(241, 242, 248, 0.8) 0px -3px 20px 12px; 261 + box-shadow: rgba(241, 242, 248, 0.5) 0px -3px 20px 12px;
284 background-color: #f7f7f7; 262 background-color: #f7f7f7;
285 margin: 0 1rem; 263 margin: 0 1rem;
286 border-top-left-radius: 0.5rem; 264 border-top-left-radius: 0.5rem;
...@@ -307,6 +285,7 @@ defineExpose({ ...@@ -307,6 +285,7 @@ defineExpose({
307 .info-sub-title { 285 .info-sub-title {
308 font-size: 0.85rem; 286 font-size: 0.85rem;
309 color: #A0A8B1; 287 color: #A0A8B1;
288 + line-height: 1.75;
310 } 289 }
311 .info-btn { 290 .info-btn {
312 width: 3rem; 291 width: 3rem;
...@@ -320,10 +299,12 @@ defineExpose({ ...@@ -320,10 +299,12 @@ defineExpose({
320 } 299 }
321 } 300 }
322 .info-content { 301 .info-content {
302 + color: #47525F;
323 padding: 1rem; 303 padding: 1rem;
304 + line-height: 1.75;
324 p { 305 p {
325 line-height: 1.75; 306 line-height: 1.75;
326 - padding: 0 0.85rem; 307 + // padding: 0 0.85rem;
327 text-align: justify; 308 text-align: justify;
328 img { 309 img {
329 width: 100%; 310 width: 100%;
...@@ -374,5 +355,9 @@ defineExpose({ ...@@ -374,5 +355,9 @@ defineExpose({
374 justify-content: center; 355 justify-content: center;
375 margin: 3rem; 356 margin: 3rem;
376 } 357 }
358 +
359 + .van-tabs__wrap {
360 + border-bottom: 1px solid #F3F3F3;
361 + }
377 } 362 }
378 </style> 363 </style>
......
1 <!-- 1 <!--
2 * @Date: 2023-05-19 14:54:27 2 * @Date: 2023-05-19 14:54:27
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2024-09-22 14:03:09 4 + * @LastEditTime: 2024-09-23 10:50:53
5 * @FilePath: /map-demo/src/views/bieyuan/map.vue 5 * @FilePath: /map-demo/src/views/bieyuan/map.vue
6 * @Description: 公众地图主体页面 6 * @Description: 公众地图主体页面
7 --> 7 -->
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
42 <button @click="show = false">关闭</button> 42 <button @click="show = false">关闭</button>
43 </div> 43 </div>
44 </template> --> 44 </template> -->
45 - <page-info ref="pageInfo" :info="itemInfo" @close-float="onCloseFloat" @route="onRoute"></page-info> 45 + <page-info ref="pageInfo" :info="itemInfo" :height="info_height" @close-float="onCloseFloat" @route="onRoute"></page-info>
46 <!-- <div v-if="showClose" @click="closeFloatPanel" class="close-float-panel"> 46 <!-- <div v-if="showClose" @click="closeFloatPanel" class="close-float-panel">
47 <van-icon name="arrow-left" color="#FFF" size="1.5rem" /> 47 <van-icon name="arrow-left" color="#FFF" size="1.5rem" />
48 </div> --> 48 </div> -->
...@@ -176,7 +176,7 @@ export default { ...@@ -176,7 +176,7 @@ export default {
176 data_paths: {}, // 接口获取-地图导航路径 176 data_paths: {}, // 接口获取-地图导航路径
177 data_path_list: [], // 接口获取-地图导航路径 177 data_path_list: [], // 接口获取-地图导航路径
178 info_height: 0, 178 info_height: 0,
179 - anchors: [0, (0.45 * window.innerHeight), (1 * window.innerHeight)], 179 + anchors: [0, (0.65 * window.innerHeight), (1 * window.innerHeight)],
180 themeVars: { 180 themeVars: {
181 floatingPanelHeaderHeight: 0, 181 floatingPanelHeaderHeight: 0,
182 floatingPanelBorderRadius: '1.25rem' 182 floatingPanelBorderRadius: '1.25rem'
...@@ -375,13 +375,13 @@ export default { ...@@ -375,13 +375,13 @@ export default {
375 375
376 376
377 // 打开浮动面板 377 // 打开浮动面板
378 - this.info_height = (0.45 * window.innerHeight); 378 + this.info_height = (0.65 * window.innerHeight);
379 // 浮动面板样式 379 // 浮动面板样式
380 $('.van-floating-panel__content').css('borderRadius', '1.25rem'); 380 $('.van-floating-panel__content').css('borderRadius', '1.25rem');
381 $('.van-floating-panel').css('boxShadow', '0 0 15px black'); 381 $('.van-floating-panel').css('boxShadow', '0 0 15px black');
382 382
383 // 定位到当前位置中心 383 // 定位到当前位置中心
384 - this.map.setZoomAndCenter(this.zoom, this.itemInfo.position); 384 + // this.map.setZoomAndCenter(this.zoom, this.itemInfo.position);
385 }) 385 })
386 } 386 }
387 // TODO: ID问题看看实际名称叫什么 387 // TODO: ID问题看看实际名称叫什么
...@@ -653,7 +653,7 @@ export default { ...@@ -653,7 +653,7 @@ export default {
653 // }) 653 // })
654 }, 654 },
655 onHeightChange ({ height }) { // 监听浮动面板高度变化 655 onHeightChange ({ height }) { // 监听浮动面板高度变化
656 - if (height === window.innerHeight) { 656 + if (height > window.innerHeight * 0.6) {
657 // // 浮动面板样式 657 // // 浮动面板样式
658 // $('.van-floating-panel__content').css('borderRadius', '0'); 658 // $('.van-floating-panel__content').css('borderRadius', '0');
659 // this.showClose = true; 659 // this.showClose = true;
...@@ -675,7 +675,7 @@ export default { ...@@ -675,7 +675,7 @@ export default {
675 } 675 }
676 }, 676 },
677 closeFloatPanel () { 677 closeFloatPanel () {
678 - this.info_height = (0.45 * window.innerHeight); 678 + this.info_height = (0.65 * window.innerHeight);
679 $('.van-floating-panel__content').css('borderRadius', '1.25rem'); 679 $('.van-floating-panel__content').css('borderRadius', '1.25rem');
680 this.showClose = false; 680 this.showClose = false;
681 // 关闭音频 681 // 关闭音频
......