hookehuyr

植被介绍页全部处理为七牛图片

...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
2 * @Author: hookehuyr hookehuyr@gmail.com 2 * @Author: hookehuyr hookehuyr@gmail.com
3 * @Date: 2022-05-26 23:52:36 3 * @Date: 2022-05-26 23:52:36
4 * @LastEditors: hookehuyr hookehuyr@gmail.com 4 * @LastEditors: hookehuyr hookehuyr@gmail.com
5 - * @LastEditTime: 2024-04-12 06:04:39 5 + * @LastEditTime: 2024-04-14 17:17:51
6 * @FilePath: /fxPark/src/App.vue 6 * @FilePath: /fxPark/src/App.vue
7 * @Description: 7 * @Description:
8 --> 8 -->
...@@ -28,6 +28,9 @@ import wx from 'weixin-js-sdk' ...@@ -28,6 +28,9 @@ import wx from 'weixin-js-sdk'
28 import { wxJsAPI } from '@/api/wx/config' 28 import { wxJsAPI } from '@/api/wx/config'
29 import { apiList } from '@/api/wx/jsApiList.js' 29 import { apiList } from '@/api/wx/jsApiList.js'
30 30
31 +import dayjs from 'dayjs';
32 +console.log("🚀 ~ file: App.vue:32 ~ 时间戳:", dayjs().unix());
33 +
31 // 使用 include + pinia 状态管理动态缓存页面 34 // 使用 include + pinia 状态管理动态缓存页面
32 const store = mainStore() 35 const store = mainStore()
33 const keepPages = computed(() => store.getKeepPages) 36 const keepPages = computed(() => store.getKeepPages)
......
1 <!-- 1 <!--
2 * @Date: 2024-04-10 16:08:09 2 * @Date: 2024-04-10 16:08:09
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2024-04-12 22:57:03 4 + * @LastEditTime: 2024-04-14 17:29:50
5 * @FilePath: /fxPark/src/views/fxPark/intro.vue 5 * @FilePath: /fxPark/src/views/fxPark/intro.vue
6 * @Description: 植被介绍页 6 * @Description: 植被介绍页
7 --> 7 -->
8 <template> 8 <template>
9 <div class="intro-page"> 9 <div class="intro-page">
10 - <div></div> 10 + <div>
11 - <div style="margin: 1rem;"> 11 + <img :src="INTRO_IMG[revision]" style="width: 100%; pointer-events:none;">
12 + </div>
13 + <!-- <div style="margin: 1rem;">
12 <div style="margin-bottom: 1rem;"> 14 <div style="margin-bottom: 1rem;">
13 <span style="font-size: 1.25rem;">{{ tree_data?.name }}</span> 15 <span style="font-size: 1.25rem;">{{ tree_data?.name }}</span>
14 <span style="font-size: 0.85rem;">{{ tree_data?.nickname }}</span> 16 <span style="font-size: 0.85rem;">{{ tree_data?.nickname }}</span>
...@@ -35,7 +37,7 @@ ...@@ -35,7 +37,7 @@
35 <div class="light-up-text">恭喜您植被已被点亮</div> 37 <div class="light-up-text">恭喜您植被已被点亮</div>
36 <div style="margin: 1rem 1rem 2rem 1rem; color: white; text-align: center;"> 38 <div style="margin: 1rem 1rem 2rem 1rem; color: white; text-align: center;">
37 <div @click="goToPoster" style="background-color: #F68015; display: inline-block; padding: 0.7rem 2rem; border-radius: 1.5rem;">生成海报</div> 39 <div @click="goToPoster" style="background-color: #F68015; display: inline-block; padding: 0.7rem 2rem; border-radius: 1.5rem;">生成海报</div>
38 - </div> 40 + </div> -->
39 </div> 41 </div>
40 </template> 42 </template>
41 43
...@@ -55,32 +57,42 @@ useTitle($route.meta.title); ...@@ -55,32 +57,42 @@ useTitle($route.meta.title);
55 const revision = $route.query.revision; // revision 植被编号 57 const revision = $route.query.revision; // revision 植被编号
56 const tree_data = ref({}); 58 const tree_data = ref({});
57 59
60 +// TODO: 等待正式数据
61 +const INTRO_IMG = { // 植被介绍七牛图片地址映射
62 + '1': 'https://cdn.ipadbiz.cn/xfPark/intro/intro-1.1713086546.jpg',
63 + '2': 'https://cdn.ipadbiz.cn/xfPark/intro/intro-1.1713086546.jpg',
64 + '3': 'https://cdn.ipadbiz.cn/xfPark/intro/intro-1.1713086546.jpg',
65 + '4': 'https://cdn.ipadbiz.cn/xfPark/intro/intro-1.1713086546.jpg',
66 + '5': 'https://cdn.ipadbiz.cn/xfPark/intro/intro-1.1713086546.jpg',
67 + '6': 'https://cdn.ipadbiz.cn/xfPark/intro/intro-1.1713086546.jpg',
68 +}
69 +
58 onMounted(async () => { 70 onMounted(async () => {
59 - const { code, data } = await getTreeAPI(); 71 + // const { code, data } = await getTreeAPI();
60 - if (code) { 72 + // if (code) {
61 - let index = data.findIndex(item => item.revision == revision); // 植被信息index 73 + // let index = data.findIndex(item => item.revision == revision); // 植被信息index
62 - tree_data.value = data[index]; // 当前植被信息 74 + // tree_data.value = data[index]; // 当前植被信息
63 - // 植被介绍样式 75 + // // 植被介绍样式
64 - nextTick(() => { 76 + // nextTick(() => {
65 - $('.tree-intro p, .tree-mission-note p').css({ 77 + // $('.tree-intro p, .tree-mission-note p').css({
66 - 'lineHeight': '1.8', 78 + // 'lineHeight': '1.8',
67 - 'marginBottom': '0.5rem' 79 + // 'marginBottom': '0.5rem'
68 - }); 80 + // });
69 - }) 81 + // })
70 - } 82 + // }
71 // 进入页面激活 83 // 进入页面激活
72 const activeTree = await activeTreeAPI({ tree_revision: revision }); 84 const activeTree = await activeTreeAPI({ tree_revision: revision });
73 // 埋点 85 // 埋点
74 const saveEvent = await saveEventAPI({ event_code: 'open_page', event_value: 'tree' }); 86 const saveEvent = await saveEventAPI({ event_code: 'open_page', event_value: 'tree' });
75 }); 87 });
76 88
77 -const formattedIntro = computed(() => { // 植被介绍样式 格式化-处理空格 89 +// const formattedIntro = computed(() => { // 植被介绍样式 格式化-处理空格
78 - return tree_data?.value?.intro?.split("\n").map((line) => `<p>${line}</p>`).join(""); 90 +// return tree_data?.value?.intro?.split("\n").map((line) => `<p>${line}</p>`).join("");
79 -}); 91 +// });
80 92
81 -const formattedNote = computed(() => { // 植被任务卡note 格式化-处理空格 93 +// const formattedNote = computed(() => { // 植被任务卡note 格式化-处理空格
82 - return tree_data?.value?.mission_note?.split("\n").map((line) => `<p>${line}</p>`).join(""); 94 +// return tree_data?.value?.mission_note?.split("\n").map((line) => `<p>${line}</p>`).join("");
83 -}); 95 +// });
84 96
85 const goToPoster = () => { // 去海报页 97 const goToPoster = () => { // 去海报页
86 $router.push({ 98 $router.push({
......