Ver código fonte

✨ feat: 广告组合: 新建广告组合移除多余项和请求参数传递

WanGxC 1 ano atrás
pai
commit
20bc36b316

+ 8 - 1
src/views/adManage/portfolios/api.ts

@@ -1,5 +1,11 @@
 import { request } from '/@/utils/service'
 import { AddReq, DelReq, EditReq, InfoReq, UserPageQuery } from '@fast-crud/fast-crud'
+import {storeToRefs} from 'pinia'
+import {useShopInfo} from '/@/stores/shopInfo'
+
+const shopInfo = useShopInfo()
+const {profile} = storeToRefs(shopInfo)
+
 
 export const apiPrefix = '/api/ad_manage/portfolios/'
 export function GetList(query: UserPageQuery) {
@@ -24,10 +30,11 @@ export function GetObj(id: InfoReq) {
 }
 
 export function AddObj(obj: AddReq) {
+	const updatedObj = { ...obj, profileId: profile.value.profile_id };
 	return request({
 		url: apiPrefix,
 		method: 'post',
-		data: obj,
+		data: updatedObj,
 	})
 }
 

+ 48 - 12
src/views/adManage/utils/commonTabColumn.tsx

@@ -26,7 +26,10 @@ export const BaseColumn = {
           return '--'
         }
       }
-    }
+    },
+    form: {
+      show: false,
+    },
   },
   Click: {
     title: '点击量',
@@ -46,7 +49,10 @@ export const BaseColumn = {
             </span>
         )
       }
-    }
+    },
+    form: {
+      show: false,
+    },
   },
   CTR: {
     title: '点击率',
@@ -66,7 +72,10 @@ export const BaseColumn = {
             </span>
         )
       }
-    }
+    },
+    form: {
+      show: false,
+    },
   },
   Spend: {
     title: '花费',
@@ -88,7 +97,10 @@ export const BaseColumn = {
             </span>
         )
       }
-    }
+    },
+    form: {
+      show: false,
+    },
   },
   CPC: {
     title: '点击成本',
@@ -108,7 +120,10 @@ export const BaseColumn = {
             </span>
         )
       }
-    }
+    },
+    form: {
+      show: false,
+    },
   },
   TotalPurchases: {
     title: '订单数',
@@ -139,7 +154,10 @@ export const BaseColumn = {
             </span>
         )
       }
-    }
+    },
+    form: {
+      show: false,
+    },
   },
   TotalUnitOrdered: {
     title: '销量',
@@ -170,7 +188,10 @@ export const BaseColumn = {
             </span>
         )
       }
-    }
+    },
+    form: {
+      show: false,
+    },
   },
   TotalSales: {
     title: '销售额',
@@ -201,7 +222,10 @@ export const BaseColumn = {
             </span>
         )
       }
-    }
+    },
+    form: {
+      show: false,
+    },
   },
   PurchasesRate: {
     title: '转化率',
@@ -223,7 +247,10 @@ export const BaseColumn = {
             </span>
         )
       }
-    }
+    },
+    form: {
+      show: false,
+    },
   },
   ACOS: {
     title: 'ACOS',
@@ -243,7 +270,10 @@ export const BaseColumn = {
             </span>
         )
       }
-    }
+    },
+    form: {
+      show: false,
+    },
   },
   ROAS: {
     title: 'ROAS',
@@ -263,7 +293,10 @@ export const BaseColumn = {
             </span>
         )
       }
-    }
+    },
+    form: {
+      show: false,
+    },
   },
   CPA: {
     title: '订单成本',
@@ -283,7 +316,10 @@ export const BaseColumn = {
             </span>
         )
       }
-    }
+    },
+    form: {
+      show: false,
+    },
   },
 }
 

+ 23 - 23
src/views/productCenter/productAnalysis/index.vue

@@ -5,7 +5,7 @@ import DataTable from '/@/views/productCenter/productAnalysis/components/DataTab
 import TopParentAsin from './components/TopParentAsin/index.vue'
 import TrendOverview from './components/TrendOverview/index.vue'
 import SalesOverview from './components/SalesOverview/index.vue'
-import CpRecommendations from './components/CpRecommendations/index.vue'
+// import CpRecommendations from './components/CpRecommendations/index.vue'
 import DateRangePicker from '/@/components/DateRangePicker/index.vue'
 import { usePublicData } from '/@/stores/publicData'
 import { useShopInfo } from '/@/stores/shopInfo'
@@ -21,29 +21,29 @@ provide('dateRange', dateRange)
 provide('profile', profile)
 
 const activeName = ref('trendOverview')
-const filter1 = ref('')
-const options1 = [
-  {
-    value: 'Option1',
-    label: 'Option1',
-  },
-  {
-    value: 'Option2',
-    label: 'Option2',
-  },
-]
+// const filter1 = ref('')
+// const options1 = [
+//   {
+//     value: 'Option1',
+//     label: 'Option1',
+//   },
+//   {
+//     value: 'Option2',
+//     label: 'Option2',
+//   },
+// ]
 
-const filter2 = ref('')
-const options2 = [
-  {
-    value: 'Option1',
-    label: 'Option1',
-  },
-  {
-    value: 'Option2',
-    label: 'Option2',
-  },
-]
+// const filter2 = ref('')
+// const options2 = [
+//   {
+//     value: 'Option1',
+//     label: 'Option1',
+//   },
+//   {
+//     value: 'Option2',
+//     label: 'Option2',
+//   },
+// ]
 
 const updatedData = ref([])
 provide('tableData', updatedData)