Commit cc21d800 authored by 刘世达's avatar 刘世达

Merge branch 'feature-fix-miniapp-0901' into 'master'

feat: 区分终端

See merge request !109
parents 20c7bde2 f4bbf01a
......@@ -83,10 +83,10 @@ export default {
return;
}
// 判断填入的活动ID是否存在重复的渠道ID的情况
const normalKey = 'common';
const validArr = res.filter(item => item.activityTemplateType && item.activityTemplateType == 1);
const channel2Id = {};
validArr.map(item => {
let normalKey = 'common';
if (item.kaChannelNo) {
if (channel2Id[item.kaChannelNo]) {
const arr = channel2Id[item.kaChannelNo];
......@@ -96,6 +96,12 @@ export default {
channel2Id[item.kaChannelNo] = [item.id]
}
} else {
if (item.terminal === '2') {
normalKey = 'mini-app';
}
if (item.terminal === '1') {
normalKey = 'app';
}
if (channel2Id[normalKey]) {
const arr = channel2Id[normalKey];
arr.push(item.id);
......
......@@ -84,10 +84,10 @@ export default {
return;
}
// 判断填入的活动ID是否存在重复的渠道ID的情况
const normalKey = 'common';
const validArr = res.filter(item => item.activityTemplateType && item.activityTemplateType == 11);
const channel2Id = {};
validArr.map(item => {
let normalKey = 'common';
if (item.kaChannelNo) {
if (channel2Id[item.kaChannelNo]) {
const arr = channel2Id[item.kaChannelNo];
......@@ -97,6 +97,12 @@ export default {
channel2Id[item.kaChannelNo] = [item.id]
}
} else {
if (item.terminal === '2') {
normalKey = 'mini-app';
}
if (item.terminal === '1') {
normalKey = 'app';
}
if (channel2Id[normalKey]) {
const arr = channel2Id[normalKey];
arr.push(item.id);
......
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