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
8a7d8c73
Commit
8a7d8c73
authored
Aug 04, 2022
by
crushh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: dist
parent
1c3cab7b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
10 deletions
+24
-10
commonApi.js
src/service/api/commonApi.js
+3
-0
addTemp.vue
src/views/message/addTemp.vue
+21
-10
No files found.
src/service/api/commonApi.js
View file @
8a7d8c73
...
...
@@ -38,3 +38,6 @@ export const getSign = params => requests(MARKET_PREFIX + 'getEnterpriseSetting'
//企业列表
export
const
getEntepriseList
=
params
=>
requests
(
MARKET_PREFIX
+
'list-qywx-enteprise'
,
params
);
//短信模板-引流链接是否展示
export
const
needShowHmLink
=
params
=>
requests
(
MARKET_PREFIX
+
'/need-show-hm-link'
,
params
);
src/views/message/addTemp.vue
View file @
8a7d8c73
...
...
@@ -120,7 +120,7 @@
<
el
-
form
-
item
label
=
"链接类型:"
style
=
"margin:0 0 6px 0"
>
<
el
-
radio
-
group
v
-
model
=
"linkType"
@
change
=
"handleLinkTypeChange"
>
<
el
-
radio
:
label
=
"1"
>
小程序链接
<
/el-radio
>
<
el
-
radio
:
label
=
"2"
>
引流链接
<
/el-radio
>
<
el
-
radio
:
label
=
"2"
v
-
show
=
"showHmLike"
>
引流链接
<
/el-radio
>
<
/el-radio-group
>
<
/el-form-item
>
<
div
v
-
if
=
"linkType == 1"
class
=
"mt12"
>
...
...
@@ -161,7 +161,7 @@
<
template
slot
=
"footer"
>
<
el
-
button
@
click
=
"transferLink.show = false"
>
取消
<
/el-button
>
<
el
-
button
type
=
"primary"
v
-
if
=
"linkType == 1"
@
click
=
"onTransferLink"
>
生成链接
<
/el-button
>
<
el
-
button
type
=
"primary"
:
loading
=
"btnLoading"
v
-
if
=
"linkType == 1"
@
click
=
"onTransferLink"
>
生成链接
<
/el-button
>
<
el
-
button
type
=
"primary"
v
-
else
@
click
=
"onInsert"
:
loading
=
"btnLoading"
>
插入链接
<
/el-button
>
<
/template
>
<
/el-dialog
>
...
...
@@ -182,7 +182,7 @@
import
linktools
from
'@/components/linktools-fulls/index'
;
import
{
_debounce
}
from
'@/utils/index'
;
import
{
saveTempService
,
LoadTempInfo
,
checkSmsContext
,
hmList
,
hmLink
}
from
'@/service/api/messageApi.js'
;
import
{
compressLink
,
getTransferLink
,
getSign
,
getEntepriseList
}
from
'@/service/api/commonApi.js'
;
import
{
compressLink
,
getTransferLink
,
getSign
,
getEntepriseList
,
needShowHmLink
}
from
'@/service/api/commonApi.js'
;
export
default
{
name
:
'add-temp'
,
components
:
{
linktools
}
,
...
...
@@ -313,6 +313,7 @@ export default {
}
,
validateStatus
:
null
,
// 校验状态 null未校验 0失败 1成功
showMoreFlag
:
false
,
// 展示更多文案flag
showHmLike
:
false
,
validaErrorMsg
:
''
// 校验失败内容
}
;
}
,
...
...
@@ -346,9 +347,17 @@ export default {
}
}
,
mounted
()
{
this
.
getEntepriseList
();
this
.
needShowHmLink
();
}
,
methods
:
{
needShowHmLink
()
{
needShowHmLink
({
}
).
then
(
res
=>
{
this
.
showHmLike
=
res
.
result
;
if
(
this
.
showHmLike
)
{
this
.
getEntepriseList
();
}
}
);
}
,
handleLinkTypeChange
()
{
if
(
this
.
linkType
==
2
)
{
this
.
getlinkOptions
();
...
...
@@ -455,17 +464,19 @@ export default {
this
.
selectLink
.
linkData
=
{
}
;
this
.
transferLink
.
type
=
'0'
;
this
.
transferLink
.
dayNum
=
1
;
this
.
linkType
=
1
;
this
.
link
.
wxEnterpriseId
=
this
.
entepriseList
[
0
].
wxEnterpriseId
;
this
.
link
.
linkType
=
1
;
this
.
link
.
hmLinkId
=
''
;
if
(
this
.
showHmLike
)
{
this
.
linkType
=
1
;
this
.
link
.
wxEnterpriseId
=
this
.
entepriseList
[
0
].
wxEnterpriseId
;
this
.
link
.
linkType
=
1
;
this
.
link
.
hmLinkId
=
''
;
}
}
,
// 将小程序链接转换成中转页链接
onTransferLink
()
{
if
(
!
this
.
selectLink
.
linkData
.
id
)
{
return
this
.
$tips
({
type
:
'error'
,
message
:
'请选择小程序链接'
}
);
}
this
.
l
oading
=
true
;
this
.
btnL
oading
=
true
;
const
{
type
,
dayNum
}
=
this
.
transferLink
;
const
requestData
=
{
type
,
dayNum
,
pageLink
:
JSON
.
stringify
(
this
.
selectLink
.
linkData
)
}
;
getTransferLink
(
requestData
,
false
,
false
,
'post'
)
...
...
@@ -473,7 +484,7 @@ export default {
this
.
insertLink
.
link
=
res
.
result
;
this
.
insertLink
.
show
=
true
;
}
)
.
finally
(()
=>
(
this
.
l
oading
=
false
));
.
finally
(()
=>
(
this
.
btnL
oading
=
false
));
}
,
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