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 8b47ae89
authored
Sep 01, 2023
by
前端
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'v3.16.0' into 'master'
V3.16.0 See merge request
!15
2 parents
72623d22
e12ac8fb
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
83 additions
and
41 deletions
src/main.js
src/mixins/draw.js
src/setup/qiankun.js
src/utils/drawing.js
src/views/activityLink/components/MarketingGift.vue
src/views/activityLink/components/PhoneView.vue
src/views/activityLink/components/Process.vue
src/views/activityLink/components/model/model_3/equity/index.vue
src/views/activityLink/components/model/model_4/equity/index.vue
src/main.js
View file @
8b47ae8
...
...
@@ -20,12 +20,6 @@ Vue.prototype.size = 'small'
Vue
.
prototype
.
defaultLabelWidth
=
'154px'
Vue
.
prototype
.
staticImgUrl
=
'https://img01.glsx.com.cn/weapp/resource/saas/scrm/activity/'
Vue
.
prototype
.
$vip
=
'https://img01.glsx.com.cn/weapp/resource/miniprogram/expandedGold/vip.png'
try
{
const
loginpath
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'SCRM_BASE_SESSION'
))?.
loginpath
if
(
loginpath
===
'/oss'
)
Vue
.
prototype
.
loginpath
=
true
}
catch
(
e
)
{
console
.
log
(
e
)
}
start
()
export
{
bootstrap
,
mount
,
unmount
}
from
'@/setup'
export
const
http
=
params
=>
Vue
.
prototype
.
$http
(
params
)
...
...
src/mixins/draw.js
View file @
8b47ae8
...
...
@@ -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-0
7-20 17:40:13
* @LastEditTime: 2023-0
8-30 18:11:11
* @FilePath: \scrm-micro-home\src\mixins\gpt.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
...
...
@@ -119,8 +119,8 @@ export default {
imageList
.
push
({
...
info
.
logoInfo
,
url
:
info
.
merchantLogo
})
}
const
textList
=
[
{
x
:
style1
.
x
,
y
:
style1
.
y
,
fontSize
:
style1
.
size
,
width
:
style1
.
width
,
text
:
style1
.
content
,
color
:
style1
.
color
,
font
:
style1
.
font
},
{
x
:
style2
.
x
,
y
:
style2
.
y
,
fontSize
:
style2
.
size
,
width
:
style2
.
width
,
text
:
style2
.
content
,
color
:
style2
.
color
,
font
:
style2
.
font
}
{
x
:
style1
.
x
,
y
:
style1
.
y
,
fontSize
:
style1
.
size
,
width
:
style1
.
width
,
text
:
style1
.
content
,
color
:
style1
.
color
,
font
:
style1
.
font
,
shadow
:
style1
.
shadow
},
{
x
:
style2
.
x
,
y
:
style2
.
y
,
fontSize
:
style2
.
size
,
width
:
style2
.
width
,
text
:
style2
.
content
,
color
:
style2
.
color
,
font
:
style2
.
font
,
shadow
:
style2
.
shadow
}
]
console
.
log
(
imageList
,
textList
)
const
canvasBase64
=
await
drawfun
.
begin
({
...
...
src/setup/qiankun.js
View file @
8b47ae8
...
...
@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-12-13 09:23:57
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-0
7-19 17:32:17
* @LastEditTime: 2023-0
8-24 10:20:34
* @FilePath: \scrm-micro-link\src\setup\qiankun.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
...
...
@@ -24,6 +24,12 @@ export async function bootstrap({ history, common, messenger, globalState }) {
Vue
.
prototype
.
$history
=
history
Vue
.
prototype
.
$messenger
=
messenger
Vue
.
prototype
.
$globalState
=
globalState
try
{
Vue
.
prototype
.
loginpath
=
globalState
.
session
.
loginList
[
0
].
products
[
0
].
productName
.
includes
(
'运营版'
)
}
catch
(
error
)
{
console
.
log
(
error
)
}
Vue
.
prototype
.
$common
=
common
Vue
.
prototype
.
$message
=
message
Vue
.
prototype
.
$messageBox
=
messageBox
...
...
src/utils/drawing.js
View file @
8b47ae8
...
...
@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-05-17 16:07:55
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-0
7-16 15:11:28
* @LastEditTime: 2023-0
8-30 18:18:33
* @FilePath: \scrm-micro-home\src\utils\drawing.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
...
...
@@ -43,10 +43,17 @@ class Drawing {
return
this
.
pixelRatio
*
val
}
drawText
(
textParams
)
{
let
{
fontSize
,
color
,
text
,
x
,
y
,
bold
,
font
}
=
textParams
let
{
fontSize
,
color
,
text
,
x
,
y
,
bold
,
font
,
shadow
}
=
textParams
fontSize
=
this
.
toRpx
(
fontSize
)
x
=
this
.
toRpx
(
x
)
y
=
this
.
toRpx
(
y
)
if
(
shadow
)
{
const
arr
=
shadow
.
split
(
' '
).
filter
(
item
=>
item
)
this
.
ctx
.
shadowOffsetX
=
this
.
toRpx
(
arr
[
0
].
match
(
/
\d
+/
)[
0
])
//在X轴偏移值
this
.
ctx
.
shadowOffsetY
=
this
.
toRpx
(
arr
[
1
].
match
(
/
\d
+/
)[
0
])
//在Y轴偏移值
this
.
ctx
.
shadowBlur
=
this
.
toRpx
(
arr
[
2
].
match
(
/
\d
+/
)[
0
])
//阴影模糊程度
this
.
ctx
.
shadowColor
=
arr
[
3
]
//必填
}
this
.
ctx
.
font
=
`
${
bold
?
'bold '
:
''
}${
fontSize
}
px
${
font
}
`
this
.
ctx
.
fillStyle
=
color
this
.
ctx
.
textAlign
=
'center'
...
...
src/views/activityLink/components/MarketingGift.vue
View file @
8b47ae8
...
...
@@ -9,7 +9,9 @@
<el-radio
:label=
"item.id"
v-for=
"item in giftList"
:key=
"item.id"
>
{{
item
.
name
}}
(成本:
{{
item
.
totalEquityPrice
||
0
}}
)
</el-radio>
</el-radio-group>
<div
class=
"choseRow"
>
<div
class=
"choseItem"
:class=
"
{ active: currentIndex == index + 1 }" v-for="(item, index) in tabList" :key="index" @click="tabClick(index + 1)">
{{
item
.
label
}}
</div>
<div
class=
"choseItem"
:class=
"
{ active: currentIndex == index + 1 }" v-for="(item, index) in tabList" :key="index" @click="tabClick(index + 1)">
{{
item
.
label
}}
</div>
</div>
<div
class=
"gift-table"
>
<div
class=
"goods-panel"
>
...
...
@@ -26,10 +28,12 @@
</div>
<div
v-show=
"currentIndex == 2"
>
<div
class=
"select-tab"
>
<div
class=
"tab-item"
:class=
"{ active: goodsIndex == item.type }"
v-for=
"(item, index) in goodsTabList"
:key=
"index"
@
click=
"goodsIndex = item.type"
>
{{ item.label }}
</div>
<div
class=
"tab-item"
:class=
"{ active: goodsIndex == item.type }"
v-for=
"(item, index) in goodsTabList"
:key=
"index"
@
click=
"goodsIndex = item.type"
>
{{ item.label }}
</div>
<div
class=
"tab-border"
:style=
"{ left: (goodsIndex - 1) * 61 + 2 + 'px' }"
></div>
</div>
<glsx-combi-form
:isEdit=
"false"
labelWidth=
"70px"
class=
"p-16"
style=
"padding-bottom: 0px
;
"
ref=
"showSearch"
:formObj=
"searchForm[goodsIndex - 1]"
:formData=
"searchFormData"
>
<glsx-combi-form
:isEdit=
"false"
labelWidth=
"70px"
class=
"p-16"
style=
"padding-bottom: 0px"
ref=
"showSearch"
:formObj=
"searchForm[goodsIndex - 1]"
:formData=
"searchFormData"
>
<span
slot=
"footer"
>
<el-button
:size=
"size"
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
<el-button
:size=
"size"
@
click=
"handleReset"
>
重置
</el-button>
...
...
@@ -41,8 +45,15 @@
</div>
<div
v-show=
"currentIndex == 3"
>
<div
class=
"service-tab"
>
<div
class=
"tab-item"
:class=
"{ active: serviceIndex == item.type }"
v-for=
"(item, index) in serviceTabList"
:key=
"index"
@
click=
"serviceIndex = item.type"
>
{{ item.label }}
</div>
<div
class=
"tab-border"
:style=
"{ left: (serviceIndex == 7 ? 0 : serviceIndex - 1) * 88 + 2 + 'px' }"
></div>
<div
class=
"tab-item"
:class=
"{ active: serviceIndex == item.type }"
v-for=
"(item, index) in serviceTabList"
:key=
"index"
@
click=
"serviceIndex = item.type"
>
{{ item.label }}
</div>
<div
class=
"tab-border"
:style=
"{
left: (serviceIndex == 7 ? 0 : serviceIndex - 1) * 88 + 2 + 'px'
}"
></div>
<div
class=
"service-tip"
>
(仅支持引用无限库存券)
</div>
<div
class=
"tab-right"
>
<div
class=
"refresh-btn"
@
click=
"getList"
>
...
...
@@ -319,13 +330,22 @@ export default {
for
(
let
i
=
0
;
i
<
selectedCarList
.
length
;
i
++
)
{
this
.
totalPrice
=
this
.
totalPrice
+
parseFloat
(
selectedCarList
[
i
].
packageAmount
||
0
)
}
this
.
setPackage
(
Object
.
assign
({},
{
selectedServiceList
:
this
.
$common
.
utils
.
deepClone
(
this
.
selectedServiceList
),
selectedCarList
:
this
.
$common
.
utils
.
deepClone
(
selectedCarList
),
selectedGoodsList
:
this
.
$common
.
utils
.
deepClone
(
this
.
selectedGoodsList
)
}))
this
.
setPackage
(
Object
.
assign
(
{},
{
selectedServiceList
:
this
.
$common
.
utils
.
deepClone
(
this
.
selectedServiceList
),
selectedCarList
:
this
.
$common
.
utils
.
deepClone
(
selectedCarList
),
selectedGoodsList
:
this
.
$common
.
utils
.
deepClone
(
this
.
selectedGoodsList
)
}
)
)
const
selectedGoodsList
=
[...
this
.
selectedGoodsList
,
...
this
.
selectedServiceList
].
map
(
item
=>
{
console
.
log
(
item
)
return
{
couponId
:
item
.
id
,
couponAmount
:
1
,
couponAnticipatedCost
:
item
.
denomination
couponAnticipatedCost
:
item
.
denomination
||
item
.
anticipatedCost
}
})
const
serviceMerchantPackageConfigDTOS
=
selectedCarList
.
map
(
i
=>
{
...
...
@@ -528,7 +548,10 @@ export default {
async
getCarList
()
{
let
equities
=
{}
if
(
this
.
isInit
)
{
let
res
=
await
this
.
$apis
.
giftBag
.
packageDefault
({
merchantId
:
this
.
merchantId
,
activitySubscribe
:
this
.
subscribe
})
let
res
=
await
this
.
$apis
.
giftBag
.
packageDefault
({
merchantId
:
this
.
merchantId
,
activitySubscribe
:
this
.
subscribe
})
equities
=
JSON
.
parse
(
res
.
equities
)
}
var
params
=
{
...
...
src/views/activityLink/components/PhoneView.vue
View file @
8b47ae8
...
...
@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2023-05-15 15:08:32
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-08-
09 15:34:15
* @LastEditTime: 2023-08-
31 11:00:31
* @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
-->
...
...
@@ -28,6 +28,7 @@
:style=
"
{
'font-size': item.size + 'px',
'font-family': item.font,
'text-shadow': item.shadow,
color: item.color
}"
class="img_cl"
...
...
@@ -464,27 +465,38 @@ export default {
for
(
const
style
of
styles
)
{
style
.
x
=
parseInt
(
style
.
x
*
RATIO
)
style
.
y
=
parseInt
(
style
.
y
*
RATIO
)
style
.
size
=
parseInt
(
style
.
size
*
RATIO
)
style
.
size
=
+
(
style
.
size
*
RATIO
.
toFixed
(
2
)
)
style
.
width
=
parseInt
(
style
.
width
*
RATIO
)
}
Object
.
assign
(
this
.
draggableList
[
0
],
{
content
:
this
.
detail
.
marketingTitle
,
...
style1
,
width
:
this
.
detail
.
marketingTitle
.
length
*
(
style1
.
size
+
0.5
),
color
:
style1
.
style
.
color
,
font
:
style1
.
font
,
height
:
'auto'
})
Object
.
assign
(
this
.
draggableList
[
1
],
{
content
:
this
.
detail
.
marketingSubtitle
,
...
style2
,
width
:
this
.
detail
.
marketingSubtitle
.
length
*
(
style2
.
size
+
0.5
),
color
:
style2
.
style
.
color
,
font
:
style2
.
font
,
height
:
'auto'
})
const
fontObj
=
{
jingnanyuanmoti
:
1.1
,
YouSheBiaoTiYuan
:
1.4
}
Object
.
assign
(
this
.
draggableList
[
0
],
{
content
:
this
.
detail
.
marketingTitle
,
...
style1
,
width
:
this
.
detail
.
marketingTitle
.
length
*
(
style1
.
size
*
fontObj
[
style1
.
font
]),
color
:
style1
.
style
.
color
,
font
:
style1
.
font
,
height
:
'auto'
,
shadow
:
style1
.
style
[
'text-shadow'
]
})
Object
.
assign
(
this
.
draggableList
[
1
],
{
content
:
this
.
detail
.
marketingSubtitle
,
...
style2
,
width
:
this
.
detail
.
marketingSubtitle
.
length
*
(
style2
.
size
*
fontObj
[
style2
.
font
]),
color
:
style2
.
style
.
color
,
font
:
style2
.
font
,
height
:
'auto'
,
shadow
:
style2
.
style
[
'text-shadow'
]
})
setTimeout
(()
=>
{
const
textDom
=
document
.
querySelectorAll
(
'.img_cl'
)
textDom
.
forEach
(
item
=>
{
let
fontSize
=
this
.
getPropSize
(
item
,
'font-size'
)
let
height
=
this
.
getPropSize
(
item
,
'height'
)
let
content
=
item
.
textContent
.
trim
()
let
len
=
parseInt
(
content
.
length
)
if
(
height
>
fontSize
+
5
)
{
fontSize
-=
len
}
if
(
content
==
this
.
detail
.
marketingTitle
)
{
Object
.
assign
(
this
.
draggableList
[
0
],
{
size
:
fontSize
,
height
:
'auto'
,
width
:
content
.
length
*
(
fontSize
+
0.5
)
})
}
if
(
content
==
this
.
detail
.
marketingSubtitle
)
{
Object
.
assign
(
this
.
draggableList
[
1
],
{
size
:
fontSize
,
height
:
'auto'
,
width
:
content
.
length
*
(
fontSize
+
0.5
)
})
textDom
.
forEach
(
async
item
=>
{
const
reduceSize
=
()
=>
{
let
fontSize
=
this
.
getPropSize
(
item
,
'font-size'
)
let
height
=
this
.
getPropSize
(
item
,
'height'
)
let
content
=
item
.
textContent
.
trim
()
if
(
height
>
fontSize
+
5
)
{
fontSize
-=
3
}
if
(
content
==
this
.
detail
.
marketingTitle
)
{
Object
.
assign
(
this
.
draggableList
[
0
],
{
size
:
fontSize
,
height
:
'auto'
,
width
:
content
.
length
*
(
fontSize
*
fontObj
[
this
.
draggableList
[
0
].
font
])
})
}
if
(
content
==
this
.
detail
.
marketingSubtitle
)
{
Object
.
assign
(
this
.
draggableList
[
1
],
{
size
:
fontSize
,
height
:
'auto'
,
width
:
content
.
length
*
(
fontSize
*
fontObj
[
this
.
draggableList
[
1
].
font
])
})
}
setTimeout
(()
=>
{
if
(
this
.
getPropSize
(
item
,
'height'
)
>
this
.
getPropSize
(
item
,
'font-size'
)
+
5
)
{
reduceSize
()
}
},
300
)
}
reduceSize
()
})
},
300
)
}
...
...
src/views/activityLink/components/Process.vue
View file @
8b47ae8
...
...
@@ -150,7 +150,7 @@ export default {
for
(
const
style
of
styles
)
{
style
.
x
=
parseInt
(
style
.
x
*
RATIO
)
style
.
y
=
parseInt
(
style
.
y
*
RATIO
)
style
.
size
=
parseInt
(
style
.
size
*
RATIO
)
style
.
size
=
+
(
style
.
size
*
RATIO
.
toFixed
(
2
)
)
style
.
width
=
parseInt
(
style
.
width
*
RATIO
)
}
params
.
titleStyle
=
JSON
.
stringify
(
Object
.
assign
(
titleStyle
,
{
x
:
style1
.
x
,
y
:
style1
.
y
,
size
:
style1
.
size
,
width
:
style1
.
width
}))
...
...
src/views/activityLink/components/model/model_3/equity/index.vue
View file @
8b47ae8
...
...
@@ -8,7 +8,7 @@
<div
class=
"service-panel-box"
>
<div
class=
"service-item"
v-for=
"(item, index) in serviceList"
:key=
"index"
>
<div
class=
"service-time"
>
1
{{
item
.
packageAmount
}}
<span>
元
</span>
</div>
<div
class=
"service-title"
>
{{
item
.
packageName
||
item
.
serviceName
}}
</div>
...
...
src/views/activityLink/components/model/model_4/equity/index.vue
View file @
8b47ae8
...
...
@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-07-08 09:40:45
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-08-
09 15:26:22
* @LastEditTime: 2023-08-
30 16:51:19
* @FilePath: \scrm-micro-link\src\views\activityLink\components\model\model_4\equity\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
...
...
@@ -12,7 +12,7 @@
<img
class=
"header-panel"
src=
"https://img02.glsx.com.cn/weapp/resource/miniprogram/expandedGold/model_8/rob.png"
/>
<div
class=
"service-item"
v-for=
"(item, index) in serviceList"
:key=
"index"
>
<div
class=
"service-time"
>
1
{{
item
.
packageAmount
}}
<sapn>
元
</sapn>
</div>
<div
class=
"service-title"
>
{{
item
.
packageName
||
item
.
serviceName
}}
</div>
...
...
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