Commit 48fe078b by 黑潮

update: 判断资源过期

parent fe0fd4c4
......@@ -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>
......@@ -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;
......
......@@ -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;
}
<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>
......
<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>
......
<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>
......
<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="" />
......
......@@ -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>
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment