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.
44 lines
1.1 KiB
44 lines
1.1 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
|
|
article_count: number
|
|
created_at: string
|
|
}
|
|
export type ArticleRecord = {
|
|
title: string
|
|
page_view: number
|
|
created_at: string
|
|
content: string
|
|
}
|
|
|
|
export const brandApi = {
|
|
/** 品牌列表 */
|
|
list(page: number, page_size: number) {
|
|
return request<{
|
|
list: 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, page: number) {
|
|
return request<{
|
|
list: ArticleRecord[],
|
|
total: number
|
|
}>(`/home/v1/article/list?owner_id=${owner_id}&page=${page}&page_size=10`, "GET")
|
|
},
|
|
articleInfo(id: number) {
|
|
return request<ArticleRecord>(`/home/v1/article/${id}`, "GET")
|
|
},
|
|
}
|
|
|