Bläddra i källkod

素材新增指标

luojunhui 2 dagar sedan
förälder
incheckning
bb65c1c11a
6 ändrade filer med 8 tillägg och 41 borttagningar
  1. 2 0
      .gitignore
  2. 4 4
      src/api/recall.ts
  3. 1 1
      src/api/types.ts
  4. 1 1
      src/components/RecallResultTable.tsx
  5. 0 2
      vite.config.d.ts
  6. 0 33
      vite.config.js

+ 2 - 0
.gitignore

@@ -5,6 +5,8 @@ node_modules
 dist
 dist-ssr
 *.tsbuildinfo
+vite.config.js
+vite.config.d.ts
 
 # 本地配置(不覆盖正式 env)
 *.local

+ 4 - 4
src/api/recall.ts

@@ -119,7 +119,8 @@ export async function recallMaterialWithQuality(param: {
       finalScore: it.finalScore, conversionEfficiencyScore: it.conversionEfficiencyScore,
       revenueScore: it.revenueScore, viralScore: it.viralScore, engagementScore: it.engagementScore,
       cost7d: it.cost7d, targetConversion7d: it.targetConversion7d, totalConversion7d: it.totalConversion7d,
-      revenue7d: it.revenue7d, cpa7d: it.cpa7d, roas7d: it.roas7d, t0ViralRate7d: it.t0ViralRate7d,
+      revenue7d: it.revenue7d, ctr7d: it.ctr7d, cvr7d: it.cvr7d, viralRate7d: it.viralRate7d,
+      roi7d: it.roi7d, cpa7d: it.cpa7d, roas7d: it.roas7d, t0ViralRate7d: it.t0ViralRate7d,
       t0ViralCount7d: it.t0ViralCount7d, miniProgramOpenRate7d: it.miniProgramOpenRate7d,
       firstUv7d: it.firstUv7d, shareCount7d: it.shareCount7d, cost30d: it.cost30d,
       targetConversion30d: it.targetConversion30d, adOptimizationGoal: it.adOptimizationGoal,
@@ -145,12 +146,11 @@ export async function recallMaterialWithQuality(param: {
       rov: '--',
       videoDetail: null,
       articleDetail: null,
-      deconstruct: (it.deconstruct as any) ?? undefined,
+      deconstruct: it.deconstruct ?? undefined,
       materialDetail: modality === 'MATERIAL' ? {
-        deconstruct: (it.deconstruct as any) ?? undefined,
+        deconstruct: it.deconstruct ?? undefined,
         quality: quality ?? undefined,
       } : undefined,
-      quality,
     }
   })
 

+ 1 - 1
src/api/types.ts

@@ -200,7 +200,7 @@ export interface ScoredMaterial extends MaterialQualityInfo {
   title?: string
   cover?: string
   imageList?: string[]
-  deconstruct?: Record<string, unknown>
+  deconstruct?: VideoDetailDeconstruct
 }
 
 export interface RecallMaterialScoreVO {

+ 1 - 1
src/components/RecallResultTable.tsx

@@ -558,7 +558,7 @@ export default function RecallResultTable({
       },
     },
     {
-      title: '近7日曝光',
+      title: '近7日转化',
       key: 'q.totalConversion7d',
       width: 110,
       align: 'right',

+ 0 - 2
vite.config.d.ts

@@ -1,2 +0,0 @@
-declare const _default: import("vite").UserConfig;
-export default _default;

+ 0 - 33
vite.config.js

@@ -1,33 +0,0 @@
-import { defineConfig } from 'vite';
-import react from '@vitejs/plugin-react';
-// 后端运行在 8080,前端开发期通过代理避免跨域
-export default defineConfig({
-    plugins: [react()],
-    base: '/content-similarity-recall/', // CDN 部署路径
-    server: {
-        port: 5173,
-        host: true,
-        proxy: {
-            '/videoVector': {
-                target: 'https://api-internal.piaoquantv.com',
-                // target: 'http://localhost:8080',
-                changeOrigin: true,
-                secure: false,
-                configure: function (proxy) {
-                    proxy.on('error', function (err, req) {
-                        // 把 AggregateError.errors 全部展开, 看每个 IP 的真实失败原因
-                        var inner = err === null || err === void 0 ? void 0 : err.errors;
-                        // eslint-disable-next-line no-console
-                        console.error('[proxy error]', req === null || req === void 0 ? void 0 : req.method, req === null || req === void 0 ? void 0 : req.url, '\n  name:', err === null || err === void 0 ? void 0 : err.name, '\n  code:', err === null || err === void 0 ? void 0 : err.code, '\n  msg:', err === null || err === void 0 ? void 0 : err.message, '\n  inner:', Array.isArray(inner)
-                            ? inner.map(function (e) { return "".concat(e === null || e === void 0 ? void 0 : e.code, "@").concat(e === null || e === void 0 ? void 0 : e.address, ":").concat(e === null || e === void 0 ? void 0 : e.port, " ").concat(e === null || e === void 0 ? void 0 : e.message); }).join(' | ')
-                            : 'none');
-                    });
-                    proxy.on('proxyReq', function (_pReq, req) {
-                        // eslint-disable-next-line no-console
-                        console.log('[proxy req]', req === null || req === void 0 ? void 0 : req.method, req === null || req === void 0 ? void 0 : req.url);
-                    });
-                },
-            },
-        },
-    },
-});