| 1234567891011121314151617181920212223242526272829303132 |
- 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');
- }
|