|
@@ -1,6 +1,12 @@
|
|
|
import { defHttp } from '/@/utils/http/axios';
|
|
|
-import { PageParams, RentListGetResultModel, SceneLiveItem, bindAnchorListParam } from './model';
|
|
|
-
|
|
|
+import {
|
|
|
+ PageParams,
|
|
|
+ RentListGetResultModel,
|
|
|
+ SceneLiveItem,
|
|
|
+ bindAnchorListParam,
|
|
|
+ GetAllSceneModel,
|
|
|
+} from './model';
|
|
|
+import { Result, UploadFileParams } from '/#/axios';
|
|
|
enum Api {
|
|
|
pageList = '/basic-api/brand/brandBindList',
|
|
|
bindAnchorList = '/zfb-api/zfb/shop/sys/user/bindList',
|
|
@@ -10,6 +16,8 @@ enum Api {
|
|
|
// bindUser = '/zfb-api/zfb/shop/sys/brand/bindUser',
|
|
|
bindUser = '/basic-api/brand/bindUser',
|
|
|
brandUpdate = '/basic-api/brand/update',
|
|
|
+ upload = '/basic-api/sys/oss/upload',
|
|
|
+ getAllScene = 'scene/getAllScene',
|
|
|
}
|
|
|
export type SceneLiveItemResult = SceneLiveItem;
|
|
|
/**
|
|
@@ -65,3 +73,27 @@ export const brandTypeListApi = (params: PageParams) =>
|
|
|
ignoreCancelToken: true,
|
|
|
},
|
|
|
});
|
|
|
+
|
|
|
+export function uploadLiveApi(
|
|
|
+ params: UploadFileParams,
|
|
|
+ onUploadProgress: (progressEvent: ProgressEvent) => void,
|
|
|
+) {
|
|
|
+ return defHttp.uploadFile<Result>(
|
|
|
+ {
|
|
|
+ url: Api.upload,
|
|
|
+ onUploadProgress,
|
|
|
+ },
|
|
|
+ params,
|
|
|
+ );
|
|
|
+}
|
|
|
+
|
|
|
+export const getAllSceneApi = (params: PageParams) => {
|
|
|
+ defHttp.get<GetAllSceneModel>({
|
|
|
+ url: Api.brandTypeList,
|
|
|
+ params,
|
|
|
+ headers: {
|
|
|
+ // @ts-ignore
|
|
|
+ ignoreCancelToken: true,
|
|
|
+ },
|
|
|
+ });
|
|
|
+};
|