style(api): 统一代码风格并修复语法问题

- 统一import语句的空格格式
- 修复分号缺失问题
- 调整函数参数换行格式以符合规范
- 删除多余空行保持代码整洁
- 修复字符串拼接的换行格式问题
This commit is contained in:
2026-01-21 00:26:14 +08:00
parent 7a37f66081
commit 82ac209505
559 changed files with 40550 additions and 37977 deletions

View File

@@ -22,12 +22,9 @@ export async function pageShopCoupon(params: ShopCouponParam) {
* 查询优惠券列表
*/
export async function listShopCoupon(params?: ShopCouponParam) {
const res = await request.get<ApiResult<ShopCoupon[]>>(
'/shop/shop-coupon',
{
params
}
);
const res = await request.get<ApiResult<ShopCoupon[]>>('/shop/shop-coupon', {
params
});
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
@@ -38,10 +35,7 @@ export async function listShopCoupon(params?: ShopCouponParam) {
* 添加优惠券
*/
export async function addShopCoupon(data: ShopCoupon) {
const res = await request.post<ApiResult<unknown>>(
'/shop/shop-coupon',
data
);
const res = await request.post<ApiResult<unknown>>('/shop/shop-coupon', data);
if (res.data.code === 0) {
return res.data.message;
}
@@ -52,10 +46,7 @@ export async function addShopCoupon(data: ShopCoupon) {
* 修改优惠券
*/
export async function updateShopCoupon(data: ShopCoupon) {
const res = await request.put<ApiResult<unknown>>(
'/shop/shop-coupon',
data
);
const res = await request.put<ApiResult<unknown>>('/shop/shop-coupon', data);
if (res.data.code === 0) {
return res.data.message;
}