| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- import Request from '../common/request.js';
- const request = new Request().http;
- /**
- * 首页初始化核心数据(频道入口、分类标签、商品分类导航)
- */
- export function getHomeInit() {
- return request('/app/index/home/init', null, 'GET');
- }
- /**
- * 首页推荐区块(直播中、上新推荐等)
- */
- export function getHomeRecommend() {
- return request('/app/index/home/recommend', null, 'GET');
- }
- /**
- * 首页商品列表(支持用户端分类 id,id 为空查全部)
- * @param {Object} data - { id, pageNum, pageSize } 其中 id 可选,不传或空为全部
- */
- export function getHomeGoods(data) {
- return request('/app/index/home/goods', data || {}, 'GET');
- }
- /**
- * 首页推荐「更多」分页:绿色有机(green) / 上新推荐(hot)
- * @param {Object} data - { type: 'green'|'hot', pageNum, pageSize } 默认第1页10条
- */
- export function getHomeGoodsRecommend(data) {
- return request('/app/index/home/goods/recommend', data || {}, 'GET');
- }
- /**
- * 公域课程二级分类(CourseController.listPublicCourseCategory)
- */
- export function listPublicCourseCategory(data) {
- return request('/course_auto/app/course/publicCourseCategory/list', data || {}, 'GET');
- }
- /**
- * 公域课程列表(CourseController.listPublicCourse)
- */
- export function listPublicCourse(data) {
- return request('/course_auto/app/course/publicCourse/list', data || {}, 'GET');
- }
|