优化资源管理
This commit is contained in:
153
src/api/shop.js
153
src/api/shop.js
@@ -1,4 +1,4 @@
|
||||
import request from '@/utils/request'
|
||||
import request from "@/utils/request";
|
||||
|
||||
/**
|
||||
* 商品列表
|
||||
@@ -6,10 +6,10 @@ import request from '@/utils/request'
|
||||
*/
|
||||
export function tbProduct(params) {
|
||||
return request({
|
||||
url: '/api/tbProduct',
|
||||
method: 'get',
|
||||
url: "/api/tbProduct",
|
||||
method: "get",
|
||||
params
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -18,10 +18,10 @@ export function tbProduct(params) {
|
||||
*/
|
||||
export function tbProductDelete(data) {
|
||||
return request({
|
||||
url: '/api/tbProduct',
|
||||
method: 'delete',
|
||||
url: "/api/tbProduct",
|
||||
method: "delete",
|
||||
data
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -30,10 +30,10 @@ export function tbProductDelete(data) {
|
||||
*/
|
||||
export function tbShopUnit(params) {
|
||||
return request({
|
||||
url: '/api/tbShopUnit',
|
||||
method: 'get',
|
||||
url: "/api/tbShopUnit",
|
||||
method: "get",
|
||||
params
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -43,8 +43,8 @@ export function tbShopUnit(params) {
|
||||
export function tbShopCurrency(shopId) {
|
||||
return request({
|
||||
url: `/api/tbShopCurrency/${shopId}`,
|
||||
method: 'get'
|
||||
})
|
||||
method: "get"
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -54,9 +54,9 @@ export function tbShopCurrency(shopId) {
|
||||
export function tbShopCurrencyPut(data) {
|
||||
return request({
|
||||
url: `/api/tbShopCurrency`,
|
||||
method: 'put',
|
||||
method: "put",
|
||||
data
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -66,9 +66,9 @@ export function tbShopCurrencyPut(data) {
|
||||
export function tbShopUnitPost(data) {
|
||||
return request({
|
||||
url: `/api/tbShopUnit`,
|
||||
method: 'post',
|
||||
method: "post",
|
||||
data
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -78,9 +78,9 @@ export function tbShopUnitPost(data) {
|
||||
export function tbShopUnitPut(data) {
|
||||
return request({
|
||||
url: `/api/tbShopUnit`,
|
||||
method: 'put',
|
||||
method: "put",
|
||||
data
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -90,9 +90,9 @@ export function tbShopUnitPut(data) {
|
||||
export function tbShopUnitDelete(data) {
|
||||
return request({
|
||||
url: `/api/tbShopUnit`,
|
||||
method: 'delete',
|
||||
method: "delete",
|
||||
data
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -102,9 +102,9 @@ export function tbShopUnitDelete(data) {
|
||||
export function tbShopCurrencyGet(params) {
|
||||
return request({
|
||||
url: `/api/tbShopUnit`,
|
||||
method: 'get',
|
||||
method: "get",
|
||||
params
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -114,21 +114,21 @@ export function tbShopCurrencyGet(params) {
|
||||
export function tbShopCategoryGet(params) {
|
||||
return request({
|
||||
url: `/api/tbShopCategory`,
|
||||
method: 'get',
|
||||
method: "get",
|
||||
params
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增、编辑分类/新增、编辑子分类
|
||||
* @returns
|
||||
*/
|
||||
export function tbShopCategoryPost(data, method = 'post') {
|
||||
export function tbShopCategoryPost(data, method = "post") {
|
||||
return request({
|
||||
url: `/api/tbShopCategory`,
|
||||
method: method,
|
||||
data
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -138,9 +138,9 @@ export function tbShopCategoryPost(data, method = 'post') {
|
||||
export function tbShopCategoryDelete(data) {
|
||||
return request({
|
||||
url: `/api/tbShopCategory`,
|
||||
method: 'delete',
|
||||
method: "delete",
|
||||
data
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -150,9 +150,9 @@ export function tbShopCategoryDelete(data) {
|
||||
export function tbProductSpecPost(data) {
|
||||
return request({
|
||||
url: `/api/tbProductSpec`,
|
||||
method: 'post',
|
||||
method: "post",
|
||||
data
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -162,9 +162,9 @@ export function tbProductSpecPost(data) {
|
||||
export function tbProductSpecGet(params) {
|
||||
return request({
|
||||
url: `/api/tbProductSpec`,
|
||||
method: 'get',
|
||||
method: "get",
|
||||
params
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -174,9 +174,9 @@ export function tbProductSpecGet(params) {
|
||||
export function tbProductSpecPut(data) {
|
||||
return request({
|
||||
url: `/api/tbProductSpec`,
|
||||
method: 'put',
|
||||
method: "put",
|
||||
data
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -186,9 +186,9 @@ export function tbProductSpecPut(data) {
|
||||
export function tbProductSpecDelete(data) {
|
||||
return request({
|
||||
url: `/api/tbProductSpec`,
|
||||
method: 'DELETE',
|
||||
method: "DELETE",
|
||||
data
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -198,9 +198,9 @@ export function tbProductSpecDelete(data) {
|
||||
export function tbProductGroupPost(data) {
|
||||
return request({
|
||||
url: `/api/tbProductGroup`,
|
||||
method: 'post',
|
||||
method: "post",
|
||||
data
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -210,9 +210,9 @@ export function tbProductGroupPost(data) {
|
||||
export function tbProductGroupPut(data) {
|
||||
return request({
|
||||
url: `/api/tbProductGroup`,
|
||||
method: 'PUT',
|
||||
method: "PUT",
|
||||
data
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -222,9 +222,9 @@ export function tbProductGroupPut(data) {
|
||||
export function tbProductGroupGet(params) {
|
||||
return request({
|
||||
url: `/api/tbProductGroup`,
|
||||
method: 'get',
|
||||
method: "get",
|
||||
params
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -234,8 +234,8 @@ export function tbProductGroupGet(params) {
|
||||
export function productListGet(productGroup) {
|
||||
return request({
|
||||
url: `/api/tbProductGroup/${productGroup}`,
|
||||
method: 'get'
|
||||
})
|
||||
method: "get"
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -245,9 +245,9 @@ export function productListGet(productGroup) {
|
||||
export function tbProductGroupDelete(data) {
|
||||
return request({
|
||||
url: `/api/tbProductGroup`,
|
||||
method: 'DELETE',
|
||||
method: "DELETE",
|
||||
data
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -257,9 +257,9 @@ export function tbProductGroupDelete(data) {
|
||||
export function tbProductPost(data) {
|
||||
return request({
|
||||
url: `/api/tbProduct`,
|
||||
method: 'post',
|
||||
method: "post",
|
||||
data
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -269,9 +269,9 @@ export function tbProductPost(data) {
|
||||
export function tbProductPut(data) {
|
||||
return request({
|
||||
url: `/api/tbProduct`,
|
||||
method: 'put',
|
||||
method: "put",
|
||||
data
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -282,8 +282,8 @@ export function tbProductPut(data) {
|
||||
export function tbProductGetDetail(product) {
|
||||
return request({
|
||||
url: `/api/tbProduct/${product}`,
|
||||
method: 'get'
|
||||
})
|
||||
method: "get"
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -293,9 +293,9 @@ export function tbProductGetDetail(product) {
|
||||
export function tbShopInfo(params) {
|
||||
return request({
|
||||
url: `/api/tbShopInfo`,
|
||||
method: 'get',
|
||||
method: "get",
|
||||
params
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -305,9 +305,9 @@ export function tbShopInfo(params) {
|
||||
export function tbMerchantRegisterPost(data) {
|
||||
return request({
|
||||
url: `/api/tbMerchantRegister`,
|
||||
method: 'post',
|
||||
method: "post",
|
||||
data
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -317,21 +317,21 @@ export function tbMerchantRegisterPost(data) {
|
||||
export function tbMerchantRegisterList(data) {
|
||||
return request({
|
||||
url: `/api/tbMerchantRegister/list`,
|
||||
method: 'post',
|
||||
method: "post",
|
||||
data
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 增加/编辑店铺
|
||||
* @returns
|
||||
*/
|
||||
export function tbShopInfoPost(data, method = 'post') {
|
||||
export function tbShopInfoPost(data, method = "post") {
|
||||
return request({
|
||||
url: `/api/tbShopInfo`,
|
||||
method: method,
|
||||
data
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -341,8 +341,8 @@ export function tbShopInfoPost(data, method = 'post') {
|
||||
export function tbMerchantThirdApply(shopId) {
|
||||
return request({
|
||||
url: `/api/tbMerchantThirdApply/${shopId}`,
|
||||
method: 'get'
|
||||
})
|
||||
method: "get"
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -352,9 +352,9 @@ export function tbMerchantThirdApply(shopId) {
|
||||
export function tbMerchantThirdApplyPut(data) {
|
||||
return request({
|
||||
url: `/api/tbMerchantThirdApply`,
|
||||
method: 'put',
|
||||
method: "put",
|
||||
data
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -364,21 +364,21 @@ export function tbMerchantThirdApplyPut(data) {
|
||||
export function tbProductIsHot(params) {
|
||||
return request({
|
||||
url: `/api/tbProduct/isHot`,
|
||||
method: 'get',
|
||||
method: "get",
|
||||
params
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 增加/编辑优惠券
|
||||
* @returns
|
||||
*/
|
||||
export function tbMerchantCoupon(data, method = 'post') {
|
||||
export function tbMerchantCoupon(data, method = "post") {
|
||||
return request({
|
||||
url: `/api/tbMerchantCoupon`,
|
||||
method: method,
|
||||
data
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -388,10 +388,19 @@ export function tbMerchantCoupon(data, method = 'post') {
|
||||
export function tbMerchantCouponGet(params) {
|
||||
return request({
|
||||
url: `/api/tbMerchantCoupon`,
|
||||
method: 'get',
|
||||
method: "get",
|
||||
params
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 设置热销商品
|
||||
* @returns
|
||||
*/
|
||||
export function geocode(params) {
|
||||
return request({
|
||||
url: `/api/geocode`,
|
||||
method: "get",
|
||||
params
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user