Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
GaoQuYingJiH5-ASD
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xinzhedeai
GaoQuYingJiH5-ASD
Commits
1e204885
Commit
1e204885
authored
Apr 16, 2025
by
xinzhedeai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商户详情二维码调整
parent
be175b2e
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
2 deletions
+12
-2
erweimabg.png
image/code/erweimabg.png
+0
-0
erweimabgold.png
image/code/erweimabgold.png
+0
-0
_shanghu_detail.html
src/_shanghu_detail.html
+5
-1
_shanghu_detail.js
src/_shanghu_detail.js
+7
-1
No files found.
image/code/erweimabg.png
View replaced file @
be175b2e
View file @
1e204885
80.7 KB
|
W:
|
H:
527 KB
|
W:
|
H:
2-up
Swipe
Onion skin
image/code/erweimabgold.png
0 → 100644
View file @
1e204885
80.7 KB
src/_shanghu_detail.html
View file @
1e204885
...
@@ -46,7 +46,11 @@
...
@@ -46,7 +46,11 @@
</div>
</div>
<div
class=
"container"
>
<div
class=
"container"
>
<div
class=
"qr-card"
>
<div
class=
"qr-card"
>
<canvas
id=
"mainCanvas"
width=
"300"
height=
"400"
></canvas>
<!-- <canvas id="mainCanvas" width="3000" height="4000"></canvas> -->
<!-- 基础调试确认版 -->
<canvas
id=
"mainCanvas"
width=
"420"
height=
"594"
></canvas>
<!-- 不晃动rev -->
<!-- <canvas id="mainCanvas" width="375" height="530"></canvas> -->
</div>
</div>
<button
class=
"save-btn"
onclick=
"saveCanvas()"
v-if=
"canvasReady"
>
保存二维码
</button>
<button
class=
"save-btn"
onclick=
"saveCanvas()"
v-if=
"canvasReady"
>
保存二维码
</button>
</div>
</div>
...
...
src/_shanghu_detail.js
View file @
1e204885
...
@@ -2,6 +2,12 @@ var VUE = null
...
@@ -2,6 +2,12 @@ var VUE = null
window
.
addEventListener
(
'
load
'
,
function
()
{
window
.
addEventListener
(
'
load
'
,
function
()
{
const
canvas
=
document
.
getElementById
(
'
mainCanvas
'
)
const
canvas
=
document
.
getElementById
(
'
mainCanvas
'
)
const
ctx
=
canvas
.
getContext
(
'
2d
'
)
const
ctx
=
canvas
.
getContext
(
'
2d
'
)
ctx
.
imageSmoothingEnabled
=
true
;
ctx
.
imageSmoothingQuality
=
'
high
'
;
ctx
.
fillStyle
=
'
#1890ff
'
;
// 或其他所需颜色
ctx
.
fillRect
(
0
,
0
,
canvas
.
width
,
canvas
.
height
);
// 在原有Vue实例中添加
// 在原有Vue实例中添加
VUE
=
new
Vue
({
VUE
=
new
Vue
({
el
:
'
#app
'
,
el
:
'
#app
'
,
...
@@ -158,7 +164,7 @@ window.addEventListener('load', function () {
...
@@ -158,7 +164,7 @@ window.addEventListener('load', function () {
// 绘制前景图标
// 绘制前景图标
const
fgIconSize
=
180
// 假设前景图标显示的尺寸
const
fgIconSize
=
180
// 假设前景图标显示的尺寸
const
fgX
=
(
canvasWidth
-
fgIconSize
)
/
2
const
fgX
=
(
canvasWidth
-
fgIconSize
)
/
2
const
fgY
=
(
canvasHeight
-
fgIconSize
)
/
2
const
fgY
=
(
(
canvasHeight
-
fgIconSize
)
/
2
)
+
15
// 绘制二维码
// 绘制二维码
ctx
.
drawImage
(
img4erweima
,
fgX
,
fgY
,
fgIconSize
,
fgIconSize
)
ctx
.
drawImage
(
img4erweima
,
fgX
,
fgY
,
fgIconSize
,
fgIconSize
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment