123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165 |
- import { defHttp } from '/@/utils/http/axios';
- import {
- PageParams,
- InfoParams,
- RentListGetResultModel,
- SceneLiveItem,
- bindAnchorListParam,
- GetAllSceneModel,
- // SceneLiveModel,
- } from './model';
- import { Result, UploadFileParams } from '/#/axios';
- enum Api {
- pageList = '/zfb-api/zfb/brand/brandBindList',
- bindAnchorList = '/zfb-api/zfb/shop/sys/user/bindList',
- olderBindAnchorList = '/zfb-api/zfb/sys/user/bindList',
- // brandTypeList = '/zfb-api/zfb/shop/brand/brandTypeList',
- brandTypeList = '/zfb-api/zfb/brand/brandTypeList',
- // bindUser = '/zfb-api/zfb/shop/sys/brand/bindUser',
- bindUser = '/zfb-api/zfb/brand/bindUser',
- brandUpdate = '/zfb-api/zfb/brand/update',
- brandDelete = '/zfb-api/zfb/brand/delete',
- upload = '/zfb-api/zfb/sys/oss/upload',
- uploadVideo = '/zfb-api/zfb/sys/oss/upLoadVideo',
- getAllScene = '/zfb-api/zfb/scene/list',
- getBrandInfo = '/zfb-api/zfb/brand/info',
- addSave = '/zfb-api/zfb/brand/save',
- }
- export type SceneLiveItemResult = SceneLiveItem;
- /**
- * @description: Get sample list value
- */
- export const ListApi = (params: PageParams) =>
- defHttp.get<RentListGetResultModel>({
- url: Api.pageList,
- params,
- headers: {
- // @ts-ignore
- ignoreCancelToken: true,
- },
- });
- export const bindOldAnchorListApi = (params: bindAnchorListParam) =>
- defHttp.post<RentListGetResultModel>({
- url: Api.olderBindAnchorList,
- params: params,
- data: params,
- headers: {
- // @ts-ignore
- ignoreCancelToken: true,
- },
- });
- export const bindAnchorListApi = (params: bindAnchorListParam) =>
- defHttp.post<RentListGetResultModel>({
- url: Api.bindAnchorList,
- params: params,
- data: params,
- headers: {
- // @ts-ignore
- ignoreCancelToken: true,
- },
- });
- export const bindUserApi = (params: any) =>
- defHttp.post<RentListGetResultModel>({
- url: Api.bindUser,
- params: params,
- // data: params,
- headers: {
- // @ts-ignore
- ignoreCancelToken: true,
- },
- });
- export const brandTypeListApi = (params: PageParams) =>
- defHttp.get<RentListGetResultModel>({
- url: Api.brandTypeList,
- params,
- headers: {
- // @ts-ignore
- ignoreCancelToken: true,
- },
- });
- export function uploadLiveApi(
- params: UploadFileParams,
- // onUploadProgress: (progressEvent: ProgressEvent) => void,
- ) {
- return defHttp.uploadFile<Result>(
- {
- url: Api.upload,
- // onUploadProgress,
- },
- params,
- );
- }
- export function uploadLiveVideoApi(
- params: UploadFileParams,
- // onUploadProgress: (progressEvent: ProgressEvent) => void,
- ) {
- return defHttp.uploadFile<Result>(
- {
- url: Api.uploadVideo,
- // onUploadProgress,
- },
- params,
- );
- }
- export const getAllSceneApi = (params: PageParams) =>
- defHttp.post<RentListGetResultModel>({
- url: Api.getAllScene,
- params,
- headers: {
- // @ts-ignore
- ignoreCancelToken: true,
- },
- });
- export const getLiveInfoApi = (params: InfoParams) => {
- return defHttp.post<SceneLiveItem>({
- url: Api.getBrandInfo,
- params,
- headers: {
- // @ts-ignore
- ignoreCancelToken: true,
- },
- });
- };
- export const brandUpdateApi = (params: SceneLiveItem) =>
- defHttp.post<GetAllSceneModel>({
- url: Api.brandUpdate,
- params,
- headers: {
- // @ts-ignore
- ignoreCancelToken: true,
- },
- });
- export const LiveSceneAddApi = (params: SceneLiveItem) =>
- defHttp.post<GetAllSceneModel>({
- url: Api.brandDelete,
- params,
- headers: {
- // @ts-ignore
- ignoreCancelToken: true,
- },
- });
- export const LiveSceneDeleteApi = (params: string[]) =>
- defHttp.post<GetAllSceneModel>({
- url: Api.brandDelete,
- params,
- headers: {
- // @ts-ignore
- ignoreCancelToken: true,
- },
- });
- export const addSave = (params: SceneLiveItem) =>
- defHttp.post<RentListGetResultModel>({
- url: Api.addSave,
- params,
- headers: {
- // @ts-ignore
- ignoreCancelToken: true,
- },
- });
|