Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
ydl-group-course
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
黄志
ydl-group-course
Commits
834628c5
Commit
834628c5
authored
Aug 28, 2024
by
zhengxiao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(custom):
优化canvas
parent
6ec18700
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
10 deletions
+0
-10
ShareCanvas.vue
src/components/ShareCanvas.vue
+0
-10
No files found.
src/components/ShareCanvas.vue
View file @
834628c5
...
...
@@ -77,9 +77,6 @@ export default {
return
new
Promise
(
async
(
resolve
,
reject
)
=>
{
try
{
const
ctx
=
uni
.
createCanvasContext
(
'shareCanvas'
,
this
)
// 绘制背景图
// ctx.fillStyle = '#FF3E3E'
// ctx.fillRect(0, 0, 211, 170)
try
{
const
{
path
}
=
await
this
.
getImge
(
info
.
cardBg
)
ctx
.
drawImage
(
path
,
0
,
0
,
211
,
170
)
...
...
@@ -88,11 +85,9 @@ export default {
}
// 商品模块
ctx
.
save
()
this
.
setRadius
(
ctx
,
4
,
8
,
62
,
195
,
99
)
ctx
.
fillStyle
=
'#ffffff'
ctx
.
fill
()
ctx
.
restore
()
// 商品图
ctx
.
save
()
...
...
@@ -113,21 +108,17 @@ export default {
}
ctx
.
restore
()
ctx
.
save
()
this
.
setRadius
(
ctx
,
2
,
15
,
69
,
31
,
14
)
ctx
.
fillStyle
=
'#FF644D'
ctx
.
fill
()
ctx
.
restore
()
ctx
.
font
=
'9px sans-serif'
ctx
.
textAlign
=
'left'
ctx
.
fillStyle
=
'#ffffff'
ctx
.
fillText
(
`
${
info
.
requiredNum
}
人团`
,
19
,
80
)
ctx
.
restore
()
// 商品标题
this
.
drawText
(
ctx
,
info
.
title
,
92
,
82
,
18
,
106
,
12
)
ctx
.
restore
()
// 已学人数
ctx
.
font
=
'10px sans-serif'
...
...
@@ -162,7 +153,6 @@ export default {
},
fail
:
function
(
error
)
{
console
.
log
(
'fail----fail'
,
error
)
// TODO
return
reject
(
error
)
},
},
...
...
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