gemercheung 3 роки тому
батько
коміт
95b38bcee6
2 змінених файлів з 53 додано та 9 видалено
  1. 11 1
      src/api/scene/live.ts
  2. 42 8
      src/views/scenes/live.vue

+ 11 - 1
src/api/scene/live.ts

@@ -4,7 +4,8 @@ import { PageParams, RentListGetResultModel, SceneLiveItem } from './model';
 enum Api {
   pageList = '/basic-api/brand/brandBindList',
   bindAnchorList = '/zfb-api/zfb/shop/sys/user/bindList',
-  brandTypeList = '/zfb-api/zfb/shop/brand/brandTypeList',
+  // brandTypeList = '/zfb-api/zfb/shop/brand/brandTypeList',
+  brandTypeList = '/basic-api//brand/brandTypeList',
 }
 export type SceneLiveItemResult = SceneLiveItem;
 /**
@@ -29,3 +30,12 @@ export const bindAnchorListApi = (params: PageParams) =>
       ignoreCancelToken: true,
     },
   });
+export const brandTypeListApi = (params: PageParams) =>
+  defHttp.get<RentListGetResultModel>({
+    url: Api.brandTypeList,
+    params,
+    headers: {
+      // @ts-ignore
+      ignoreCancelToken: true,
+    },
+  });

+ 42 - 8
src/views/scenes/live.vue

@@ -87,7 +87,7 @@ updateUserId: null -->
   // import { uploadApi } from '/@/api/sys/upload';
   import { Switch } from 'ant-design-vue';
   import { h } from 'vue';
-  import { ListApi } from '/@/api/scene/live';
+  import { ListApi, brandTypeListApi } from '/@/api/scene/live';
   import { useI18n } from '/@/hooks/web/useI18n';
   import { useModal } from '/@/components/Modal';
   import bindModal from './bindModal.vue';
@@ -182,22 +182,56 @@ updateUserId: null -->
         labelWidth: 100,
         schemas: [
           {
-            field: 'id',
-            label: 'id',
+            field: 'sceneName',
+            label: '直播间名称',
             component: 'Input',
             colProps: {
-              xl: 3,
-              xxl: 3,
+              xl: 5,
+              xxl: 5,
             },
           },
           {
-            field: 'userName',
-            label: '企业账号',
-            component: 'Input',
+            field: 'type',
+            label: '类型',
+            component: 'ApiSelect',
             colProps: {
               xl: 12,
               xxl: 8,
             },
+            componentProps: {
+              api: brandTypeListApi,
+              resultField: 'list',
+              labelField: 'name',
+              valueField: 'id',
+              params: {
+                page: 1,
+                limit: 1000,
+              },
+            },
+          },
+          {
+            field: 'livestreamStatus',
+            label: '是否开播',
+            component: 'Select',
+            componentProps: {
+              options: [
+                {
+                  label: '全部',
+                  value: '',
+                  key: '1',
+                },
+                {
+                  label: '是',
+                  value: '',
+                  key: '2',
+                },
+                {
+                  label: '否',
+                  value: '0',
+                  key: '2',
+                },
+              ],
+            },
           },
         ],
       };