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
34d2cefa
Commit
34d2cefa
authored
Dec 18, 2021
by
caoyanzhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: 微信图文升级
parent
8973d15f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
14 deletions
+32
-14
index.vue
src/components/libs/imgTextTemp/index.vue
+12
-3
syncImgtext.vue
src/components/libs/imgTextTemp/syncImgtext.vue
+19
-10
wechat.js
src/router/modules/wechat.js
+1
-1
No files found.
src/components/libs/imgTextTemp/index.vue
View file @
34d2cefa
...
...
@@ -5,6 +5,7 @@
图文消息(共
{{
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"
:true-label=
"3"
:false-label=
"1"
label=
"仅看历史图文"
border
@
change=
"loadImgTextList"
/>
</div>
<div>
<el-button
type=
"primary"
@
click=
"add"
>
新建图文
</el-button>
...
...
@@ -53,7 +54,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
:show
.
sync=
"syncImgTextShow"
></sync-imgtext>
<sync-imgtext
:
wxsc-type=
"wxscType"
:
show
.
sync=
"syncImgTextShow"
></sync-imgtext>
</section>
</template>
...
...
@@ -92,16 +93,24 @@ export default {
}
},
created
()
{
this
.
$store
.
commit
(
'mutations_layoutTips'
,
`<div class="layout--tips">
<i class="el-icon-info"></i>因为在微信公众后台发布的图文会从草稿箱转移到发表记录,若在微信公众后台有发布操作,建议在达摩侧的草稿箱检查同步
</div>`
);
this
.
loadImgTextList
();
},
data
()
{
return
{
wxscType
:
'4'
,
textImgList
:
[],
listParams
:
{
currentPage
:
1
,
pageSize
:
20
,
searchName
:
''
,
showSelfFlag
:
this
.
showSelfFlag
||
''
showSelfFlag
:
this
.
showSelfFlag
||
''
,
wxscType
:
''
},
total
:
0
,
loading
:
false
,
...
...
@@ -166,7 +175,7 @@ export default {
this
.
$emit
(
'get-data'
,
{
imageTextId
:
row
.
imageTextId
,
imageTextWechatId
:
row
.
imageTextWechatId
});
},
add
()
{
this
.
$router
.
push
(
'/wechat/editor'
);
this
.
$router
.
push
(
`/wechat/editor?type=
${
this
.
wxscType
}
`
);
},
editData
(
row
)
{
this
.
$router
.
push
(
'/wechat/editor/'
+
row
.
imageTextId
);
...
...
src/components/libs/imgTextTemp/syncImgtext.vue
View file @
34d2cefa
<
template
>
<el-dialog
class=
"sync-imgtext__dialog"
title=
"同步微信图文"
:visible
.
sync=
"show"
width=
"30%"
:before-close=
"close"
v-loading=
"loading"
>
<div
class=
"gic-modal-bd
text-center
"
>
<el-dialog
class=
"sync-imgtext__dialog"
title=
"同步微信
草稿箱
图文"
: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>
微信
草稿箱里的
图文共
<span>
{{
count
}}
</span>
条
<span
@
click=
"getSyncInfo"
class=
"blue"
style=
"margin-left:10px;"
>
刷新
</span>
</p>
<p
class=
"gray fz12"
>
同步全部图文可能会需要比较久的时间,请耐心等待
</p>
<div
style=
"margin-bottom: 10px"
>
同步条数:
<el-select
style=
"width: 160px"
v-if=
"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>
<p
class=
"gray fz12"
>
同步全部图文可能会需要比较久的时间,请耐心等待...
</p>
</div>
</div>
<div
class=
"text-center pt20"
>
<el-select
class=
"w100"
v-if=
"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>
<template
slot=
"footer"
>
<el-button
@
click=
"close"
>
取消
</el-button>
<el-button
v-if=
"loadStatus === 1"
type=
"primary"
@
click=
"syncWechat()"
>
立即同步
</el-button>
<el-button
v-if=
"loadStatus === 0"
type=
"primary"
:loading=
"true"
>
同步中
</el-button>
<el-button
v-if=
"loadStatus === 3"
icon=
"el-icon-error"
type=
"danger"
>
同步失败
</el-button>
</
div
>
</
template
>
</el-dialog>
</template>
<
script
>
...
...
@@ -25,6 +29,11 @@ export default {
show
:
{
type
:
Boolean
,
default
:
false
},
// 4:草稿列表 5:发布列表
wxscType
:
{
type
:
[
Number
,
String
],
default
:
''
}
},
watch
:
{
...
...
@@ -57,7 +66,7 @@ export default {
async
syncWechat
()
{
this
.
loadStatus
=
0
;
const
num
=
this
.
size
===
999999
?
this
.
count
:
this
.
size
;
let
res
=
await
syncWechatImageText
({
num
});
let
res
=
await
syncWechatImageText
({
num
,
wxscType
:
this
.
wxscType
});
if
(
num
<=
20
&&
res
.
errorCode
===
0
)
{
this
.
$tips
({
type
:
'success'
,
message
:
'同步成功'
});
this
.
loadStatus
=
1
;
...
...
src/router/modules/wechat.js
View file @
34d2cefa
...
...
@@ -87,7 +87,7 @@ export default {
children
:
[
{
path
:
'imgtext'
,
name
:
'图文'
,
name
:
'图文
草稿箱
'
,
component
:
()
=>
import
(
/* webpackChunkName: "wechat" */
'../../components/libs/imgTextTemp/index.vue'
),
meta
:
{
path
:
'/wechat/temp/imgtext'
...
...
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