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
489d62d9
Commit
489d62d9
authored
Dec 24, 2021
by
caoyanzhi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/微信图文升级' of
http://git.gicdev.com/marketing-web/marketing
into feature/微信图文升级
parents
694af89b
c0dd76ee
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
148 additions
and
42 deletions
+148
-42
index.vue
src/components/libs/imgTemp/index.vue
+1
-0
index.vue
src/components/libs/imgTextTemp/index.vue
+60
-16
syncImgtext.vue
src/components/libs/imgTextTemp/syncImgtext.vue
+13
-4
img.vue
src/components/upload/img.vue
+1
-0
form.vue
src/views/ecm/form.vue
+1
-1
lib-teletext.vue
src/views/ecm/marketing-event/components/lib-teletext.vue
+32
-3
index.vue
src/views/ecm/marketing-event/index.vue
+6
-1
editor.vue
src/views/wechat/editor.vue
+24
-9
form.vue
src/views/wechat/form.vue
+10
-8
No files found.
src/components/libs/imgTemp/index.vue
View file @
489d62d9
...
...
@@ -66,6 +66,7 @@ export default {
},
created
()
{
this
.
loadImgList
();
this
.
$store
.
commit
(
'mutations_breadcrumb'
,
[{
name
:
'营销管理'
},
{
name
:
'微信营销'
,
path
:
''
},
{
name
:
'素材库'
,
path
:
''
},
{
name
:
'图文'
,
path
:
''
}]);
},
data
()
{
return
{
...
...
src/components/libs/imgTextTemp/index.vue
View file @
489d62d9
...
...
@@ -5,29 +5,33 @@
图文消息(共
{{
total
}}
条)
<el-input
v-model=
"listParams.searchName"
clearable
class=
"w200 ml10"
placeholder=
"请输入标题/作者"
@
change=
"loadImgTextList"
><i
slot=
"prefix"
class=
"el-input__icon el-icon-search"
></i></el-input>
<el-checkbox
class=
"vertical-middle ml0"
v-if=
"$store.state.marketing.isShowSelf && showSelf"
v-model=
"listParams.showSelfFlag"
:true-label=
"1"
:false-label=
"0"
label=
"仅看本人"
border
@
change=
"loadImgTextList"
/>
<el-checkbox
class=
"vertical-middle ml0"
v-model=
"listParams.wxscType"
v-if=
"!isPublish && !isGroupSend"
:true-label=
"3"
:false-label=
"4"
label=
"仅看历史图文"
border
@
change=
"loadImgTextList"
/>
<el-checkbox
class=
"vertical-middle ml0"
v-model=
"listParams.wxscType"
v-if=
"!isPublish && !isGroupSend"
:true-label=
"3"
:false-label=
"4"
border
@
change=
"loadImgTextList"
>
<el-tooltip
content=
"图文素材已升级为草稿,你可以将所需历史素材转为草稿进行使用;"
placement=
"top"
>
<span>
仅看历史图文素材
</span>
</el-tooltip>
</el-checkbox>
</div>
<div>
<el-button
type=
"primary"
v-if=
"!isPublish"
@
click=
"add"
>
新建图文
</el-button>
<el-button
v-if=
"auto"
@
click=
"check"
>
检查同步
</el-button>
</div>
</div>
<el-radio-group
class=
"dm-imgtext-list"
v-model=
"selectedData"
:style=
"scrollStyle"
>
<el-radio-group
class=
"dm-imgtext-list"
v-model=
"selectedData
.imageTextId
"
:style=
"scrollStyle"
>
<el-table
tooltipEffect=
"light"
:data=
"textImgList"
style=
"width: 100%"
@
row-click=
"rowClick"
>
<el-table-column
label=
""
align=
"center"
v-if=
"radioShow"
>
<template
slot-scope=
"scope"
>
<div
class=
"label-hidden"
><el-radio
:
label=
"scope.row
"
></el-radio></div>
<div
class=
"label-hidden"
><el-radio
:
disabled=
"disabled"
:label=
"scope.row.imageTextId
"
></el-radio></div>
</
template
>
</el-table-column>
<el-table-column
label=
"图文信息"
align=
"left"
min-width=
"200px"
>
<div
class=
"media-info"
slot-scope=
"scope"
>
<img
width=
"
100"
height=
"10
0"
:src=
"scope.row.itemList.length ? scope.row.itemList[0].qcloudImageUrl || '' : ''"
alt=
""
/>
<img
width=
"
60"
height=
"6
0"
:src=
"scope.row.itemList.length ? scope.row.itemList[0].qcloudImageUrl || '' : ''"
alt=
""
/>
<div
class=
"media-title"
>
<p>
标题:
<a
class=
"blue"
:href=
"scope.row.itemList.length ? scope.row.itemList[0].mediaUrl || '' : ''"
target=
"_blank"
>
{{ scope.row.itemList.length ? scope.row.itemList[0].titleName || '' : '' }}
</a>
</p>
<p>
图文m_id:
{{ isPublish ? '图文a_id:' : '图文m_id:' }}
<el-tooltip
v-if=
"!isPublish && scope.row.draftMediaId"
placement=
"top"
:content=
"scope.row.draftMediaId"
>
<span
class=
"media-id"
>
{{ scope.row.draftMediaId }}
</span>
</el-tooltip>
...
...
@@ -73,7 +77,13 @@
<el-button
type=
"text"
v-if=
"scope.row.canEdit !== false"
@
click=
"$router.push('/wechat/record/add/' + scope.row.imageTextId)"
>
使用
</el-button>
<el-button
:loading=
"scope.row.loading"
:disabled=
"scope.row.loading"
@
click=
"onPublic(scope.row)"
type=
"text"
>
发布
</el-button>
</
template
>
<dm-delete
v-if=
"scope.row.canEdit !== false"
@
confirm=
"delData(scope.row)"
tips=
"确认删除该图文?"
>
<dm-delete
v-if=
"scope.row.canEdit"
width=
"300"
@
confirm=
"delData(scope.row)"
>
<div
slot=
"tips"
v-if=
"isPublish"
>
<p
class=
"tips-content"
><i
class=
"tipos-icon el-icon-warning"
></i>
删除后,用户将无法访问此图文页面。请检查当前是否有其他地方正在使用此图文内容,否则将导致发送失败。
</p>
</div>
<div
slot=
"tips"
v-if=
"!isPublish && !isGroupSend"
>
<p
class=
"tips-content"
><i
class=
"tipos-icon el-icon-warning"
></i>
删除后,用户将无法访问此草稿内容。
</p>
</div>
<el-button
type=
"text"
>
删除
</el-button>
</dm-delete>
</template>
...
...
@@ -82,7 +92,7 @@
</el-table>
</el-radio-group>
<dm-pagination
v-show=
"textImgList.length"
background
class=
"dm-pagination"
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"listParams.currentPage"
:page-sizes=
"[20, 40, 60, 80]"
:page-size=
"listParams.pageSize"
layout=
"total, sizes, prev, pager, next"
:total=
"total"
></dm-pagination>
<sync-imgtext
:wxsc-type=
"getWxscType"
:show
.
sync=
"syncImgTextShow"
></sync-imgtext>
<sync-imgtext
:wxsc-type=
"getWxscType"
:show
.
sync=
"syncImgTextShow"
@
syncSuccess=
"loadImgTextList"
></sync-imgtext>
</section>
</template>
...
...
@@ -119,9 +129,14 @@ export default {
type
:
Boolean
,
default
:
false
},
// 是否是发布列表调用
isPublish
:
{
type
:
Boolean
,
default
:
false
},
disabled
:
{
type
:
Boolean
,
default
:
false
}
},
mounted
()
{
...
...
@@ -129,9 +144,18 @@ export default {
this
.
$store
.
commit
(
'mutations_layoutTips'
,
`<div class="layout--tips">
<i class="el-icon-info"></i>因为在微信公众后台发布的图文会从草稿箱转移到发表记录,若在微信公众后台有发布操作,建议在达摩侧的草稿箱检查同步
<i class="el-icon-info"></i>
<span style="display:inline-block;vertical-align: top">
此处是同步【微信公众平台-草稿箱】中的图文类型草稿,点击“检查同步”可获取最新的草稿和草稿状态。若在微信公众后台对草稿有进行相关操作,请在此处“检查同步”以获取最新结果。
<br>
在此处对草稿进行“修改”/“发布”/“删除”操作,结果都会同步至微信公众平台对应的草稿上
</span>
</div>`
);
this
.
$store
.
commit
(
'mutations_breadcrumb'
,
[{
name
:
'营销管理'
},
{
name
:
'微信营销'
,
path
:
''
},
{
name
:
'素材库'
,
path
:
''
},
{
name
:
'图文发草稿箱'
,
path
:
''
}]);
}
else
{
this
.
$store
.
commit
(
'mutations_layoutTips'
,
''
);
this
.
$store
.
commit
(
'mutations_breadcrumb'
,
[{
name
:
'营销管理'
},
{
name
:
'微信营销'
,
path
:
''
},
{
name
:
'素材库'
,
path
:
''
},
{
name
:
'图文发布列表'
,
path
:
''
}]);
}
this
.
loadImgTextList
();
},
...
...
@@ -163,7 +187,7 @@ export default {
watch
:
{
activeId
(
val
)
{
this
.
textImgList
.
map
(
v
=>
{
if
(
this
.
activeId
===
v
.
imageText
Wechat
Id
)
{
if
(
this
.
activeId
===
v
.
imageTextId
)
{
this
.
selectedData
=
v
;
}
});
...
...
@@ -173,28 +197,28 @@ export default {
formatPublishStatus
(
row
,
col
,
val
)
{
// 0:成功, 1:发布中,2:原创失败, 3: 常规失败, 4:平台审核不通过, 5:成功后用户删除所有文章, 6: 成功后系统封禁所有文章 100:老图文 , 101:草稿
const
status
=
new
Map
();
status
.
set
(
0
,
'成功'
);
//
status.set(0, '成功');
status
.
set
(
1
,
'发布中'
);
status
.
set
(
2
,
'原创失败'
);
status
.
set
(
3
,
'常规失败'
);
status
.
set
(
4
,
'平台审核不通过'
);
status
.
set
(
5
,
'成功后用户删除所有文章'
);
status
.
set
(
6
,
'成功后系统封禁所有文章'
);
status
.
set
(
100
,
'老图文'
);
status
.
set
(
101
,
'草稿'
);
//
status.set(100, '老图文');
//
status.set(101, '草稿');
return
status
.
get
(
typeof
val
==
'string'
?
Number
(
val
)
:
val
)
||
'--'
;
},
onPublic
(
row
)
{
this
.
$confirm
(
'
确认发布此图文?'
,
'发布图文
'
,
{
this
.
$confirm
(
'
你正在将草稿进行“发布”。发布不会占用群发次数,也不会推送给用户。发布后的内容将可添加到自定义菜单、自动回复中。发布成功后,此图文将展示在【图文发布列表】'
,
'发布确认
'
,
{
type
:
'warning'
}).
then
(()
=>
{
this
.
$set
(
row
,
'loading'
,
true
);
wechatDraftPublish
({
imageTextId
:
row
.
imageTextId
})
.
then
(
res
=>
{
this
.
$message
.
success
(
'
发布成功!
'
);
this
.
$message
.
success
(
'
成功提交发布,等待发布审核
'
);
this
.
loadImgTextList
();
})
.
finally
(()
=>
this
.
$set
(
row
,
'loading'
,
'false'
));
.
finally
(()
=>
this
.
$set
(
row
,
'loading'
,
false
));
});
},
async
loadImgTextList
()
{
...
...
@@ -206,6 +230,7 @@ export default {
let
params
=
{
...
this
.
listParams
};
if
(
this
.
isGroupSend
)
{
params
.
isGroupSend
=
1
;
params
.
wxscType
=
2
;
}
if
(
this
.
isPublish
)
{
params
.
wxscType
=
5
;
...
...
@@ -220,7 +245,7 @@ export default {
this
.
textImgList
.
map
(
v
=>
{
v
.
createTimeStr
=
v
.
createTime
;
// v.updateTimeStr = v.updateTime;
if
(
this
.
activeId
===
v
.
imageText
Wechat
Id
)
{
if
(
this
.
activeId
===
v
.
imageTextId
)
{
this
.
selectedData
=
v
;
}
});
...
...
@@ -239,6 +264,7 @@ export default {
this
.
syncImgTextShow
=
true
;
},
rowClick
(
row
)
{
if
(
this
.
disabled
)
return
;
this
.
selectedData
=
row
;
this
.
$emit
(
'get-data'
,
{
imageTextId
:
row
.
imageTextId
,
imageTextWechatId
:
row
.
imageTextWechatId
});
},
...
...
@@ -275,6 +301,19 @@ export default {
</
script
>
<
style
lang=
"scss"
scoped
>
.tips-content
{
display
:
flex
;
justify-content
:
flex-start
;
align-items
:
flex-start
;
.tipos-icon
{
margin-right
:
8px
;
vertical-align
:
text-bottom
;
font-size
:
20px
;
color
:
#faad14
;
}
margin-bottom
:
16px
;
font-size
:
14px
;
}
.media-info
{
display
:
flex
;
align-items
:
center
;
...
...
@@ -322,3 +361,8 @@ export default {
}
}
</
style
>
<
style
>
.el-message-box__status
{
top
:
16px
;
}
</
style
>
src/components/libs/imgTextTemp/syncImgtext.vue
View file @
489d62d9
<
template
>
<el-dialog
class=
"sync-imgtext__dialog"
title=
"同步微信草稿箱图文
"
:visible
.
sync=
"show"
width=
"30%"
:before-close=
"close"
v-loading=
"loading"
>
<el-dialog
class=
"sync-imgtext__dialog"
:title=
"wxscType == 4 ? '同步微信草稿箱图文' : '同步已发布的微信图文'
"
:visible
.
sync=
"show"
width=
"30%"
:before-close=
"close"
v-loading=
"loading"
>
<div
class=
"gic-modal-bd"
>
<div
class=
"gic-modal-content"
>
<p
class=
"fz16"
style=
"margin-bottom:20px"
>
微信草稿箱里的图文共
<span>
{{
count
}}
</span>
条
<span
@
click=
"getSyncInfo"
class=
"blue"
style=
"margin-left:10px;"
>
刷新
</span>
{{
wxscType
==
4
?
'微信草稿箱里的图文共'
:
'已发布微信图文共'
}}
<span>
{{
count
}}
</span>
条
<span
@
click=
"getSyncInfo"
class=
"blue"
style=
"margin-left:10px;"
>
刷新
</span>
</p>
<div
style=
"margin-bottom: 10px"
>
同步条数:
<el-select
style=
"width: 160px"
v-if=
"loadStatus === 1 && count !== 0
"
v-model=
"size"
placeholder=
"选择同步条数"
>
<el-select
style=
"width: 160px"
:disabled=
"!(loadStatus === 1 && count !== 0)
"
v-model=
"size"
placeholder=
"选择同步条数"
>
<el-option
v-for=
"item in sizeOptions"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
></el-option>
</el-select>
</div>
...
...
@@ -49,12 +49,20 @@ export default {
loading
:
false
,
count
:
0
,
size
:
5
,
sizeOptions
:
[{
label
:
'5条'
,
value
:
5
},
{
label
:
'10条'
,
value
:
10
},
{
label
:
'20条'
,
value
:
20
},
{
label
:
'全部'
,
value
:
999999
}]
// eslint-disable-line
sizeOptions
:
[
{
label
:
'最新的5条'
,
value
:
5
},
{
label
:
'最新的10条'
,
value
:
10
},
{
label
:
'最新的20条'
,
value
:
20
},
{
label
:
'全部'
,
value
:
999999
}
]
};
},
methods
:
{
close
()
{
this
.
$emit
(
'update:show'
,
false
);
this
.
$nextTick
(()
=>
{
this
.
size
=
5
;
});
},
async
getSyncInfo
()
{
this
.
loading
=
true
;
...
...
@@ -71,6 +79,7 @@ export default {
this
.
$tips
({
type
:
'success'
,
message
:
'同步成功'
});
this
.
loadStatus
=
1
;
this
.
close
();
this
.
$emit
(
'syncSuccess'
);
}
}
}
...
...
src/components/upload/img.vue
View file @
489d62d9
...
...
@@ -72,6 +72,7 @@ export default {
this
.
$emit
(
'backImg'
,
this
.
model
);
this
.
copyDisabled
=
this
.
disabled
;
},
immediate
:
true
,
deep
:
true
}
},
...
...
src/views/ecm/form.vue
View file @
489d62d9
...
...
@@ -355,7 +355,7 @@
</div>
</h3>
<!-- 只有实时才是单图文 -->
<marketing-event
:readOnly=
"isInfo || onlineStatus == 2"
:show-delete-tooltip=
"isEdit && analyseConfig.open_flag == 1"
show-out-coupon-icon
ref=
"marketingEvent"
@
has-card=
"hasCard"
v-if=
"ecmPlanId"
:singleFlag=
"form.effectType === 0"
:integralMultiple=
"form.effectAction === 'consume'"
:ecmPlanId=
"ecmPlanId"
:isSupportVar=
"form.effectType === 0"
:code=
"code"
:enabledMessageState=
"enabledMessageState"
:cardLimitType=
"-1"
:use-stored=
"useStoredFlag && ['consume', 'stored'].includes(form.effectAction) && form.effectType == 0"
:use-qfxx=
"form.effectType !== 0"
></marketing-event>
<marketing-event
:
effectType=
"form.effectType"
:
readOnly=
"isInfo || onlineStatus == 2"
:show-delete-tooltip=
"isEdit && analyseConfig.open_flag == 1"
show-out-coupon-icon
ref=
"marketingEvent"
@
has-card=
"hasCard"
v-if=
"ecmPlanId"
:singleFlag=
"form.effectType === 0"
:integralMultiple=
"form.effectAction === 'consume'"
:ecmPlanId=
"ecmPlanId"
:isSupportVar=
"form.effectType === 0"
:code=
"code"
:enabledMessageState=
"enabledMessageState"
:cardLimitType=
"-1"
:use-stored=
"useStoredFlag && ['consume', 'stored'].includes(form.effectAction) && form.effectType == 0"
:use-qfxx=
"form.effectType !== 0"
></marketing-event>
<!-- 只有非实时&&选择卡券了展示提示 -->
<div
v-if=
"currentCard.comName && form.effectType != 0 && couponAutoGetFlag"
class=
"fz13 regular-font-color line-height2"
style=
"margin-left:120px;margin-top:30px;"
>
* 用户在领取卡券后需要
<b
class=
"bold"
>
同步至ERP
</b>
,如果关闭用户
<b
class=
"bold"
>
手动领取
</b>
,卡券在
<b
class=
"bold"
>
批量投放
</b>
时会需要将卡券信息批量同步至ERP。
<br
/>
...
...
src/views/ecm/marketing-event/components/lib-teletext.vue
View file @
489d62d9
...
...
@@ -17,13 +17,26 @@
</
template
>
</el-table-column>
<el-table-column
label=
"图片"
align=
"left"
width=
"120px"
class-name=
"table-img"
>
<
template
slot-scope=
"scope"
>
<
div
slot-scope=
"scope"
>
<img
width=
"100"
height=
"50"
class=
"border-radius__default"
:src=
"scope.row.itemList.length ? scope.row.itemList[0].qcloudImageUrl || '' : ''"
alt=
""
/>
</
template
>
</
div
>
</el-table-column>
<el-table-column
label=
"图文标题"
align=
"left"
min-width=
"100px"
>
<
template
slot-scope=
"scope"
>
<a
class=
"blue"
:href=
"scope.row.itemList.length ? scope.row.itemList[0].mediaUrl || '' : ''"
target=
"_blank"
>
{{
scope
.
row
.
itemList
.
length
?
scope
.
row
.
itemList
[
0
].
titleName
||
''
:
''
}}
</a>
<span>
标题:
</span><a
class=
"blue"
:href=
"scope.row.itemList.length ? scope.row.itemList[0].mediaUrl || '' : ''"
target=
"_blank"
>
{{
scope
.
row
.
itemList
.
length
?
scope
.
row
.
itemList
[
0
].
titleName
||
''
:
''
}}
</a>
<div>
<span>
{{
effectType
!=
0
?
'图文m_id:'
:
'图文a_id:'
}}
</span>
<el-tooltip
v-if=
"effectType != 0 && scope.row.draftMediaId"
placement=
"top"
:content=
"scope.row.draftMediaId"
>
<span
class=
"media-id"
>
{{
scope
.
row
.
draftMediaId
}}
</span>
</el-tooltip>
<el-tooltip
v-else-if=
"effectType == 0 && scope.row.articleId"
placement=
"top"
:content=
"scope.row.articleId"
>
<span
class=
"media-id"
>
{{
scope
.
row
.
articleId
}}
</span>
</el-tooltip>
<span
v-else
>
--
</span>
</div>
<!--
<el-tooltip
v-if=
"scope.row.articleId"
placement=
"top"
:content=
"scope.row.articleId"
>
<span
class=
"media-id"
>
{{
scope
.
row
.
articleId
}}
</span>
</el-tooltip>
-->
</
template
>
</el-table-column>
<el-table-column
label=
"作者"
prop=
"updateTimeStr"
align=
"left"
width=
"120px"
>
...
...
@@ -62,6 +75,11 @@ export default {
// 图文 实时发送这个参数为true,过滤图文仅要单图文
type
:
Boolean
,
default
:
false
},
// 智能营销的时效 0:触点 1:重复 2:单次
effectType
:
{
type
:
[
Number
,
String
],
default
:
0
}
},
created
()
{
...
...
@@ -92,6 +110,9 @@ export default {
loadImgTextList
()
{
this
.
loading
=
true
;
const
params
=
{
...
this
.
listParams
};
if
(
this
.
effectType
!=
0
)
{
params
.
wxscType
=
2
;
}
if
(
this
.
singleFlag
)
{
params
.
singleFlag
=
1
;
// 不是实时就不穿这个参数,不传表示全部
}
...
...
@@ -147,4 +168,12 @@ export default {
.dm-imgtext-list
{
width
:
100%
;
}
.media-id
{
display
:
inline-block
;
vertical-align
:
top
;
max-width
:
190px
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
</
style
>
src/views/ecm/marketing-event/index.vue
View file @
489d62d9
...
...
@@ -34,7 +34,7 @@
</transition>
</div>
<!-- 弹窗组件 -->
<component
:is=
"dialogCom"
@
sendItem=
"saveToList"
:showOutCouponIcon=
"showOutCouponIcon"
:item=
"currentItem"
:show
.
sync=
"dialogShow"
:isSupportVar=
"isSupportVar"
:cardLimitType=
"cardLimitType"
:integralMultiple=
"integralMultiple"
:singleFlag=
"singleFlag"
:read-only=
"readOnly || showView"
:resource-status=
"resourceStatus"
></component>
<component
:is=
"dialogCom"
@
sendItem=
"saveToList"
:
effectType=
"effectType"
:
showOutCouponIcon=
"showOutCouponIcon"
:item=
"currentItem"
:show
.
sync=
"dialogShow"
:isSupportVar=
"isSupportVar"
:cardLimitType=
"cardLimitType"
:integralMultiple=
"integralMultiple"
:singleFlag=
"singleFlag"
:read-only=
"readOnly || showView"
:resource-status=
"resourceStatus"
></component>
</section>
</template>
...
...
@@ -152,6 +152,11 @@ export default {
type
:
Boolean
,
default
:
true
},
// 智能营销的时效 0:触点 1:重复 2:单次
effectType
:
{
type
:
[
Number
,
String
],
default
:
0
},
useQfxx
:
Boolean
,
showDeleteTooltip
:
Boolean
},
...
...
src/views/wechat/editor.vue
View file @
489d62d9
...
...
@@ -35,12 +35,13 @@
<div
class=
"editor_triangle"
></div>
<div
class=
"editor-inner"
>
<p
class=
"line-height2"
><span
class=
"danger-color"
>
*
</span>
标题
</p>
<dm-input
size=
"medium"
v-model=
"activeImgText.titleName"
:maxlength=
"64"
></dm-input>
<dm-input
size=
"medium"
v-model=
"activeImgText.titleName"
:
disabled=
"isCheckImg"
:
maxlength=
"64"
></dm-input>
<p
class=
"line-height2 pt10"
>
作者
</p>
<dm-input
size=
"medium"
v-model=
"activeImgText.authorName"
:byteType=
"1"
:maxlength=
"8"
></dm-input>
<dm-input
size=
"medium"
v-model=
"activeImgText.authorName"
:
disabled=
"isCheckImg"
:
byteType=
"1"
:maxlength=
"8"
></dm-input>
<p
class=
"line-height2 pt10"
>
封面
<span
class=
"gray fz12"
>
(大图片建议尺寸:900像素 * 500像素)
</span></p>
<upload-img
url=
"/api-marketing/marketing-wechat-image-save"
class=
"inline-block"
:model
.
sync=
"postImg"
:showImg=
"false"
width=
"auto"
label=
"本地上传"
tips=
""
:labelStyle=
"
{ padding: '8px 15px', fontSize: '14px', borderRadius: '4px' }">
</upload-img>
<upload-img
url=
"/api-marketing/marketing-wechat-image-save"
class=
"inline-block"
:
disabled=
"isCheckImg"
:
model
.
sync=
"postImg"
:showImg=
"false"
width=
"auto"
label=
"本地上传"
tips=
""
:labelStyle=
"
{ padding: '8px 15px', fontSize: '14px', borderRadius: '4px' }">
</upload-img>
<el-button
:disabled=
"isCheckImg"
class=
"ml5"
@
click=
"
postFlag = true;
...
...
@@ -49,12 +50,12 @@
>
从素材中选择
</el-button
>
<div
class=
"cover_preview"
v-show=
"activeImgText.qcloudImageUrl"
:style=
"'background-image: url(' + activeImgText.qcloudImageUrl + ')'"
></div>
<el-checkbox
class=
"pt10"
v-show=
"activeImgText.qcloudImageUrl"
v-model=
"activeImgText.imageType"
:true-label=
"1"
:false-label=
"0"
>
封面图片显示在正文中
</el-checkbox>
<el-checkbox
class=
"pt10"
v-show=
"activeImgText.qcloudImageUrl"
v-model=
"activeImgText.imageType"
:
disabled=
"isCheckImg"
:
true-label=
"1"
:false-label=
"0"
>
封面图片显示在正文中
</el-checkbox>
<p
class=
"line-height2 pt10"
>
摘要
<span
class=
"gray fz12"
>
(选填,如果不填写会默认抓取正文前54个字)
</span></p>
<dm-input
size=
"medium"
v-model=
"activeImgText.remark"
type=
"textarea"
:rows=
"4"
:maxlength=
"120"
></dm-input>
<dm-input
size=
"medium"
v-model=
"activeImgText.remark"
:disabled=
"isCheckImg"
type=
"textarea"
:rows=
"4"
:maxlength=
"120"
></dm-input>
<p
class=
"line-height2 mt10"
><span
class=
"danger-color"
>
*
</span>
正文
</p>
<div
class=
"toolbar"
>
<div
class=
"toolbar"
v-if=
"!isCheckImg"
>
<span
@
click=
"
postFlag = false;
...
...
@@ -66,7 +67,7 @@
<!--
<span
@
click=
"cardShow = true"
><i
class=
"iconfont icon-qiaquan"
></i><span>
卡券
</span></span>
-->
</div>
<vue-ueditor-wrap
ref=
"ueditor"
v-model=
"activeImgText.content"
:destroy=
"false"
:config=
"config"
@
ready=
"ready"
:myInit=
"myInit"
></vue-ueditor-wrap>
<el-checkbox
class=
"pt10"
v-model=
"activeImgText.originalStatus"
:true-label=
"1"
:false-label=
"0"
>
原文链接
</el-checkbox>
<el-checkbox
class=
"pt10"
v-model=
"activeImgText.originalStatus"
:
disabled=
"isCheckImg"
:
true-label=
"1"
:false-label=
"0"
>
原文链接
</el-checkbox>
<el-input
size=
"medium"
v-if=
"activeImgText.originalStatus"
v-model=
"activeImgText.originalUrl"
></el-input>
</div>
</div>
...
...
@@ -131,6 +132,7 @@ import { upRecord, downRecord, voidStr } from '@/utils/index.js';
export
default
{
data
()
{
return
{
isCheckImg
:
false
,
loading
:
false
,
subLoading
:
false
,
activeClass
:
'first'
,
...
...
@@ -221,7 +223,20 @@ export default {
},
created
()
{
this
.
getMarketingUserInfo
();
this
.
$store
.
commit
(
'mutations_breadcrumb'
,
[{
name
:
'营销管理'
},
{
name
:
'微信营销'
,
path
:
''
},
{
name
:
'素材库'
,
path
:
'/wechat/temp'
}]);
// editor
// editor:id
// check-imgtext:id
const
bread
=
[{
name
:
'营销管理'
},
{
name
:
'微信营销'
,
path
:
''
},
{
name
:
'素材库'
,
path
:
'/wechat/temp'
}];
if
(
this
.
$route
.
path
==
'/wechat/editor'
)
{
bread
.
push
({
name
:
'新建图文'
,
path
:
''
});
}
else
if
(
this
.
$route
.
path
.
indexOf
(
'check-imgtext'
)
>=
0
)
{
bread
.
push
({
name
:
'查看图文'
,
path
:
''
});
this
.
isCheckImg
=
true
;
this
.
config
.
readonly
=
true
;
}
else
{
bread
.
push
({
name
:
'编辑图文'
,
path
:
''
});
}
this
.
$store
.
commit
(
'mutations_breadcrumb'
,
bread
);
//监听获取图片 封面图或者正文图片
// eslint-disable-next-line
$bus
.
$on
(
'img-temp-choose'
,
val
=>
{
...
...
@@ -411,7 +426,7 @@ export default {
let
res
=
await
saveUpdateWechatImageText
({
wechatTeletext
:
JSON
.
stringify
(
params
)
});
if
(
res
.
errorCode
===
0
)
{
this
.
$tips
({
type
:
'success'
,
message
:
type
?
'编辑图文成功'
:
'新建图文成功'
});
this
.
$router
.
push
(
'/wechat/temp/imgtext'
);
this
.
$router
.
go
(
-
1
);
}
else
{
this
.
$tips
({
type
:
'error'
,
message
:
res
.
message
||
type
?
'编辑图文失败'
:
'新建图文失败'
});
}
...
...
src/views/wechat/form.vue
View file @
489d62d9
...
...
@@ -16,7 +16,7 @@
</div>
<div>
<span
class=
"dm-input_label"
style=
"margin-right:12px"
>
发送时间:
</span>
<el-select
class=
"w250"
v-model=
"info.sendType"
:disabled=
"isInfo"
>
<el-select
class=
"w250"
v-model=
"info.sendType"
:disabled=
"isInfo
|| isEdit
"
>
<el-option
v-for=
"(v, i) in sendTypeOptions"
:key=
"i"
:value=
"v.value"
:label=
"v.label"
></el-option>
</el-select>
<el-date-picker
class=
"w250"
:disabled=
"isInfo"
v-if=
"info.sendType"
v-model=
"info.sendTime"
type=
"datetime"
placeholder=
"选择日期时间"
align=
"right"
:picker-options=
"pickerOptions"
></el-date-picker>
...
...
@@ -30,14 +30,14 @@
<div
class=
"pt10 pb20"
>
<span
class=
"dm-input_label"
>
选择会员:
</span>
<el-radio
v-model=
"info.memberType"
:disabled=
"isInfo"
:label=
"0"
>
会员筛选
</el-radio>
<el-radio
v-model=
"info.memberType"
:disabled=
"isInfo"
:label=
"1"
>
<el-radio
v-model=
"info.memberType"
:disabled=
"isInfo
|| isEdit
"
:label=
"0"
>
会员筛选
</el-radio>
<el-radio
v-model=
"info.memberType"
:disabled=
"isInfo
|| isEdit
"
:label=
"1"
>
指定会员
<el-tooltip
class=
"item"
effect=
"dark"
content=
"指定会员下最多选择1000人"
open-delay=
"200"
>
<i
class=
"el-icon-info ml5 minor-font-color"
></i>
</el-tooltip>
</el-radio>
<el-radio
v-model=
"info.memberType"
:disabled=
"isInfo"
:label=
"2"
>
会员分组
</el-radio>
<el-radio
v-model=
"info.memberType"
:disabled=
"isInfo
|| isEdit
"
:label=
"2"
>
会员分组
</el-radio>
</div>
<div
v-show=
"info.memberType === 0"
>
<vue-gic-people
v-bind=
"storeParams"
:projectName=
"projectName"
:isAdd=
"isAdd"
:triggerReset=
"true"
:useId=
"useId"
:hasSearchData=
"hasSearchData"
:sceneValue=
"sceneValue"
ref=
"peopleFilter"
@
findFilter=
"findFilter"
@
getBackData=
"getBackData"
@
editHide=
"editHide"
@
editShow=
"editShow"
@
hideBtn=
"hideBtn"
/>
...
...
@@ -52,14 +52,14 @@
<section
class=
"dm-form__wrap"
v-if=
"$route.meta.type !== 'imgText'"
>
<h3
class=
"dm-title__label"
>
群发内容设置
</h3>
<span
class=
"dm-input_label"
>
群发类型:
</span>
<el-radio-group
v-model=
"info.contentType"
>
<el-radio-group
:disabled=
"isInfo || isEdit"
v-model=
"info.contentType"
>
<el-radio
:label=
"0"
:disabled=
"isInfo"
>
图文
</el-radio>
<el-radio
:label=
"1"
:disabled=
"isInfo"
>
文本
</el-radio>
<el-radio
:label=
"2"
:disabled=
"isInfo"
>
图片
</el-radio>
</el-radio-group>
<div
class=
"pt20"
>
<div
v-show=
"info.contentType === 0"
style=
"padding:15px; border:1px solid #DCDFE6;border-radius:2px;"
>
<dm-img-text
:isGroupSend=
"true"
:
showSelf=
"false"
:showSelfFlag=
"showSelfFlag"
@
get-data=
"getImgTextData"
:radioShow=
"true"
:auto=
"false"
:imageTextId=
"info.imageTextId"
:activeId=
"info.imageTextWecha
tId"
></dm-img-text>
<dm-img-text
:isGroupSend=
"true"
:
disabled=
"isInfo || isEdit"
:showSelf=
"false"
:showSelfFlag=
"showSelfFlag"
@
get-data=
"getImgTextData"
:radioShow=
"true"
:auto=
"false"
:imageTextId=
"info.imageTextId"
:activeId=
"info.imageTex
tId"
></dm-img-text>
</div>
<dm-img-box
:isGroupSend=
"true"
:selfSwitch=
"false"
v-show=
"info.contentType === 2"
:mediaId=
"info.mediaId"
@
get-data=
"getImgData"
></dm-img-box>
<div
v-show=
"info.contentType === 1"
>
...
...
@@ -198,7 +198,9 @@ export default {
);
},
created
()
{
this
.
$store
.
commit
(
'mutations_breadcrumb'
,
[{
name
:
'营销管理'
},
{
name
:
'微信营销'
,
path
:
''
},
{
name
:
'发送记录'
,
path
:
'/wechat'
},
{
name
:
'微信群发'
,
path
:
''
}]);
this
.
$nextTick
(()
=>
{
this
.
$store
.
commit
(
'mutations_breadcrumb'
,
[{
name
:
'营销管理'
},
{
name
:
'微信营销'
,
path
:
''
},
{
name
:
'发送记录'
,
path
:
'/wechat'
},
{
name
:
'微信群发'
,
path
:
''
}]);
});
if
(
this
.
imgTextFlag
)
{
this
.
wechatImageTextEdit
();
}
...
...
@@ -505,7 +507,7 @@ export default {
.
then
(
res
=>
{
this
.
loading
=
false
;
if
(
res
.
errorCode
===
0
)
{
this
.
$tips
({
type
:
'success'
,
message
:
res
.
message
||
'操作
成功'
});
this
.
$tips
({
type
:
'success'
,
message
:
this
.
$route
.
meta
.
type
==
'edit'
?
'编辑群发成功'
:
'新建群发
成功'
});
setTimeout
(
_
=>
{
if
(
this
.
imgTextFlag
)
{
// 图片使用时跳转到图片列表
...
...
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