Browse Source

用户列表查看ecpm加上appId,收益接口请求放宽到60s

wangzhiqiang 2 months ago
parent
commit
5c34960416
3 changed files with 14 additions and 12 deletions
  1. 1 1
      .env.production
  2. 2 1
      src/api/userModule.js
  3. 11 10
      src/views/main/userModule/userList.vue

+ 1 - 1
.env.production

@@ -1,4 +1,4 @@
 ENV = 'production'
 
 # VITE_BASE_URL = 'http://119.45.71.139:25001'
-VITE_BASE_URL = 'http://advise.ytmdm.com/yt-gateway'
+VITE_BASE_URL = 'http://advise.ytmdm.com/gateway'

+ 2 - 1
src/api/userModule.js

@@ -59,7 +59,8 @@ export function getRevenueByTime(data) {
     return request({
         url: '/agent-service/appUser/getRevenueByTime',
         method: 'post',
-        data
+        data,
+        timeout: 60 * 1000
     })
 }
 

+ 11 - 10
src/views/main/userModule/userList.vue

@@ -15,7 +15,7 @@
         @selection-change="handleSelectionChange" @select-all="handleSelectAll" @select="handleSelect" :revenue="totalRevenue">
         <el-table-column prop="userId" label="查看ECPM" width="130" fixed="left">
           <template #default="scope">
-            <el-button type="primary" @click="lookEcpm(scope.row.userId)">查看ECPM</el-button>
+            <el-button type="primary" @click="lookEcpm(scope.row)">查看ECPM</el-button>
           </template>
         </el-table-column>
         <el-table-column prop="userId" label="用户ID" width="120" fixed="left" />
@@ -258,7 +258,7 @@
       dynamicFormItems1.value = [
         {
           label: '广告源类型',
-          prop: 'adSourceType',
+          prop: 'adsourceType',
           type: 'select',
           labelWidth: 100,
           options: getOptions('ad_source_type'),
@@ -587,18 +587,19 @@
 
   
   const formSearch1 = ref({
+    appId: undefined, // 应用ID
     userId: undefined, //用户ID
-    adSourceType: null,// 广告源类型
+    adsourceType: undefined,// 广告源类型
   });
 
   const handleFormSubmitted1 = (formData) => {
     // console.log("接收到子组件传递的数据", formData);
-    formSearch1.value.adSourceType = formData.adSourceType;
+    formSearch1.value.adsourceType = formData.adsourceType;
 
     lookEcpm();
   };
   const handleFormReset1 = () => {
-    delete formSearch1.value.adSourceType // 渠道来源
+    delete formSearch1.value.adsourceType // 渠道来源
 
     lookEcpm();
   };
@@ -606,13 +607,13 @@
   const ecpmTable = ref(null)
   const ecpmData = ref([])
 
-  const lookEcpm = async(userId)=> {
-    if(userId) {
-      formSearch1.value.userId = userId
-      // delete formSearch1.value.adSourceType
+  const lookEcpm = async(row)=> {
+    if(row) {
+      formSearch1.value.appId = row.appId
+      formSearch1.value.userId = row.userId
     }
     ecpmData.value = []
-    let res = await appUserEcpm({userId: formSearch1.value.userId,adsourceType: formSearch1.value.adSourceType })
+    let res = await appUserEcpm({...formSearch1.value})
     ecpmData.value = res.data
     ecpmLayer.value.show = true
   }