Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-link
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 74fe79e3
authored
Jul 20, 2023
by
杨明
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixed
1 parent
c1990310
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
19 deletions
src/mixins/draw.js
src/views/activityLink/components/PhoneView.vue
src/views/activityLink/components/Process.vue
src/mixins/draw.js
View file @
74fe79e
...
...
@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-05-19 13:46:20
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-07-20 1
6:55:50
* @LastEditTime: 2023-07-20 1
7:40:13
* @FilePath: \scrm-micro-home\src\mixins\gpt.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
...
...
@@ -32,11 +32,11 @@ export default {
async
createBig
(
info
,
logoInfo
,
titleStyle
,
subTitleStyle
)
{
console
.
log
(
info
)
this
.
loading
=
true
const
{
backgroundImage
,
detailImage
,
merchantLogo
,
marketingTitle
,
marketingSubtitle
}
=
info
const
{
backgroundImage
,
merchantLogo
,
marketingTitle
,
marketingSubtitle
}
=
info
if
(
!
backgroundImage
)
return
try
{
const
res
=
await
Promise
.
all
([
this
.
getImgInfo
(
backgroundImage
),
this
.
getImgInfo
(
detailImage
),
this
.
getImgInfo
(
merchantLogo
)])
const
h
=
(
res
[
0
].
dh
/
res
[
0
].
dw
)
*
WIDTH
+
(
res
[
1
].
dh
/
res
[
1
].
dw
)
*
WIDTH
const
res
=
await
Promise
.
all
([
this
.
getImgInfo
(
backgroundImage
),
this
.
getImgInfo
(
merchantLogo
)])
const
h
=
(
res
[
0
].
dh
/
res
[
0
].
dw
)
*
WIDTH
this
.
logoInfo
=
{
url
:
merchantLogo
,
...
logoInfo
}
const
drawfun
=
new
Drawing
(
document
.
getElementById
(
'canvasId'
),
{
width
:
WIDTH
,
...
...
@@ -48,17 +48,12 @@ export default {
x
:
0
,
y
:
0
,
width
:
WIDTH
,
height
:
(
res
[
0
].
dh
/
res
[
0
].
dw
)
*
WIDTH
},
{
url
:
detailImage
,
x
:
0
,
y
:
(
res
[
0
].
dh
/
res
[
0
].
dw
)
*
WIDTH
,
width
:
WIDTH
,
height
:
(
res
[
1
].
dh
/
res
[
1
].
dw
)
*
WIDTH
},
{
...
this
.
logoInfo
}
].
filter
(
item
=>
item
.
url
)
height
:
h
}
]
if
(
info
.
merchantLogo
)
{
imageList
.
push
({
...
logoInfo
,
url
:
info
.
merchantLogo
})
}
const
styles
=
[
titleStyle
,
subTitleStyle
]
for
(
const
style
of
styles
)
{
style
.
x
=
parseInt
(
style
.
x
*
RATIO
)
...
...
@@ -92,7 +87,7 @@ export default {
})
})
}
console
.
log
(
title
,
textList
)
console
.
log
(
imageList
,
'imageList'
)
const
canvasBase64
=
await
drawfun
.
begin
({
imageList
,
textList
...
...
src/views/activityLink/components/PhoneView.vue
View file @
74fe79e
...
...
@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2023-05-15 15:08:32
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-07-20 1
6:56:2
9
* @LastEditTime: 2023-07-20 1
7:47:3
9
* @FilePath: \scrm-micro-home\src\views\home\components\Marketing\MarketingRight.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
...
...
@@ -525,6 +525,7 @@ export default {
this
.
isFestival
=
true
}
if
(
this
.
detail
.
merchantLogo
)
this
.
logoInfo
=
await
this
.
getImgWH
(
this
.
detail
.
merchantLogo
)
console
.
log
(
this
.
detail
)
})
},
getPropSize
(
dom
,
prop
)
{
...
...
src/views/activityLink/components/Process.vue
View file @
74fe79e
...
...
@@ -156,8 +156,8 @@ export default {
params
.
titleStyle
=
JSON
.
stringify
(
Object
.
assign
(
titleStyle
,
{
x
:
style1
.
x
,
y
:
style1
.
y
,
size
:
style1
.
size
,
width
:
style1
.
width
}))
params
.
subTitleStyle
=
JSON
.
stringify
(
Object
.
assign
(
subTitleStyle
,
{
x
:
style2
.
x
,
y
:
style2
.
y
,
size
:
style2
.
size
,
width
:
style2
.
width
}))
}
if
(
FESTIVAL
.
includes
(
params
.
codeId
)
&&
this
.
routerInfo
.
addOrEdit
!=
'edit'
)
{
url
=
await
this
.
createBig
(
this
.
$refs
.
viewForm
.
detail
,
this
.
logoInfo
,
JSON
.
parse
(
titleStyle
),
JSON
.
parse
(
subTitleStyle
))
//合并主图、背景图、logo、文字
if
(
FESTIVAL
.
includes
(
params
.
codeId
))
{
url
=
await
this
.
createBig
(
this
.
$refs
.
viewForm
.
detail
,
logoInfo
,
JSON
.
parse
(
titleStyle
),
JSON
.
parse
(
subTitleStyle
))
//合并主图、背景图、logo、文字
}
let
origin
=
'createSuperMarketing'
if
(
params
.
id
&&
this
.
routerInfo
.
addOrEdit
==
'edit'
)
{
...
...
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