import type { PageParams, PageResult } from '@/types/global' import type { bannerItem, goodsListItem, hotRecommendItem, noticeBarItem } from '@/types/home' import { request } from '@/utils/request' /** * 获取轮播图 * @returns */ export const getBannerApi = (type: number = 1) => { return request({ method: 'GET', url: 'shop/advert/banner', data: { type, }, }) } /** * 获取商品列表 * @param data * @returns */ export const getGoodsListApi = (data?: PageParams) => { return request>({ method: 'GET', url: 'shop/goods', data, }) } /** * 获取通告栏 * @param id * @returns */ export const getNoticeBartApi = () => { return request({ method: 'GET', url: 'shop/advert/noticeBar', }) } export const getHotRecommendApi = () => { return request({ method: 'GET', url: 'shop/advert/hotRecommend', }) }