✨ env:后端的请求地址,调整到 env 里
This commit is contained in:
@@ -4,14 +4,14 @@ const CategoryApi = {
|
||||
// 查询分类列表
|
||||
getCategoryList: () => {
|
||||
return request({
|
||||
url: '/app-api/product/category/list',
|
||||
url: '/product/category/list',
|
||||
method: 'GET',
|
||||
});
|
||||
},
|
||||
// 查询分类列表,指定编号
|
||||
getCategoryListByIds: (ids) => {
|
||||
return request({
|
||||
url: '/app-api/product/category/list-by-ids',
|
||||
url: '/product/category/list-by-ids',
|
||||
method: 'GET',
|
||||
params: { ids },
|
||||
});
|
||||
|
||||
@@ -4,7 +4,7 @@ const CommentApi = {
|
||||
// 获得商品评价分页
|
||||
getCommentPage: (spuId, pageNo, pageSize, type) => {
|
||||
return request({
|
||||
url: '/app-api/product/comment/page',
|
||||
url: '/product/comment/page',
|
||||
method: 'GET',
|
||||
params: {
|
||||
spuId,
|
||||
|
||||
@@ -4,7 +4,7 @@ const FavoriteApi = {
|
||||
// 获得商品收藏分页
|
||||
getFavoritePage: (data) => {
|
||||
return request({
|
||||
url: '/app-api/product/favorite/page',
|
||||
url: '/product/favorite/page',
|
||||
method: 'GET',
|
||||
params: data
|
||||
});
|
||||
@@ -12,7 +12,7 @@ const FavoriteApi = {
|
||||
// 检查是否收藏过商品
|
||||
isFavoriteExists: (spuId) => {
|
||||
return request({
|
||||
url: '/app-api/product/favorite/exits',
|
||||
url: '/product/favorite/exits',
|
||||
method: 'GET',
|
||||
params: {
|
||||
spuId
|
||||
@@ -22,7 +22,7 @@ const FavoriteApi = {
|
||||
// 添加商品收藏
|
||||
createFavorite: (spuId) => {
|
||||
return request({
|
||||
url: '/app-api/product/favorite/create',
|
||||
url: '/product/favorite/create',
|
||||
method: 'POST',
|
||||
data: {
|
||||
spuId
|
||||
@@ -32,7 +32,7 @@ const FavoriteApi = {
|
||||
// 取消商品收藏
|
||||
deleteFavorite: (spuId) => {
|
||||
return request({
|
||||
url: '/app-api/product/favorite/delete',
|
||||
url: '/product/favorite/delete',
|
||||
method: 'DELETE',
|
||||
data: {
|
||||
spuId
|
||||
|
||||
@@ -4,7 +4,7 @@ const SpuHistoryApi = {
|
||||
// 删除商品浏览记录
|
||||
deleteBrowseHistory: (spuIds) => {
|
||||
return request({
|
||||
url: '/app-api/product/browse-history/delete',
|
||||
url: '/product/browse-history/delete',
|
||||
method: 'DELETE',
|
||||
data: { spuIds },
|
||||
});
|
||||
@@ -12,14 +12,14 @@ const SpuHistoryApi = {
|
||||
// 清空商品浏览记录
|
||||
cleanBrowseHistory: () => {
|
||||
return request({
|
||||
url: '/app-api/product/browse-history/clean',
|
||||
url: '/product/browse-history/clean',
|
||||
method: 'DELETE',
|
||||
});
|
||||
},
|
||||
// 获得商品浏览记录分页
|
||||
getBrowseHistoryPage: (data) => {
|
||||
return request({
|
||||
url: '/app-api/product/browse-history/page',
|
||||
url: '/product/browse-history/page',
|
||||
method: 'GET',
|
||||
data
|
||||
});
|
||||
|
||||
@@ -4,7 +4,7 @@ const SpuApi = {
|
||||
// 获得商品 SPU 列表
|
||||
getSpuList: (recommendType) => {
|
||||
return request({
|
||||
url: '/app-api/product/spu/list',
|
||||
url: '/product/spu/list',
|
||||
method: 'GET',
|
||||
params: {recommendType},
|
||||
});
|
||||
@@ -12,7 +12,7 @@ const SpuApi = {
|
||||
// 获得商品 SPU 列表
|
||||
getSpuListByIds: (ids) => {
|
||||
return request({
|
||||
url: '/app-api/product/spu/list-by-ids',
|
||||
url: '/product/spu/list-by-ids',
|
||||
method: 'GET',
|
||||
params: {ids},
|
||||
});
|
||||
@@ -20,7 +20,7 @@ const SpuApi = {
|
||||
// 获得商品 SPU 分页
|
||||
getSpuPage: (data) => {
|
||||
return request({
|
||||
url: '/app-api/product/spu/page',
|
||||
url: '/product/spu/page',
|
||||
method: 'GET',
|
||||
data
|
||||
});
|
||||
@@ -28,7 +28,7 @@ const SpuApi = {
|
||||
// 查询商品
|
||||
getSpuDetail: (id) => {
|
||||
return request({
|
||||
url: '/app-api/product/spu/get-detail',
|
||||
url: '/product/spu/get-detail',
|
||||
method: 'GET',
|
||||
params: { id },
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user