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-22 10:53:30 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d45215fd6a3516faa0187eb1335dc2dbf8fd52d8
d45215fd
1 parent
2bd19192
fix 新增海报上二维码
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
2 deletions
src/assets/images/poster/public/home_qrcode.1.png
src/assets/images/poster/public/home_qrcode.png
src/views/fxPark/poster.vue
src/assets/images/poster/public/home_qrcode.1.png
0 → 100644
View file @
d45215f
7.02 KB
src/assets/images/poster/public/home_qrcode.png
0 → 100644
View file @
d45215f
6.16 KB
src/views/fxPark/poster.vue
View file @
d45215f
...
...
@@ -10,14 +10,20 @@
</div>
<div v-if="flag" style="border: 1.5px solid #9C8882; box-shadow: 8px 8px 8px 0px rgba(156,136,130,1); height: 100%;">
<div ref="canvasRef" class="poster-contain" style="">
<div v-if="tree_data?.name" class="poster-text-boxer">
<
!-- <
div v-if="tree_data?.name" class="poster-text-boxer">
<div class="poster-text">
<div class="name">{{ tree_data?.name }}</div>
<div class="nickname">{{ tree_data?.nickname }}</div>
</div>
</div> -->
<div class="poster-img-boxer">
<div :class="'poster-img' + tree_data?.revision" :style="{ backgroundImage: `url(https://cdn.ipadbiz.cn/xfPark/post/public/title/${tree_data?.revision}.png)` }"></div>
</div>
<div style="position: relative;">
<img :src="imgSrc">
<div style="position: absolute; left: 5px; bottom: 5px;">
<img src="https://cdn.ipadbiz.cn/xfPark/post/public/home_qrcode.1.png" style=" width: 2.5rem; height: 2.5rem;">
</div>
<div style="position: absolute; right: 5px; bottom: 5px;">
<img src="https://cdn.ipadbiz.cn/xfPark/post/public/logo.1713241695.png" style=" width: 4rem; height: 5rem;">
</div>
...
...
@@ -187,13 +193,14 @@ const createImage = () => {
// canvas: canvas,
useCORS: true,//配置允许跨域
scale: DPR(),
// scale: 10,
// windowWidth: document.body.scrollWidth,
// windowHeight: document.body.scrollHeight,
// x: 0,
// y: window.pageYOffset,
// allowTaint: true,
// background: "#d21f2c", // 一定要添加背景颜色,否则出来的图片,背景全部都是透明的
// dpi: 3
00 // 处理模糊问题
dpi: 5
00 // 处理模糊问题
};
// console.log("获取指定的宽高", width, height, canvas);
html2canvas(canvasDom, options)
...
...
@@ -340,6 +347,54 @@ const afterRead = async (res) => {
}
}
}
.poster-img-boxer {
z-index: 10;
position: absolute;
top: 3rem;
left: 2rem;
.poster-img1 {
position: relative;
background-repeat: no-repeat;
background-size: contain;
width: 4.5rem;
height: 6rem;
}
.poster-img2 {
position: relative;
background-repeat: no-repeat;
background-size: contain;
width: 4.5rem;
height: 6rem;
}
.poster-img3 {
position: relative;
background-repeat: no-repeat;
background-size: contain;
width: 4.5rem;
height: 6rem;
}
.poster-img4 {
position: relative;
background-repeat: no-repeat;
background-size: contain;
width: 6rem;
height: 9rem;
}
.poster-img5 {
position: relative;
background-repeat: no-repeat;
background-size: contain;
width: 8rem;
height: 13rem;
}
.poster-img6 {
position: relative;
background-repeat: no-repeat;
background-size: contain;
width: 4.5rem;
height: 6rem;
}
}
img {
width: 100%;
height: 70vh;
...
...
Please
register
or
login
to post a comment