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
ad946ef8
Commit
ad946ef8
authored
Aug 03, 2022
by
crushh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: dist
parent
86f64531
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
26 deletions
+35
-26
addTemp.vue
src/views/message/addTemp.vue
+35
-26
No files found.
src/views/message/addTemp.vue
View file @
ad946ef8
...
...
@@ -69,7 +69,7 @@
<
/el-popover
>
<
template
v
-
if
=
"wxaLinkFlag == 1"
>
<
span
class
=
"line"
><
/span
>
<
el
-
button
type
=
"text"
@
click
=
"transferLink.show = true"
>
插入
小程序
链接
<
/el-button
>
<
el
-
button
type
=
"text"
@
click
=
"transferLink.show = true"
>
插入链接
<
/el-button
>
<!--
<
el
-
button
type
=
"text"
@
click
=
"reduceLink.show = true"
>
压缩
H5
链接
<
/el-button> --
>
<
/template
>
<
/div
>
...
...
@@ -118,7 +118,7 @@
<
el
-
dialog
:
visible
.
sync
=
"transferLink.show"
title
=
"插入小程序链接"
width
=
"878px"
@
closed
=
"onTransferLinkClose"
>
<
el
-
form
label
-
width
=
"90px"
>
<
el
-
form
-
item
label
=
"链接类型:"
style
=
"margin:0 0 6px 0"
>
<
el
-
radio
-
group
v
-
model
=
"linkType"
>
<
el
-
radio
-
group
v
-
model
=
"linkType"
@
change
=
"handleLinkTypeChange"
>
<
el
-
radio
:
label
=
"1"
>
小程序链接
<
/el-radio
>
<
el
-
radio
:
label
=
"2"
>
引流链接
<
/el-radio
>
<
/el-radio-group
>
...
...
@@ -161,7 +161,8 @@
<
template
slot
=
"footer"
>
<
el
-
button
@
click
=
"transferLink.show = false"
>
取消
<
/el-button
>
<
el
-
button
type
=
"primary"
@
click
=
"onTransferLink"
>
生成链接
<
/el-button
>
<
el
-
button
type
=
"primary"
v
-
if
=
"linkType == 1"
@
click
=
"onTransferLink"
>
生成链接
<
/el-button
>
<
el
-
button
type
=
"primary"
v
-
else
@
click
=
"onInsert"
:
loading
=
"btnLoading"
>
插入链接
<
/el-button
>
<
/template
>
<
/el-dialog
>
<
el
-
dialog
:
visible
.
sync
=
"insertLink.show"
title
=
"链接生成"
>
...
...
@@ -223,6 +224,7 @@ export default {
return
{
loading
:
false
,
linkOptionsLoading
:
false
,
btnLoading
:
false
,
linkType
:
1
,
linkOptions
:
[],
entepriseList
:
[],
...
...
@@ -347,6 +349,11 @@ export default {
this
.
getEntepriseList
();
}
,
methods
:
{
handleLinkTypeChange
()
{
if
(
this
.
linkType
==
2
)
{
this
.
getlinkOptions
();
}
}
,
createLink
()
{
window
.
open
(
`${window.location.origin
}
/api-auth/login-for-haoban?requestProject=1&hbPage=attractFlowLink`
);
}
,
...
...
@@ -455,41 +462,43 @@ export default {
}
,
// 将小程序链接转换成中转页链接
onTransferLink
()
{
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
));
}
,
onInsert
()
{
// 链接插入短信中需要前后有一个空格
if
(
this
.
linkType
==
2
)
{
if
(
!
this
.
link
.
hmLinkId
)
{
return
this
.
$tips
({
type
:
'error'
,
message
:
'请选择链接'
}
);
}
this
.
l
oading
=
true
;
this
.
btnL
oading
=
true
;
const
{
hmLinkId
,
linkType
}
=
this
.
link
;
hmLink
({
hmLinkId
,
linkType
}
)
.
then
(
res
=>
{
this
.
insertLink
.
link
=
res
.
result
;
this
.
insertLink
.
show
=
true
;
this
.
form
.
content
=
`${this.form.content
}
${this.insertLink.link
}
`
;
this
.
insertLink
.
inserted
.
push
(
this
.
insertLink
.
link
);
this
.
transferLink
.
show
=
false
;
}
)
.
finally
(()
=>
(
this
.
l
oading
=
false
));
.
finally
(()
=>
(
this
.
btnL
oading
=
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
.
form
.
content
=
`${this.form.content
}
${this.insertLink.link
}
`
;
this
.
insertLink
.
show
=
false
;
this
.
reduceLink
.
show
=
false
;
this
.
transferLink
.
show
=
false
;
this
.
insertLink
.
inserted
.
push
(
this
.
insertLink
.
link
);
}
}
,
onInsert
()
{
// 链接插入短信中需要前后有一个空格
this
.
form
.
content
=
`${this.form.content
}
${this.insertLink.link
}
`
;
this
.
insertLink
.
show
=
false
;
this
.
reduceLink
.
show
=
false
;
this
.
transferLink
.
show
=
false
;
this
.
insertLink
.
inserted
.
push
(
this
.
insertLink
.
link
);
}
,
// 向短信内容中插入模板变量
addVar
(
key
,
val
)
{
const
curPos
=
this
.
$refs
[
'textarea'
].
$el
.
children
[
0
].
selectionStart
;
...
...
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