Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
marketing
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
marketing-web
marketing
Commits
1ffdfc78
Commit
1ffdfc78
authored
Jul 18, 2022
by
crushh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
udpate: dist
parent
351c2881
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
124 additions
and
22 deletions
+124
-22
commonApi.js
src/service/api/commonApi.js
+3
-0
messageApi.js
src/service/api/messageApi.js
+6
-0
addTemp.vue
src/views/message/addTemp.vue
+115
-22
No files found.
src/service/api/commonApi.js
View file @
1ffdfc78
...
@@ -35,3 +35,6 @@ export const getTransferLink = params => requests(GOODS_PREFIX + '/get-transfer-
...
@@ -35,3 +35,6 @@ export const getTransferLink = params => requests(GOODS_PREFIX + '/get-transfer-
// 获取短信签名和剩余条数
// 获取短信签名和剩余条数
export
const
getSign
=
params
=>
requests
(
MARKET_PREFIX
+
'getEnterpriseSetting'
,
params
);
export
const
getSign
=
params
=>
requests
(
MARKET_PREFIX
+
'getEnterpriseSetting'
,
params
);
//企业列表
export
const
getEntepriseList
=
params
=>
requests
(
MARKET_PREFIX
+
'list-qywx-enteprise'
,
params
);
src/service/api/messageApi.js
View file @
1ffdfc78
...
@@ -78,3 +78,9 @@ export const checkEcmSendCount = params => requests(PREFIX + 'check-ecm-send-cou
...
@@ -78,3 +78,9 @@ export const checkEcmSendCount = params => requests(PREFIX + 'check-ecm-send-cou
// 短信群发-删除前查询是否关联活动
// 短信群发-删除前查询是否关联活动
export
const
queryBusiCommonCheck
=
params
=>
requests
(
'/api-plug/query-busi-common-check'
,
params
,
true
,
false
,
'get'
);
export
const
queryBusiCommonCheck
=
params
=>
requests
(
'/api-plug/query-busi-common-check'
,
params
,
true
,
false
,
'get'
);
//引流链接列表
export
const
hmList
=
params
=>
requests
(
PREFIX
+
'/list-hm-link'
,
params
);
//创建引流活码链接
export
const
hmLink
=
params
=>
requests
(
PREFIX
+
'/build-hm-link'
,
params
);
src/views/message/addTemp.vue
View file @
1ffdfc78
...
@@ -116,16 +116,46 @@
...
@@ -116,16 +116,46 @@
<
/el-dialog
>
<
/el-dialog
>
<!--
插入小程序链接
-->
<!--
插入小程序链接
-->
<
el
-
dialog
:
visible
.
sync
=
"transferLink.show"
title
=
"插入小程序链接"
width
=
"878px"
@
closed
=
"onTransferLinkClose"
>
<
el
-
dialog
:
visible
.
sync
=
"transferLink.show"
title
=
"插入小程序链接"
width
=
"878px"
@
closed
=
"onTransferLinkClose"
>
<
div
class
=
"layout--tips"
style
=
"margin:0 0 20px 20px;width:750px;display:inline-block;"
>
<
el
-
form
label
-
width
=
"90px"
>
<
i
class
=
"el-icon-info"
><
/i> 因微信小程序规则调整(2022年4月11日已调整),影响如下。为了准确使用该功能,请仔细阅读该提示:<br /
>
<
el
-
form
-
item
label
=
"链接类型:"
style
=
"margin:0 0 6px 0"
>
1
、链接有效期为永久;
<
br
/>
<
el
-
radio
-
group
v
-
model
=
"linkType"
>
2
、单个小程序每天生成链接数上限为
50
万条,建议使用该方式
触达的用户数小于
50
万
/
天。
<
el
-
radio
:
label
=
"1"
>
小程序链接
<
/el-radio
>
<
/div
>
<
el
-
radio
:
label
=
"2"
>
引流链接
<
/el-radio
>
<
el
-
form
label
-
width
=
"110px"
>
<
/el-radio-group
>
<
el
-
form
-
item
label
=
"链接类型:"
>
<
el
-
button
@
click
=
"selectLink.show = true"
>
{{
selectLink
.
linkData
.
name
||
'设置小程序链接'
}}
<
/el-button
>
<
/el-form-item
>
<
/el-form-item
>
<
div
v
-
if
=
"linkType == 1"
class
=
"mt12"
>
<
div
class
=
"layout--tips"
style
=
"margin:0 0 20px 20px;width:750px;display:inline-block;"
>
<
i
class
=
"el-icon-info"
><
/i> 因微信小程序规则调整(2022年4月11日已调整),影响如下。为了准确使用该功能,请仔细阅读该提示:<br /
>
1
、链接有效期为永久;
<
br
/>
2
、单个小程序每天生成链接数上限为
50
万条,建议使用该方式
触达的用户数小于
50
万
/
天。
<
/div
>
<
el
-
form
-
item
label
=
"选择链接:"
>
<
el
-
button
@
click
=
"selectLink.show = true"
>
{{
selectLink
.
linkData
.
name
||
'设置小程序链接'
}}
<
/el-button
>
<
/el-form-item
>
<
/div
>
<
div
v
-
else
class
=
"mt12"
>
<
div
class
=
"layout--tips"
style
=
"margin:0 0 20px 20px;width:750px;display:inline-block;"
>
<
i
class
=
"el-icon-info"
><
/i>“引流链接”取自【好办后台-活码管理-引流链接】中所创建的“链接”。客户收到短信后点击链接,可一键呼起微信,引导客户添加企微好友,转化私域流量。<br /
>
在短信模板中,为确保添加成功率,系统会默认在此链接后拼接变量参数,请勿删除(特殊标注下)。否则,若是
POS
会员,会导致无法正确添加到相应的专属导购。
<
br
/>
<
/div
>
<
el
-
form
-
item
label
=
"选择链接:"
>
<
div
class
=
"flex"
>
<
el
-
select
class
=
"w160"
v
-
model
=
"link.wxEnterpriseId"
@
change
=
"getlinkOptions()"
v
-
show
=
"entepriseList.length > 1"
>
<
el
-
option
v
-
for
=
"el in entepriseList"
:
key
=
"el.wxEnterpriseId"
:
value
=
"el.wxEnterpriseId"
:
label
=
"el.corpName"
><
/el-option
>
<
/el-select
>
<
el
-
select
class
=
"w160"
v
-
model
=
"link.linkType"
@
change
=
"getlinkOptions()"
>
<
el
-
option
label
=
"通用链接"
:
value
=
"1"
><
/el-option
>
<
el
-
option
label
=
"专用链接"
:
value
=
"2"
><
/el-option
>
<
/el-select
>
<
el
-
select
class
=
"w160"
v
-
model
=
"link.hmLinkId"
filterable
placeholder
=
"请选择"
remote
:
remote
-
method
=
"getlinkOptions"
:
loading
=
"linkOptionsLoading"
>
<
el
-
option
v
-
for
=
"item in linkOptions"
:
key
=
"item.shortCode"
:
label
=
"item.name"
:
value
=
"item.shortCode"
>
<
/el-option
>
<
/el-select
>
<
/div
>
<
/el-form-item
>
<
/div
>
<
/el-form
>
<
/el-form
>
<
template
slot
=
"footer"
>
<
template
slot
=
"footer"
>
<
el
-
button
@
click
=
"transferLink.show = false"
>
取消
<
/el-button
>
<
el
-
button
@
click
=
"transferLink.show = false"
>
取消
<
/el-button
>
<
el
-
button
type
=
"primary"
@
click
=
"onTransferLink"
>
生成链接
<
/el-button
>
<
el
-
button
type
=
"primary"
@
click
=
"onTransferLink"
>
生成链接
<
/el-button
>
...
@@ -147,8 +177,8 @@
...
@@ -147,8 +177,8 @@
<
script
>
<
script
>
import
linktools
from
'@/components/linktools-fulls/index'
;
import
linktools
from
'@/components/linktools-fulls/index'
;
import
{
_debounce
}
from
'@/utils/index'
;
import
{
_debounce
}
from
'@/utils/index'
;
import
{
saveTempService
,
LoadTempInfo
,
checkSmsContext
}
from
'@/service/api/messageApi.js'
;
import
{
saveTempService
,
LoadTempInfo
,
checkSmsContext
,
hmList
,
hmLink
}
from
'@/service/api/messageApi.js'
;
import
{
compressLink
,
getTransferLink
,
getUserLogin
,
getSign
}
from
'@/service/api/commonApi.js'
;
import
{
compressLink
,
getTransferLink
,
getUserLogin
,
getSign
,
getEntepriseList
}
from
'@/service/api/commonApi.js'
;
export
default
{
export
default
{
name
:
'add-temp'
,
name
:
'add-temp'
,
components
:
{
linktools
}
,
components
:
{
linktools
}
,
...
@@ -175,7 +205,10 @@ export default {
...
@@ -175,7 +205,10 @@ export default {
const
urlReg
=
/
(
https
?
|ftp|file
)
:
\/\/[
-A-Za-z0-9+&@#
\/
%?=~_|!:,.;
]
+
[
-A-Za-z0-9+&@#
\/
%=~_|
]
/g
;
const
urlReg
=
/
(
https
?
|ftp|file
)
:
\/\/[
-A-Za-z0-9+&@#
\/
%?=~_|!:,.;
]
+
[
-A-Za-z0-9+&@#
\/
%=~_|
]
/g
;
let
validate
=
false
;
let
validate
=
false
;
value
.
replace
(
urlReg
,
(
str
,
$1
,
index
)
=>
{
value
.
replace
(
urlReg
,
(
str
,
$1
,
index
)
=>
{
console
.
log
(
str
);
if
(
!
validate
)
{
if
(
!
validate
)
{
console
.
log
(
value
[
index
-
1
]);
console
.
log
(
value
[
index
+
str
.
length
]);
validate
=
value
[
index
-
1
]
!=
' '
||
value
[
index
+
str
.
length
]
!=
' '
;
validate
=
value
[
index
-
1
]
!=
' '
||
value
[
index
+
str
.
length
]
!=
' '
;
}
}
}
);
}
);
...
@@ -186,6 +219,15 @@ export default {
...
@@ -186,6 +219,15 @@ export default {
}
;
}
;
return
{
return
{
loading
:
false
,
loading
:
false
,
linkOptionsLoading
:
false
,
linkType
:
1
,
linkOptions
:
[],
entepriseList
:
[],
link
:
{
wxEnterpriseId
:
''
,
linkType
:
1
,
hmLinkId
:
''
}
,
form
:
{
form
:
{
sign
:
''
,
sign
:
''
,
smsRecordlateId
:
''
,
smsRecordlateId
:
''
,
...
@@ -261,7 +303,8 @@ export default {
...
@@ -261,7 +303,8 @@ export default {
26
:
'最高单笔消费'
,
26
:
'最高单笔消费'
,
27
:
'最近消费门店名称'
,
27
:
'最近消费门店名称'
,
28
:
'最近消费品牌名称'
,
28
:
'最近消费品牌名称'
,
29
:
'入会后的生日次数'
29
:
'入会后的生日次数'
,
30
:
'客户的手机号'
}
,
}
,
validateStatus
:
null
,
// 校验状态 null未校验 0失败 1成功
validateStatus
:
null
,
// 校验状态 null未校验 0失败 1成功
showMoreFlag
:
false
,
// 展示更多文案flag
showMoreFlag
:
false
,
// 展示更多文案flag
...
@@ -297,8 +340,40 @@ export default {
...
@@ -297,8 +340,40 @@ export default {
this
.
form
.
sign
=
sign
.
result
.
signText
?
`【${sign.result.signText
}
】`
:
''
;
this
.
form
.
sign
=
sign
.
result
.
signText
?
`【${sign.result.signText
}
】`
:
''
;
}
}
this
.
getUserData
();
this
.
getUserData
();
this
.
getEntepriseList
();
}
,
}
,
methods
:
{
methods
:
{
getlinkOptions
(
searchName
)
{
const
{
linkType
,
wxEnterpriseId
}
=
this
.
link
;
this
.
link
.
hmLinkId
=
''
;
this
.
linkOptionsLoading
=
true
;
hmList
({
searchName
:
searchName
?
searchName
:
undefined
,
linkType
,
wxEnterpriseId
}
)
.
then
(
res
=>
{
if
(
res
.
errorCode
===
0
)
{
this
.
linkOptions
=
res
.
result
||
[];
}
else
{
this
.
$message
({
message
:
res
.
message
,
type
:
'error'
}
);
}
}
)
.
finally
(
_
=>
{
this
.
linkOptionsLoading
=
false
;
}
);
}
,
getEntepriseList
()
{
getEntepriseList
()
.
then
(
res
=>
{
if
(
res
.
errorCode
===
0
)
{
this
.
entepriseList
=
res
.
result
||
[];
this
.
link
.
wxEnterpriseId
=
this
.
entepriseList
[
0
].
wxEnterpriseId
;
this
.
getlinkOptions
();
}
else
{
this
.
$message
({
message
:
res
.
message
,
type
:
'error'
}
);
}
}
)
.
catch
(
err
=>
{
this
.
$message
({
message
:
err
.
data
.
message
,
type
:
'error'
}
);
}
);
}
,
submit
:
_debounce
(
function
(
formName
)
{
submit
:
_debounce
(
function
(
formName
)
{
this
.
$refs
[
formName
].
validate
(
valid
=>
{
this
.
$refs
[
formName
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
...
@@ -371,21 +446,39 @@ export default {
...
@@ -371,21 +446,39 @@ export default {
this
.
selectLink
.
linkData
=
{
}
;
this
.
selectLink
.
linkData
=
{
}
;
this
.
transferLink
.
type
=
'0'
;
this
.
transferLink
.
type
=
'0'
;
this
.
transferLink
.
dayNum
=
1
;
this
.
transferLink
.
dayNum
=
1
;
this
.
linkType
=
1
;
this
.
link
.
wxEnterpriseId
=
this
.
entepriseList
[
0
].
wxEnterpriseId
;
this
.
link
.
linkType
=
1
;
this
.
link
.
hmLinkId
=
''
;
}
,
}
,
// 将小程序链接转换成中转页链接
// 将小程序链接转换成中转页链接
onTransferLink
()
{
onTransferLink
()
{
if
(
!
this
.
selectLink
.
linkData
.
id
)
{
if
(
this
.
linkType
==
2
)
{
return
this
.
$tips
({
type
:
'error'
,
message
:
'请选择小程序链接'
}
);
if
(
!
this
.
link
.
hmLinkId
)
{
return
this
.
$tips
({
type
:
'error'
,
message
:
'请选择链接'
}
);
}
this
.
loading
=
true
;
const
{
hmLinkId
,
linkType
}
=
this
.
link
;
hmLink
({
hmLinkId
,
linkType
}
)
.
then
(
res
=>
{
this
.
insertLink
.
link
=
res
.
result
;
this
.
insertLink
.
show
=
true
;
}
)
.
finally
(()
=>
(
this
.
loading
=
false
));
}
else
{
if
(
!
this
.
selectLink
.
linkData
.
id
)
{
return
this
.
$tips
({
type
:
'error'
,
message
:
'请选择小程序链接'
}
);
}
this
.
loading
=
true
;
const
{
type
,
dayNum
}
=
this
.
transferLink
;
const
requestData
=
{
type
,
dayNum
,
pageLink
:
JSON
.
stringify
(
this
.
selectLink
.
linkData
)
}
;
getTransferLink
(
requestData
,
false
,
false
,
'post'
)
.
then
(
res
=>
{
this
.
insertLink
.
link
=
res
.
result
;
this
.
insertLink
.
show
=
true
;
}
)
.
finally
(()
=>
(
this
.
loading
=
false
));
}
}
this
.
loading
=
true
;
const
{
type
,
dayNum
}
=
this
.
transferLink
;
const
requestData
=
{
type
,
dayNum
,
pageLink
:
JSON
.
stringify
(
this
.
selectLink
.
linkData
)
}
;
getTransferLink
(
requestData
,
false
,
false
,
'post'
)
.
then
(
res
=>
{
this
.
insertLink
.
link
=
res
.
result
;
this
.
insertLink
.
show
=
true
;
}
)
.
finally
(()
=>
(
this
.
loading
=
false
));
}
,
}
,
onInsert
()
{
onInsert
()
{
// 链接插入短信中需要前后有一个空格
// 链接插入短信中需要前后有一个空格
...
...
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