|
@@ -29,7 +29,7 @@ import { computed, inject, onMounted, ref, watch } from 'vue'
|
|
|
import { createDisabledOptions } from '../../../utils/dropdowndisable'
|
|
|
import TextSelector from '/@/components/TextSelector/index.vue'
|
|
|
import { useShopInfo } from '/@/stores/shopInfo'
|
|
|
-import { getAdStructureData } from '/@/views/adManage/sd/targets/api'
|
|
|
+import { getAdStructureData } from '/@/views/adManage/sd/audiences/api'
|
|
|
import { barOptions1, barOptions2, barOptionsMap } from '/@/views/adManage/utils/enum'
|
|
|
|
|
|
const shopInfo = useShopInfo()
|
|
@@ -80,12 +80,12 @@ let xAxisMapList
|
|
|
|
|
|
async function initBarData() {
|
|
|
responseData = await setAdStructureData()
|
|
|
- barData = responseData
|
|
|
+ barData = responseData.target_data
|
|
|
// 柱状图初始化数据
|
|
|
ACOSList = barData.map((item) => item.ACOS)
|
|
|
SpendList = barData.map((item) => item.Spend)
|
|
|
// 将x轴映射为中文
|
|
|
- xAxisList = barData.map((item) => item.Classification)
|
|
|
+ xAxisList = barData.map((item) => item.Name)
|
|
|
const classificationMap = {
|
|
|
BROAD: '关键词-广泛',
|
|
|
category: '品类',
|
|
@@ -96,6 +96,9 @@ async function initBarData() {
|
|
|
'loose-match': '广泛匹配',
|
|
|
substitutes: '同类商品',
|
|
|
complements: '关联商品',
|
|
|
+ views: '浏览再营销',
|
|
|
+ purchases: '购买再营销',
|
|
|
+ audience: '受众',
|
|
|
}
|
|
|
xAxisMapList = xAxisList.map((item) => classificationMap[item])
|
|
|
loading.value = false
|