Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
fxPark
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2024-04-14 17:32:03 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6112f73dcc23610481e49c528b254faed2b05020
6112f73d
1 parent
53361251
植被介绍页全部处理为七牛图片
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
23 deletions
src/App.vue
src/assets/images/intro/intro-1.1713086546.jpg
src/views/fxPark/intro.vue
src/App.vue
View file @
6112f73
...
...
@@ -2,7 +2,7 @@
* @Author: hookehuyr hookehuyr@gmail.com
* @Date: 2022-05-26 23:52:36
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-04-1
2 06:04:39
* @LastEditTime: 2024-04-1
4 17:17:51
* @FilePath: /fxPark/src/App.vue
* @Description:
-->
...
...
@@ -28,6 +28,9 @@ import wx from 'weixin-js-sdk'
import { wxJsAPI } from '@/api/wx/config'
import { apiList } from '@/api/wx/jsApiList.js'
import dayjs from 'dayjs';
console.log("🚀 ~ file: App.vue:32 ~ 时间戳:", dayjs().unix());
// 使用 include + pinia 状态管理动态缓存页面
const store = mainStore()
const keepPages = computed(() => store.getKeepPages)
...
...
src/assets/images/intro/intro-1.1713086546.jpg
0 → 100644
View file @
6112f73
207 KB
src/views/fxPark/intro.vue
View file @
6112f73
<!--
* @Date: 2024-04-10 16:08:09
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-04-1
2 22:57:03
* @LastEditTime: 2024-04-1
4 17:29:50
* @FilePath: /fxPark/src/views/fxPark/intro.vue
* @Description: 植被介绍页
-->
<template>
<div class="intro-page">
<div></div>
<div style="margin: 1rem;">
<div>
<img :src="INTRO_IMG[revision]" style="width: 100%; pointer-events:none;">
</div>
<!-- <div style="margin: 1rem;">
<div style="margin-bottom: 1rem;">
<span style="font-size: 1.25rem;">{{ tree_data?.name }}</span>
<span style="font-size: 0.85rem;">{{ tree_data?.nickname }}</span>
...
...
@@ -35,7 +37,7 @@
<div class="light-up-text">恭喜您植被已被点亮</div>
<div style="margin: 1rem 1rem 2rem 1rem; color: white; text-align: center;">
<div @click="goToPoster" style="background-color: #F68015; display: inline-block; padding: 0.7rem 2rem; border-radius: 1.5rem;">生成海报</div>
</div>
</div>
-->
</div>
</template>
...
...
@@ -55,32 +57,42 @@ useTitle($route.meta.title);
const revision = $route.query.revision; // revision 植被编号
const tree_data = ref({});
// TODO: 等待正式数据
const INTRO_IMG = { // 植被介绍七牛图片地址映射
'1': 'https://cdn.ipadbiz.cn/xfPark/intro/intro-1.1713086546.jpg',
'2': 'https://cdn.ipadbiz.cn/xfPark/intro/intro-1.1713086546.jpg',
'3': 'https://cdn.ipadbiz.cn/xfPark/intro/intro-1.1713086546.jpg',
'4': 'https://cdn.ipadbiz.cn/xfPark/intro/intro-1.1713086546.jpg',
'5': 'https://cdn.ipadbiz.cn/xfPark/intro/intro-1.1713086546.jpg',
'6': 'https://cdn.ipadbiz.cn/xfPark/intro/intro-1.1713086546.jpg',
}
onMounted(async () => {
const { code, data } = await getTreeAPI();
if (code) {
let index = data.findIndex(item => item.revision == revision); // 植被信息index
tree_data.value = data[index]; // 当前植被信息
// 植被介绍样式
nextTick(() => {
$('.tree-intro p, .tree-mission-note p').css({
'lineHeight': '1.8',
'marginBottom': '0.5rem'
});
})
}
//
const { code, data } = await getTreeAPI();
//
if (code) {
//
let index = data.findIndex(item => item.revision == revision); // 植被信息index
//
tree_data.value = data[index]; // 当前植被信息
//
//
植被介绍样式
//
nextTick(() => {
//
$('.tree-intro p, .tree-mission-note p').css({
//
'lineHeight': '1.8',
//
'marginBottom': '0.5rem'
//
});
//
})
//
}
// 进入页面激活
const activeTree = await activeTreeAPI({ tree_revision: revision });
// 埋点
const saveEvent = await saveEventAPI({ event_code: 'open_page', event_value: 'tree' });
});
const formattedIntro = computed(() => { // 植被介绍样式 格式化-处理空格
return tree_data?.value?.intro?.split("\n").map((line) => `<p>${line}</p>`).join("");
});
//
const formattedIntro = computed(() => { // 植被介绍样式 格式化-处理空格
//
return tree_data?.value?.intro?.split("\n").map((line) => `<p>${line}</p>`).join("");
//
});
const formattedNote = computed(() => { // 植被任务卡note 格式化-处理空格
return tree_data?.value?.mission_note?.split("\n").map((line) => `<p>${line}</p>`).join("");
});
//
const formattedNote = computed(() => { // 植被任务卡note 格式化-处理空格
//
return tree_data?.value?.mission_note?.split("\n").map((line) => `<p>${line}</p>`).join("");
//
});
const goToPoster = () => { // 去海报页
$router.push({
...
...
Please
register
or
login
to post a comment