Commit 984fbc81 by crushh

update: 场景展示替换为接口

parent 94b3cbe9
......@@ -90,7 +90,7 @@
</template>
<script>
import { page, rechargeCenter, stopActivityPlan, startActivityPlan, pageStatistics, aiAccountCheck, getAiCalcSingle, continueActivityPlan, suspendActivityPlan } from '@/service/api/aiApi.js';
import { page, rechargeCenter, stopActivityPlan, startActivityPlan, pageStatistics, aiAccountCheck, getAiCalcSingle, continueActivityPlan, suspendActivityPlan, aiDictList } from '@/service/api/aiApi.js';
import { formatDateTimeByType } from '@/utils/index.js';
import filterAvater from '@/mixins/filterAvater.js';
......@@ -213,40 +213,40 @@ export default {
}
}
],
cardContent: [
originCardContent: [
{
title: '客户生日',
scene: 1,
scene: '1',
iconName: 'icon-shengrizunxiang',
content: '针对生日客户进行营销,提高会员粘性'
},
{
title: '节日活动邀约',
scene: 2,
scene: '2',
iconName: 'icon-huodongyaoyue',
content: '节日活动邀约,会员专享权益,提升门店营业额'
},
{
title: '加企微好友',
scene: 3,
scene: '3',
iconName: 'icon-qiweihaoyou',
content: '针对未添加企微好友的客户进行营销,添加企微好友'
},
{
title: '客户复购',
scene: 4,
scene: '4',
iconName: 'icon-kehufugouguanli',
content: '针对消费过的客户进行营销,提升核心客户数量'
},
{
title: '其它场景',
scene: 0,
scene: '0',
iconName: 'icon-qitachangjing',
content: '自定义营销场景'
},
{
title: '开卡场景',
scene: 5,
scene: '5',
iconName: 'icon-kaika',
content: '针对非会员营销,提升开卡率'
}
......@@ -309,15 +309,17 @@ export default {
5: 'dm-status--warning',
6: 'dm-status--warning'
},
isWhite: false
isWhite: false,
cardContent: []
};
},
created() {
if (window.location.host != 'gicdev.demogic.com' && !window.location.host.includes('localhost')) {
this.cardContent.splice(2, 1);
}
},
// created() {
// if (window.location.host != 'gicdev.demogic.com' && !window.location.host.includes('localhost')) {
// this.cardContent.splice(2, 1);
// }
// },
mounted() {
this.getAiDictList();
this.getTableData();
this.getRechargeCenter();
this.getAiAccountCheck();
......@@ -397,6 +399,13 @@ export default {
}
},
methods: {
getAiDictList() {
aiDictList({ dictType: 'marketing_activity_scene' }).then(res => {
let arr = res.result || [];
let codeArr = arr.map(item => item.dict_code);
this.cardContent = this.originCardContent.filter(item => codeArr.includes(item.scene));
});
},
async getAiCalcSingle() {
const { result } = await getAiCalcSingle();
if (!result) return;
......
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