2025-03-14 16:27:50 +08:00
|
|
|
import { http, Method } from "@/utils/request.js";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 获取广告图
|
|
|
|
*/
|
|
|
|
export function getAdvertisement() {
|
|
|
|
return http.request({
|
|
|
|
url: "/advertisement",
|
|
|
|
method: Method.GET,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2025-03-24 10:53:42 +08:00
|
|
|
/**
|
|
|
|
* 像后端传递经纬度
|
|
|
|
*/
|
|
|
|
export function postAdvertisementjw(data) {
|
|
|
|
return http.request({
|
|
|
|
url: "/member/address/location",
|
|
|
|
method: Method.POST,
|
|
|
|
header: { "content-type": "application/x-www-form-urlencoded" },
|
|
|
|
data
|
|
|
|
});
|
|
|
|
}
|
2025-03-14 16:27:50 +08:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 获取首页商品分类
|
|
|
|
* @param parent_id
|
|
|
|
*/
|
|
|
|
export function getCategory(parent_id = 0) {
|
|
|
|
return http.request({
|
|
|
|
url: `goods/categories/${parent_id}/children`,
|
|
|
|
method: Method.GET,
|
|
|
|
loading: false,
|
|
|
|
});
|
|
|
|
}
|
2025-04-09 17:36:48 +08:00
|
|
|
/**
|
|
|
|
* 获取首页商品分类
|
|
|
|
* @param pagesize
|
|
|
|
* @param page
|
|
|
|
* @param keyword
|
|
|
|
* @param category_id
|
|
|
|
*/
|
|
|
|
export function getbendi(data) {
|
|
|
|
return http.request({
|
|
|
|
url: `goods/goods/bendi`,
|
|
|
|
method: Method.GET,
|
|
|
|
data
|
|
|
|
});
|
|
|
|
}
|
2025-03-14 16:27:50 +08:00
|
|
|
/**
|
|
|
|
* 获取热门关键词
|
|
|
|
* @param num
|
|
|
|
*/
|
|
|
|
export function getHotKeywords(count) {
|
|
|
|
return http.request({
|
|
|
|
url: "/goods/goods/hot-words",
|
|
|
|
method: Method.GET,
|
|
|
|
loading: false,
|
|
|
|
params: { count },
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 获取楼层数据
|
|
|
|
* @param client_type
|
|
|
|
* @param page_type
|
|
|
|
*/
|
|
|
|
export function getFloorData() {
|
|
|
|
return http.request({
|
|
|
|
url: `/other/pageData/getIndex?clientType=H5`,
|
|
|
|
method: "get",
|
|
|
|
});
|
|
|
|
}
|
2025-03-28 16:05:11 +08:00
|
|
|
/**
|
|
|
|
* 获取本地生活楼层数据
|
|
|
|
* @param client_type
|
|
|
|
* @param page_type
|
|
|
|
*/
|
|
|
|
export function getFloorgetBendi() {
|
|
|
|
return http.request({
|
|
|
|
url: `/other/pageData/getBendi?clientType=H5`,
|
|
|
|
method: "get",
|
|
|
|
});
|
|
|
|
}
|
2025-03-14 16:27:50 +08:00
|
|
|
/**
|
|
|
|
* 获取获取首页分类数据
|
|
|
|
*/
|
|
|
|
export function getCategoryIndexData(parentId = 0) {
|
|
|
|
return http.request({
|
|
|
|
url: `/goods/category/get/${parentId}`,
|
|
|
|
method: "get",
|
|
|
|
});
|
|
|
|
}
|