医学道
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
video/src/api/brand.ts

42 lines
1.0 KiB

import {request} from "@/api/request";
export type BrandRecord = {
logo: string;
name: string;
id: number
introductory_video: string
brand_album: string[]
graphic_introduction: string
disabled: number
introductory_video_resource:any
}
export type ArticleRecord = {
title: string
page_view: number
created_at: string
content: string
}
export const brandApi = {
/** 品牌列表 */
list(page: number , page_size: number) {
return request<{
data: BrandRecord[],
total: number
}>(`/home/v1/brand/list?page=${page}&page_size=${page_size}` , "GET")
},
/** 品牌详情 */
info(id: number) {
return request<BrandRecord>(`/home/v1/brand/${id}`, "GET")
},
/** 文章列表 */
articleList(owner_id: number ) {
return request<{
list: ArticleRecord[],
total: number
}>(`/home/v1/article/list?owner_id=${owner_id}&page=1&page_size=1000` , "GET")
},
articleInfo(id: number ) {
return request<ArticleRecord>(`/home/v1/article/${id}` , "GET")
},
}