|
|
@@ -64,13 +64,36 @@ storeAxiosInstance.interceptors.response.use(
|
|
|
}
|
|
|
);
|
|
|
|
|
|
+/** 门店优惠券列表查询参数(与 alienStore GET 查询串一致) */
|
|
|
+export type GetStoreAllCouponListParams = {
|
|
|
+ storeId: number | string;
|
|
|
+ tab?: number;
|
|
|
+ size?: number;
|
|
|
+ page?: number;
|
|
|
+ couponName?: string;
|
|
|
+ couponsFromType?: number;
|
|
|
+ couponType?: number | string;
|
|
|
+};
|
|
|
+
|
|
|
/**
|
|
|
- * 获取优惠券列表
|
|
|
- * @param params 请求参数
|
|
|
- * @returns 优惠券列表数据
|
|
|
+ * 获取门店全部优惠券列表
|
|
|
+ * GET {VITE_API_URL_STORE}/alienStore/life-discount-coupon/getStoreAllCouponList
|
|
|
+ * 示例:?storeId=381&tab=0&size=99&page=1&couponName=&couponsFromType=1&couponType=1
|
|
|
+ * 兼容旧入参:pageNum/pageSize、name(映射为 page/size/couponName)
|
|
|
*/
|
|
|
-export const getCouponList = params => {
|
|
|
- return http.post<ResPage<any>>(PORT_NONE + `/couponPlatform/getCouponList`, params);
|
|
|
+export const getCouponList = (input: Record<string, any>) => {
|
|
|
+ const params: GetStoreAllCouponListParams = {
|
|
|
+ storeId: input.storeId,
|
|
|
+ tab: input.tab ?? 0,
|
|
|
+ size: Number(input.size ?? input.pageSize ?? 99),
|
|
|
+ page: Number(input.page ?? input.pageNum ?? 1),
|
|
|
+ couponName: input.couponName ?? input.name ?? "",
|
|
|
+ couponsFromType: Number(input.couponsFromType ?? 1),
|
|
|
+ couponType: input.couponType != null && input.couponType !== "" ? Number(input.couponType) : 1
|
|
|
+ };
|
|
|
+ return storeAxiosInstance.get<ResPage<any>>(`/life-discount-coupon/getStoreAllCouponList`, {
|
|
|
+ params
|
|
|
+ });
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
@@ -155,7 +178,16 @@ export const getActivityRuleOptions = (params?: any) => {
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
- * AI生成活动宣传图
|
|
|
+ * AI生成活动宣传图(与商家端 operationalActivity/generatePromotionImages 一致)
|
|
|
+ * @param params { activityName: string, uploadImgType: number }
|
|
|
+ * @returns 生成的图片数据
|
|
|
+ */
|
|
|
+export const generatePromotionImages = (params: { activityName: string; uploadImgType?: number }) => {
|
|
|
+ return http.post<any>(PORT_NONE + `/operationalActivity/generatePromotionImages`, params);
|
|
|
+};
|
|
|
+
|
|
|
+/**
|
|
|
+ * AI生成活动宣传图(原 http_ai 接口,保留兼容)
|
|
|
* @param params 请求参数 { text: string } - 活动描述文本
|
|
|
* @returns 生成的图片数据
|
|
|
*/
|