Files

57 lines
1.6 KiB
TypeScript

/*
* @Author: caoziyuan ziyuan.cao@zhuying.com
* @Date: 2026-01-13 14:31:18
* @LastEditors: aliyun4247073344 893643761@qq.com
* @LastEditTime: 2026-02-28 10:16:04
* @FilePath: \uni-app\api\home.ts
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
/**
* 首页相关 API
*/
import { http } from '../utils/request';
import type { AboutUsInfo, AboutVideoInfo, CalendarInfo, RecommendedSolutionResponse, NoticeListResponse } from './types';
export const homePageApi = {
/**
* 获取文字介绍(关于我们)
*/
getAboutUs: () => {
return http.get<AboutUsInfo>('/yifan_about_us/miniapp/info');
},
/**
* 获取视频介绍
*/
getAboutVideo: () => {
return http.get<AboutVideoInfo>('/yifan_about_video/miniapp/info');
},
/**
* 获取今天日期(黄历)
*/
getCalendarToday: () => {
return http.get<CalendarInfo>('/yifan_naming_reports/calendar');
},
/**
* 获取方案推荐(佳名赏析)
*/
getRecommendedSolutions: (pageNo = 1, pageSize = 10) => {
return http.get<RecommendedSolutionResponse>('/yifan_naming_solutions/recommended', {
page_no: pageNo,
page_size: pageSize,
});
},
/**
* 获取消息轮播列表
*/
getNoticeList: (pageNo = 1, pageSize = 10) => {
return http.get<NoticeListResponse>('/notice/mini/list', {
page_no: pageNo,
page_size: pageSize,
});
},
};