对接api3

This commit is contained in:
2022-05-09 10:03:33 +08:00
parent 4c46c6e22d
commit 883c24b7be
14 changed files with 294 additions and 203 deletions
+12
View File
@@ -0,0 +1,12 @@
import { useRequest } from "@/use/useHttp"
/**
* 登录
* @returns
*/
export const Login = () => {
return useRequest({
url: `/v1/mall/login`,
method: "post",
})
}
+13 -1
View File
@@ -32,4 +32,16 @@ export const GetProductListApi = () => {
url: `/v1/mall/product/list`,
method: "get",
})
}
}
/**
* 获取面料详情
* @returns
*/
export const GetProductDetailApi = () => {
return useRequest({
url: `/v1/mall/product`,
method: "get",
})
}
+12
View File
@@ -0,0 +1,12 @@
import { useRequest } from "@/use/useHttp"
/**
* 获取面料颜色列表
* @returns
*/
export const GetColorList = () => {
return useRequest({
url: `/v1/mall/product/color/list`,
method: "get",
})
}
+12
View File
@@ -0,0 +1,12 @@
import { useRequest } from "@/use/useHttp"
/**
* 获取购物车列表
* @returns
*/
export const GetShoppingCartApi = () => {
return useRequest({
url: `/v1/mall/shoppingCart/productColor`,
method: "get",
})
}