2021-05-13 11:03:32 +08:00
|
|
|
import { http, Method } from "@/utils/request.js";
|
|
|
|
|
2022-10-11 17:36:40 +08:00
|
|
|
export function toSpecial(data) {
|
|
|
|
return http.request({
|
|
|
|
url: `/other/pageData/getSpecial`,
|
|
|
|
method: Method.GET,
|
|
|
|
data
|
|
|
|
});
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* 专题内容
|
|
|
|
*/
|
|
|
|
export function getSpecial(id) {
|
|
|
|
return http.request({
|
|
|
|
url: `/other/pageData/get/${id}`,
|
|
|
|
method: Method.GET,
|
|
|
|
});
|
|
|
|
}
|
2021-05-13 11:03:32 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 获取广告图
|
|
|
|
*/
|
|
|
|
export function getAdvertisement() {
|
|
|
|
return http.request({
|
|
|
|
url: "/advertisement",
|
|
|
|
method: Method.GET,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 获取首页商品分类
|
|
|
|
* @param parent_id
|
|
|
|
*/
|
|
|
|
export function getCategory(parent_id = 0) {
|
|
|
|
return http.request({
|
|
|
|
url: `goods/categories/${parent_id}/children`,
|
|
|
|
method: Method.GET,
|
|
|
|
loading: false,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 获取热门关键词
|
|
|
|
* @param num
|
|
|
|
*/
|
2021-07-30 16:29:05 +08:00
|
|
|
export function getHotKeywords(count) {
|
2021-05-13 11:03:32 +08:00
|
|
|
return http.request({
|
2022-02-10 18:57:17 +08:00
|
|
|
url: "/goods/goods/hot-words",
|
2021-05-13 11:03:32 +08:00
|
|
|
method: Method.GET,
|
|
|
|
loading: false,
|
2021-07-30 16:29:05 +08:00
|
|
|
params: { count },
|
2021-05-13 11:03:32 +08:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 获取楼层数据
|
|
|
|
* @param client_type
|
|
|
|
* @param page_type
|
|
|
|
*/
|
|
|
|
export function getFloorData() {
|
|
|
|
return http.request({
|
2022-02-10 18:57:17 +08:00
|
|
|
url: `/other/pageData/getIndex?clientType=H5`,
|
2021-05-13 11:03:32 +08:00
|
|
|
method: "get",
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 获取获取首页分类数据
|
|
|
|
*/
|
|
|
|
export function getCategoryIndexData(parentId = 0) {
|
|
|
|
return http.request({
|
2022-02-10 18:57:17 +08:00
|
|
|
url: `/goods/category/get/${parentId}`,
|
2021-05-13 11:03:32 +08:00
|
|
|
method: "get",
|
|
|
|
});
|
|
|
|
}
|