Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
store-assistant
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 25c46a16
authored
Oct 25, 2022
by
前端
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'zq_dev_3.0' into 'v3.0'
画头部 See merge request
!76
2 parents
ef4d55e1
d624bdde
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
7 deletions
pages/checkProduct/checkProduct.js
pages/checkProduct/checkProduct.js
View file @
25c46a1
...
...
@@ -73,7 +73,7 @@ Page({
},
createImg
(){
if
(
this
.
data
.
isShow
&&
this
.
data
.
fromLocal
==
1
){
let
{
actNum
,
activeNavIdx
}
=
this
.
data
;
let
{
actNum
,
activeNavIdx
,
senceData
}
=
this
.
data
;
let
img
=
`
${
IMGURL
}
scene/longpic
${
actNum
+
1
}
.png`
wx
.
showLoading
({
title
:
'海报生成中...'
,
...
...
@@ -83,8 +83,8 @@ Page({
success
:(
res
)
=>
{
let
imgW
=
res
.
width
/
4
,
imgH
=
res
.
height
/
4
;
let
drawFun
=
new
Draw
({
width
:
imgW
,
height
:
imgH
width
:
imgW
,
height
:
imgH
+
imgW
/
4
+
22
});
// let scene = {
// actNum,
...
...
@@ -96,23 +96,62 @@ Page({
}
let
qrcodeH
=
actNum
==
3
?
68
:
100
commonApi
.
createQrcode
(
params
).
then
(
response
=>
{
wx
.
showLoading
({
title
:
'海报生成中...'
,
})
if
(
response
?.
data
){
let
qrcode
=
response
?.
data
this
.
setData
({
imgH
:
(
imgH
/
imgW
)
*
450
})
let
arr
=
[
0
,
0
,
0
,
0
]
console
.
log
(
actNum
,
activeNavIdx
,
senceData
)
let
textList
=
[
{
x
:
imgW
/
4
+
22
,
y
:
15
,
text
:
senceData
[
actNum
].
productList
[
activeNavIdx
].
proName
,
textBaseline
:
'top'
},
{
x
:
imgW
/
4
+
22
,
y
:
(
imgW
/
4
+
12
)
/
2
,
color
:
'#7A8299'
,
text
:
`
${
senceData
[
actNum
].
productList
[
activeNavIdx
].
varType
==
1
?
'三年售后存量数'
:
'新车销量'
}
${
senceData
[
actNum
].
productList
[
activeNavIdx
].
sale
}
`
,
},
{
x
:
imgW
/
4
+
22
,
y
:
imgW
/
4
,
text
:
'预估收益'
,
maxWidth
:
50
,
color
:
'#7A8299'
},
{
x
:
imgW
/
4
+
77
,
y
:
imgW
/
4
,
text
:
`¥
${
senceData
[
actNum
].
productList
[
activeNavIdx
].
profit
}
`
,
color
:
'#F35251'
,
fontSize
:
14
,
fontWeight
:
500
}
]
let
imgList
=
[
{
x
:
10
,
y
:
10
,
width
:
imgW
/
4
,
height
:
imgW
/
4
+
2
,
url
:
`
${
IMGURL
}
prod/
${
senceData
[
actNum
].
productList
[
activeNavIdx
].
img
}
.png`
,
},
{
x
:
0
,
y
:
0
,
y
:
imgW
/
4
+
22
,
width
:
imgW
,
height
:
imgH
,
url
:
img
,
},
{
x
:
imgW
-
qrcodeH
,
y
:
imgH
-
arr
[
actNum
]
-
qrcodeH
,
x
:
imgW
-
qrcodeH
-
5
,
y
:
imgH
+
imgW
/
4
+
17
-
qrcodeH
,
width
:
qrcodeH
,
height
:
qrcodeH
,
url
:
qrcode
,
//二维码
...
...
@@ -120,6 +159,7 @@ Page({
];
drawFun
.
begin
({
imageList
:
imgList
,
textList
}).
then
(
resp
=>
{
this
.
setData
({
posterUrl
:
resp
.
path
,
...
...
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