Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
scrm-wx-merchant-activity
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit c6f9ca33
authored
Aug 15, 2022
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交代码
1 parent
b3292252
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
src/views/crowdfunding/components/createOrderImg.vue
src/views/crowdfunding/components/createOrderImg.vue
View file @
c6f9ca3
...
@@ -62,7 +62,8 @@ export default {
...
@@ -62,7 +62,8 @@ export default {
carText
=
''
,
carText
=
''
,
labelList
=
[
'姓名:'
,
'手机:'
],
labelList
=
[
'姓名:'
,
'手机:'
],
spacing
=
0
,
spacing
=
0
,
textYList
=
[]
textYList
=
[],
labelEndX
=
80
const
draw
=
new
Draw
(
this
,
{
const
draw
=
new
Draw
(
this
,
{
width
:
canvasWidth
,
width
:
canvasWidth
,
height
:
canvasHeight
height
:
canvasHeight
...
@@ -82,19 +83,19 @@ export default {
...
@@ -82,19 +83,19 @@ export default {
}
}
labelList
=
[...
labelList
,
'商品名称:'
,
'支付时间:'
]
labelList
=
[...
labelList
,
'商品名称:'
,
'支付时间:'
]
valueList
=
[...
valueList
,
goodsName
,
new
Date
(
createdDate
).
format
(
'yyyy年M月d日 hh:mm:ss'
)]
valueList
=
[...
valueList
,
goodsName
,
new
Date
(
createdDate
).
format
(
'yyyy年M月d日 hh:mm:ss'
)]
if
(
formContentFirst
)
{
//
if (formContentFirst) {
labelList
.
push
(
formDescribeFirst
)
//
labelList.push(formDescribeFirst)
valueList
.
push
(
formContentFirst
)
//
valueList.push(formContentFirst)
}
//
}
if
(
formContentSecond
)
{
//
if (formContentSecond) {
labelList
.
push
(
formDescribeSecond
)
//
labelList.push(formDescribeSecond)
valueList
.
push
(
formContentSecond
)
//
valueList.push(formContentSecond)
}
//
}
labelList
.
push
(
'支付定金'
)
labelList
.
push
(
'支付定金'
)
valueList
.
push
(
`
${
payPrice
}
元`
)
valueList
.
push
(
`
${
payPrice
}
元`
)
labelList
.
map
((
e
,
index
)
=>
{
labelList
.
map
((
e
,
index
)
=>
{
if
(
e
==
'商品名称:'
&&
draw
.
getTextWidth
(
carText
,
fontSize
)
+
valueX
>
valueEndX
)
spacing
=
24
if
(
e
==
'商品名称:'
&&
draw
.
getTextWidth
(
carText
,
fontSize
)
+
valueX
>
valueEndX
)
spacing
=
24
if
(
e
==
formDescribeSecond
&&
draw
.
getTextWidth
(
formContentFirst
,
fontSize
)
+
valueX
>
valueEndX
)
spacing
+=
24
if
(
(
e
==
formDescribeSecond
&&
draw
.
getTextWidth
(
formContentFirst
,
fontSize
)
+
valueX
>
valueEndX
)
||
(
draw
.
getTextWidth
(
formDescribeFirst
,
fontSize
)
+
labelX
>
labelEndX
)
)
spacing
+=
24
if
(
index
==
labelList
.
length
-
1
)
textYList
.
push
(
452
)
if
(
index
==
labelList
.
length
-
1
)
textYList
.
push
(
452
)
else
textYList
.
push
(
index
*
32
+
109
+
spacing
)
else
textYList
.
push
(
index
*
32
+
109
+
spacing
)
})
})
...
@@ -135,7 +136,7 @@ export default {
...
@@ -135,7 +136,7 @@ export default {
if
((
formDescribeFirst
&&
e
===
formDescribeFirst
)
||
(
formDescribeSecond
&&
e
===
formDescribeSecond
))
{
if
((
formDescribeFirst
&&
e
===
formDescribeFirst
)
||
(
formDescribeSecond
&&
e
===
formDescribeSecond
))
{
label
.
lineNum
=
2
label
.
lineNum
=
2
label
.
lineHeight
=
24
label
.
lineHeight
=
24
label
.
width
=
80
label
.
width
=
labelEndX
}
}
}
}
if
(
e
===
'支付定金'
)
{
if
(
e
===
'支付定金'
)
{
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment