@yorkjs/hive-biz 0.2.3 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hive-biz.esm.js +1 -1
- package/dist/hive-biz.esm.js.map +1 -1
- package/dist/hive-biz.esm.min.js +1 -1
- package/dist/hive-biz.esm.min.js.map +1 -1
- package/dist/hive-biz.js +1 -1
- package/dist/hive-biz.js.map +1 -1
- package/dist/hive-biz.min.js +1 -1
- package/dist/hive-biz.min.js.map +1 -1
- package/package.json +1 -1
- package/types/coupon/couponSelector.d.ts +1 -1
- package/types/coupon/couponUtil.d.ts +2 -1
- package/types/coupon/type.d.ts +5 -0
package/package.json
CHANGED
|
@@ -22,7 +22,7 @@ export declare class CouponSelector {
|
|
|
22
22
|
constructor(options: ICouponSelectorOptions);
|
|
23
23
|
/** 全量替换列表,并清掉已不存在的选中 / 展开 */
|
|
24
24
|
setList(list: any[]): void;
|
|
25
|
-
/**
|
|
25
|
+
/** 分页追加,保持接口顺序 */
|
|
26
26
|
appendList(list: any[]): void;
|
|
27
27
|
/** 当前列表票面快照,给 CouponCard 渲染 */
|
|
28
28
|
getView(): ICouponSelectorView;
|
|
@@ -16,7 +16,7 @@ export declare function resolveCouponAvailableError(coupon: Pick<ICoupon, 'avail
|
|
|
16
16
|
/**
|
|
17
17
|
* 原始列表 → 标准 ICoupon。
|
|
18
18
|
* 有 formatItem 就逐项转换(返回空则跳过);没有则把项当作已是 ICoupon。
|
|
19
|
-
* 未带 original 时自动挂上原始 item
|
|
19
|
+
* 未带 original 时自动挂上原始 item。顺序与接口一致,前端不做可用/不可用重排。
|
|
20
20
|
*/
|
|
21
21
|
export declare function formatCouponList(rawList?: any[], formatItem?: CouponFormatItem): ICoupon[];
|
|
22
22
|
/**
|
|
@@ -33,6 +33,7 @@ export declare function formatCouponAmountSuffix(coupon: ICoupon): string;
|
|
|
33
33
|
/**
|
|
34
34
|
* 门槛展示值(不含「使用门槛:」)。
|
|
35
35
|
* 由 thresholdType + thresholdValue 生成;0 为无门槛。
|
|
36
|
+
* 折扣券设置了优惠上限时,接在门槛后:满0.01元,封顶减10元。
|
|
36
37
|
*/
|
|
37
38
|
export declare function formatCouponThreshold(coupon: ICoupon): string;
|
|
38
39
|
/**
|
package/types/coupon/type.d.ts
CHANGED
|
@@ -55,6 +55,11 @@ export interface ICoupon {
|
|
|
55
55
|
* thresholdType 1 为金额最小单位,2 为件数;0 视为无门槛。
|
|
56
56
|
*/
|
|
57
57
|
thresholdValue: number;
|
|
58
|
+
/**
|
|
59
|
+
* 折扣券优惠上限,对齐 discount_max_amount,金额最小单位。
|
|
60
|
+
* 仅折扣券且大于 0 时,拼在使用门槛后:「,封顶减XX元」。
|
|
61
|
+
*/
|
|
62
|
+
discountMaxAmount?: number;
|
|
58
63
|
/**
|
|
59
64
|
* 生效开始类型,对齐 effective_start_type:
|
|
60
65
|
* 1 立即 / 2 指定时间。发券模板 expireMode: validity 时使用。
|