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
48fe078b
Commit
48fe078b
authored
May 24, 2021
by
黑潮
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: 判断资源过期
parent
fe0fd4c4
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
81 additions
and
25 deletions
+81
-25
index.html
index.html
+1
-1
form.js
src/views/ecm/form.js
+6
-1
index.css
src/views/ecm/marketing-event/assets/style/index.css
+7
-0
item-image.vue
src/views/ecm/marketing-event/components/item-image.vue
+2
-1
item-message.vue
src/views/ecm/marketing-event/components/item-message.vue
+2
-1
item-teletext.vue
src/views/ecm/marketing-event/components/item-teletext.vue
+2
-1
item-wxa.vue
src/views/ecm/marketing-event/components/item-wxa.vue
+2
-1
material-item.vue
src/views/ecm/marketing-event/components/material-item.vue
+30
-0
index.vue
src/views/ecm/marketing-event/index.vue
+29
-19
No files found.
index.html
View file @
48fe078b
...
...
@@ -42,6 +42,6 @@
<script
src=
"//web-1251519181.file.myqcloud.com/components/card.2.0.20.js"
></script>
<!-- 卡券弹窗 -->
<script
src=
"//web-1251519181.file.myqcloud.com/components/radio-transfer.1.0.13.js"
></script>
<!-- 单选穿梭框 -->
<script
src=
"//web-1251519181.file.myqcloud.com/components/steps.1.0.1.js"
></script>
<script
src=
"//web-1251519181.file.myqcloud.com/components/material.1.0.
5
.js"
></script>
<script
src=
"//web-1251519181.file.myqcloud.com/components/material.1.0.
6
.js"
></script>
</body>
</html>
src/views/ecm/form.js
View file @
48fe078b
...
...
@@ -307,7 +307,11 @@ export default {
if
(
result
&&
!
this
.
isInit
)
{
this
.
onlineStatus
=
result
.
onlineStatus
;
this
.
creatorId
=
res
.
result
.
ecmDTO
.
creatorId
;
this
.
ecmPlanId
=
this
.
form
.
ecmPlanId
=
result
.
ecmPlanId
||
''
;
if
(
this
.
isCopy
)
{
this
.
ecmPlanId
=
res
.
result
.
templateEcmPlanId
||
''
;
}
else
{
this
.
ecmPlanId
=
this
.
form
.
ecmPlanId
=
result
.
ecmPlanId
||
''
;
}
this
.
form
.
ecmPlanName
=
result
.
ecmPlanName
;
this
.
form
.
effectType
=
result
.
effectType
;
const
effectTime
=
result
.
effectTime
==
''
||
result
.
effectTime
==
undefined
?
0
:
result
.
effectTime
;
...
...
@@ -601,6 +605,7 @@ export default {
if
(
this
.
form
.
effectType
==
2
)
{
// 单次
this
.
expireType
=
0
;
if
(
this
.
form
.
execType
==
0
)
{
// 定时
const
execTime
=
this
.
form
.
execTime
;
...
...
src/views/ecm/marketing-event/assets/style/index.css
View file @
48fe078b
...
...
@@ -472,3 +472,10 @@
margin
:
0
10px
;
color
:
#303133
;
}
.dm__is-delete
{
display
:
inline-block
;
border
:
1px
solid
rgba
(
228
,
231
,
237
,
1
);
border-radius
:
4px
;
color
:
#303133
;
padding
:
20px
;
}
src/views/ecm/marketing-event/components/item-image.vue
View file @
48fe078b
<
template
>
<span
class=
"dm-image__item__wrap"
>
<div
class=
"dm__is-delete"
v-if=
"item.status == 0"
>
图片-已删除
</div>
<span
v-else
class=
"dm-image__item__wrap"
>
<img
:src=
"item.qcloudImageUrl || loadErrorImg"
alt=
""
/>
</span>
</
template
>
...
...
src/views/ecm/marketing-event/components/item-message.vue
View file @
48fe078b
<
template
>
<span
class=
"dm-message__item__wrap"
>
<div
class=
"dm__is-delete"
v-if=
"item.status == 0"
>
短信模板-已删除
</div>
<span
v-else
class=
"dm-message__item__wrap"
>
<div
class=
"dm-message__item"
>
<p
class=
"dm-message__item--title"
>
{{
item
.
title
||
'该短信模板已删除'
}}
</p>
<p
class=
"dm-message__item--content"
>
{{
item
.
content
||
'--'
}}
</p>
...
...
src/views/ecm/marketing-event/components/item-teletext.vue
View file @
48fe078b
<
template
>
<div
class=
"dm-imgText__item__wrap"
>
<div
class=
"dm__is-delete"
v-if=
"item.status == 0"
>
图文-已删除
</div>
<div
v-else
class=
"dm-imgText__item__wrap"
>
<div
v-for=
"(v, i) in item.itemList"
:key=
"i"
>
<div
class=
"dm-imgText__item"
v-if=
"i === 0"
@
mouseover=
"itemMouseover(v)"
@
mouseout=
"itemMouseout(v)"
>
<div
class=
"dm-imgText__item__mask"
v-if=
"v.maskShow"
@
click=
"preview(v)"
>
预览文章
</div>
...
...
src/views/ecm/marketing-event/components/item-wxa.vue
View file @
48fe078b
<
template
>
<div
class=
"dm-wxa__item__wrap"
@
mouseover=
"maskShow = true"
@
mouseout=
"maskShow = false"
>
<div
class=
"dm__is-delete"
v-if=
"item.status == 0"
>
小程序链接-已删除
</div>
<div
v-else
class=
"dm-wxa__item__wrap"
@
mouseover=
"maskShow = true"
@
mouseout=
"maskShow = false"
>
<div
class=
"dm-wxa__item"
>
<div
class=
"dm-wxa__avatar"
>
<img
:src=
"item.brandLogo || loadErrorImg"
alt=
""
/>
...
...
src/views/ecm/marketing-event/components/material-item.vue
View file @
48fe078b
...
...
@@ -26,6 +26,18 @@
<img
style=
"width:36px;height:36px;margin-left:15px"
:src=
"fileImg"
/>
<span
class=
"file__title"
>
{{ item.title }}
</span>
</div>
<
template
v-else-if=
"item.type == 6"
>
<div
class=
"wxa"
>
<img
style=
"width:56px;height:56px"
:src=
"item.img"
/>
<div
style=
"margin-left:10px;flex:1;min-width:0"
>
<div
style=
"display:flex;align-items:center"
>
<img
style=
"width:14px;height:14px;margin-right:4px"
src=
"../assets/img/wxa-circle.svg"
/>
<div
class=
"wxa_title"
>
{{
item
.
title
}}
</div>
</div>
<div
class=
"wxa_content"
>
{{
item
.
content
}}
</div>
</div>
</div>
</
template
>
</div>
</template>
...
...
@@ -142,4 +154,22 @@ img {
height
:
56px
;
width
:
56px
;
}
.wxa
{
margin-top
:
21px
;
display
:
flex
;
align-items
:
center
;
&_content
{
margin-top
:
10px
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
&
_title
{
min-width
:
0
;
flex
:
1
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
}
</
style
>
src/views/ecm/marketing-event/index.vue
View file @
48fe078b
...
...
@@ -243,19 +243,39 @@ export default {
// },
// },
list
()
{
if
(
this
.
list
.
some
(
item
=>
item
.
comName
===
'item-grade'
||
item
.
comName
===
'item-qfxx'
))
{
if
(
this
.
list
.
some
(
item
=>
item
.
comName
===
'item-grade'
))
{
this
.
options
.
forEach
(
item
=>
{
if
(
item
.
value
==
'grade'
||
item
.
value
==
'qfxx'
)
{
if
(
item
.
value
==
'grade'
)
{
item
.
disabled
=
true
;
}
});
}
else
{
this
.
options
.
forEach
(
item
=>
{
if
(
item
.
value
==
'grade'
||
item
.
value
==
'qfxx'
)
{
if
(
item
.
value
==
'grade'
)
{
item
.
disabled
=
false
;
}
});
}
if
(
this
.
list
.
some
(
item
=>
item
.
comName
===
'item-qfxx'
))
{
this
.
options
.
forEach
(
item
=>
{
if
(
item
.
value
==
'qfxx'
)
{
item
.
disabled
=
true
;
}
});
}
else
{
this
.
options
.
forEach
(
item
=>
{
if
(
item
.
value
==
'qfxx'
)
{
item
.
disabled
=
false
;
}
});
}
this
.
hasDeleted
=
this
.
list
.
some
(
el
=>
el
.
item
.
status
==
0
);
this
.
hasMaterialDeleted
=
this
.
list
.
filter
(
el
=>
el
.
marketingType
==
'qfxx'
)
.
some
(
el
=>
{
let
item
=
JSON
.
parse
(
el
.
qfxx
.
chatContent
);
return
item
.
statusFlag
==
0
;
});
}
},
methods
:
{
...
...
@@ -288,37 +308,27 @@ export default {
this
.
list
=
[];
let
result
=
res
.
result
.
typeRelationList
||
[];
let
brandInfo
=
res
.
result
.
enterprise
||
{};
if
(
result
.
some
(
el
=>
el
.
status
===
0
))
{
this
.
hasDeleted
=
true
;
}
else
{
result
.
filter
(
el
=>
el
.
marketingType
==
'qfxx'
)
.
some
(
el
=>
{
let
item
=
JSON
.
parse
(
el
.
qfxx
.
chatContent
);
return
item
.
statusFlag
==
0
;
})
&&
(
this
.
hasMaterialDeleted
=
true
);
}
// 八种类型 处理
result
.
map
(
v
=>
{
switch
(
v
.
marketingType
)
{
case
'teletext'
:
// 1 图文
this
.
list
.
push
({
comName
:
'item-teletext'
,
item
:
{
...
v
.
imageText
,
ecmMarketingTypeRelationId
:
v
.
ecmMarketingTypeRelationId
,
relationId
:
v
.
relationId
,
ecmPlanId
:
v
.
ecmPlanId
}
});
this
.
list
.
push
({
comName
:
'item-teletext'
,
item
:
{
...
v
.
imageText
,
ecmMarketingTypeRelationId
:
v
.
ecmMarketingTypeRelationId
,
relationId
:
v
.
relationId
,
ecmPlanId
:
v
.
ecmPlanId
,
status
:
v
.
status
}
});
break
;
case
'text'
:
// 2 文本
this
.
list
.
push
({
comName
:
'item-text'
,
item
:
{
...
v
.
text
,
ecmMarketingTypeRelationId
:
v
.
ecmMarketingTypeRelationId
,
relationId
:
v
.
relationId
,
ecmPlanId
:
v
.
ecmPlanId
}
});
break
;
case
'wxa'
:
// 3 小程序
this
.
list
.
push
({
comName
:
'item-wxa'
,
item
:
{
...
v
.
wxa
,
ecmMarketingTypeRelationId
:
v
.
ecmMarketingTypeRelationId
,
relationId
:
v
.
relationId
,
ecmPlanId
:
v
.
ecmPlanId
,
brandLogo
:
brandInfo
.
qcloudImageUrl
,
brandName
:
brandInfo
.
brandName
}
});
this
.
list
.
push
({
comName
:
'item-wxa'
,
item
:
{
...
v
.
wxa
,
ecmMarketingTypeRelationId
:
v
.
ecmMarketingTypeRelationId
,
relationId
:
v
.
relationId
,
ecmPlanId
:
v
.
ecmPlanId
,
brandLogo
:
brandInfo
.
qcloudImageUrl
,
brandName
:
brandInfo
.
brandName
,
status
:
v
.
status
}
});
break
;
case
'card'
:
// 5 卡券
this
.
list
.
push
({
comName
:
'item-card'
,
item
:
{
...
v
.
card
,
ecmMarketingTypeRelationId
:
v
.
ecmMarketingTypeRelationId
,
relationId
:
v
.
relationId
,
ecmPlanId
:
v
.
ecmPlanId
,
brandLogo
:
brandInfo
.
qcloudImageUrl
}
});
break
;
case
'image'
:
// 4 图片
this
.
list
.
push
({
comName
:
'item-image'
,
item
:
{
...
v
.
image
,
ecmMarketingTypeRelationId
:
v
.
ecmMarketingTypeRelationId
,
relationId
:
v
.
relationId
,
ecmPlanId
:
v
.
ecmPlanId
}
});
this
.
list
.
push
({
comName
:
'item-image'
,
item
:
{
...
v
.
image
,
ecmMarketingTypeRelationId
:
v
.
ecmMarketingTypeRelationId
,
relationId
:
v
.
relationId
,
ecmPlanId
:
v
.
ecmPlanId
,
status
:
v
.
status
}
});
break
;
case
'message'
:
// 6 短信
const
sms
=
v
.
sms
||
{};
this
.
list
.
push
({
comName
:
'item-message'
,
item
:
{
...
sms
,
ecmMarketingTypeRelationId
:
v
.
ecmMarketingTypeRelationId
,
relationId
:
v
.
relationId
,
ecmPlanId
:
v
.
ecmPlanId
}
});
this
.
list
.
push
({
comName
:
'item-message'
,
item
:
{
...
sms
,
ecmMarketingTypeRelationId
:
v
.
ecmMarketingTypeRelationId
,
relationId
:
v
.
relationId
,
ecmPlanId
:
v
.
ecmPlanId
,
status
:
v
.
status
}
});
break
;
case
'teltask'
:
// 7 话务
this
.
list
.
push
({
comName
:
'item-teltask'
,
item
:
{
...
v
.
teltask
,
ecmMarketingTypeRelationId
:
v
.
ecmMarketingTypeRelationId
,
relationId
:
v
.
relationId
,
ecmPlanId
:
v
.
ecmPlanId
}
});
...
...
@@ -330,10 +340,10 @@ export default {
case
'grade'
:
// 9 会员卡升级
this
.
list
.
push
({
comName
:
'item-grade'
,
item
:
{
title
:
v
.
title
,
ecmMarketingTypeRelationId
:
v
.
ecmMarketingTypeRelationId
,
relationId
:
v
.
relationId
,
ecmPlanId
:
v
.
ecmPlanId
}
});
break
;
case
'qywx'
:
//
8 积分
case
'qywx'
:
//
10 企微任务
this
.
list
.
push
({
comName
:
'item-qywx'
,
item
:
{
title
:
v
.
title
,
qywx
:
v
.
qywx
,
ecmMarketingTypeRelationId
:
v
.
ecmMarketingTypeRelationId
,
relationId
:
v
.
relationId
,
ecmPlanId
:
v
.
ecmPlanId
}
});
break
;
case
'qfxx'
:
//
8 积分
case
'qfxx'
:
//
11 群发消息
this
.
list
.
push
({
comName
:
'item-qfxx'
,
item
:
{
title
:
v
.
title
,
qfxx
:
v
.
qfxx
,
ecmMarketingTypeRelationId
:
v
.
ecmMarketingTypeRelationId
,
relationId
:
v
.
relationId
,
ecmPlanId
:
v
.
ecmPlanId
}
});
break
;
}
...
...
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