Commit f4bbf01a authored by shida.liu's avatar shida.liu

feat: 区分终端

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