style(api): 统一代码风格并修复语法问题
- 统一import语句的空格格式 - 修复分号缺失问题 - 调整函数参数换行格式以符合规范 - 删除多余空行保持代码整洁 - 修复字符串拼接的换行格式问题
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { PageParam } from '@/api/index';
|
||||
import {ShopCouponApplyCate} from "@/api/shop/shopCouponApplyCate/model";
|
||||
import {ShopCouponApplyItem} from "@/api/shop/shopCouponApplyItem/model";
|
||||
import { ShopCouponApplyCate } from '@/api/shop/shopCouponApplyCate/model';
|
||||
import { ShopCouponApplyItem } from '@/api/shop/shopCouponApplyItem/model';
|
||||
|
||||
/**
|
||||
* 优惠券
|
||||
|
||||
Reference in New Issue
Block a user