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
37680c1d
Commit
37680c1d
authored
Aug 28, 2024
by
郑晓
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat_group_chore_0828' into 'master'
feat(custom): See merge request
!5
parents
6ec18700
834628c5
Hide 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 @
37680c1d
...
@@ -77,9 +77,6 @@ export default {
...
@@ -77,9 +77,6 @@ export default {
return
new
Promise
(
async
(
resolve
,
reject
)
=>
{
return
new
Promise
(
async
(
resolve
,
reject
)
=>
{
try
{
try
{
const
ctx
=
uni
.
createCanvasContext
(
'shareCanvas'
,
this
)
const
ctx
=
uni
.
createCanvasContext
(
'shareCanvas'
,
this
)
// 绘制背景图
// ctx.fillStyle = '#FF3E3E'
// ctx.fillRect(0, 0, 211, 170)
try
{
try
{
const
{
path
}
=
await
this
.
getImge
(
info
.
cardBg
)
const
{
path
}
=
await
this
.
getImge
(
info
.
cardBg
)
ctx
.
drawImage
(
path
,
0
,
0
,
211
,
170
)
ctx
.
drawImage
(
path
,
0
,
0
,
211
,
170
)
...
@@ -88,11 +85,9 @@ export default {
...
@@ -88,11 +85,9 @@ export default {
}
}
// 商品模块
// 商品模块
ctx
.
save
()
this
.
setRadius
(
ctx
,
4
,
8
,
62
,
195
,
99
)
this
.
setRadius
(
ctx
,
4
,
8
,
62
,
195
,
99
)
ctx
.
fillStyle
=
'#ffffff'
ctx
.
fillStyle
=
'#ffffff'
ctx
.
fill
()
ctx
.
fill
()
ctx
.
restore
()
// 商品图
// 商品图
ctx
.
save
()
ctx
.
save
()
...
@@ -113,21 +108,17 @@ export default {
...
@@ -113,21 +108,17 @@ export default {
}
}
ctx
.
restore
()
ctx
.
restore
()
ctx
.
save
()
this
.
setRadius
(
ctx
,
2
,
15
,
69
,
31
,
14
)
this
.
setRadius
(
ctx
,
2
,
15
,
69
,
31
,
14
)
ctx
.
fillStyle
=
'#FF644D'
ctx
.
fillStyle
=
'#FF644D'
ctx
.
fill
()
ctx
.
fill
()
ctx
.
restore
()
ctx
.
font
=
'9px sans-serif'
ctx
.
font
=
'9px sans-serif'
ctx
.
textAlign
=
'left'
ctx
.
textAlign
=
'left'
ctx
.
fillStyle
=
'#ffffff'
ctx
.
fillStyle
=
'#ffffff'
ctx
.
fillText
(
`
${
info
.
requiredNum
}
人团`
,
19
,
80
)
ctx
.
fillText
(
`
${
info
.
requiredNum
}
人团`
,
19
,
80
)
ctx
.
restore
()
// 商品标题
// 商品标题
this
.
drawText
(
ctx
,
info
.
title
,
92
,
82
,
18
,
106
,
12
)
this
.
drawText
(
ctx
,
info
.
title
,
92
,
82
,
18
,
106
,
12
)
ctx
.
restore
()
// 已学人数
// 已学人数
ctx
.
font
=
'10px sans-serif'
ctx
.
font
=
'10px sans-serif'
...
@@ -162,7 +153,6 @@ export default {
...
@@ -162,7 +153,6 @@ export default {
},
},
fail
:
function
(
error
)
{
fail
:
function
(
error
)
{
console
.
log
(
'fail----fail'
,
error
)
console
.
log
(
'fail----fail'
,
error
)
// TODO
return
reject
(
error
)
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