export default { getCustomCrowd (view, crowdId, crowdName) { crowdId = crowdId == null ? crowdId : crowdId.toString() let crowd const { all } = view.updater.get() // 店铺默认的四个特殊人群 // 0: 超级用户,1:潜客,2:新客,3:老客 if (all.SPECIAL_CROWD_IDS.includes(crowdId)) { if (crowdId == '0') { // 超级用户 crowd = { selects: [all.superConsumerTag, all.superConsumerTagShop] } } else { // 其他新客,老客,潜客 all.potentialConsumerTag.values = crowdId crowd = { selects: [all.potentialConsumerTag, all.potentialConsumerTagShop] } } } else { // 普通人群 crowd = { selects: [ { tagId: all.CROWD_TAG_ID, optionGroupId: all.CROWD_OPTIONGROUP_ID, values: crowdId, names: crowdName } ] } } return crowd }, // 渠道沉淀人群洞察的selectTagOptionSet getSubsideSelectTagOptionSet (crowd) { const TAG_ID = '170076' const set = { operator: 1, selects: [ { tagId: TAG_ID, optionGroupId: '47438', values: crowd.memberId.toString(), names: '商家memberId' }, { tagId: TAG_ID, optionGroupId: '47439', values: crowd.channelId.toString(), names: '渠道id' }, { tagId: TAG_ID, optionGroupId: '47440', values: crowd.destTypeId.toString(), names: '定向id' }, { tagId: TAG_ID, optionGroupId: '47441', values: crowd.period.toString(), names: '时间周期' } ] } return set } }