@yorkjs/hive-biz 0.1.0 → 0.1.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yorkjs/hive-biz",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "util function",
5
5
  "main": "dist/hive-biz.esm.js",
6
6
  "module": "dist/hive-biz.esm.js",
@@ -22,7 +22,7 @@ export interface IChildCustomSelectorView {
22
22
  customizationItemList: IProductSelectedCustomizationItem[][];
23
23
  count: number;
24
24
  isScrollable: boolean;
25
- salePriceExtra: string | number;
25
+ salePrice: number;
26
26
  }
27
27
  export declare class ChildCustomSelector {
28
28
  private product;
@@ -61,6 +61,6 @@ export declare class ChildCustomSelector {
61
61
  private _initProductData;
62
62
  private _updateSkuData;
63
63
  private _checkProductCount;
64
- private _formatSalePriceExtra;
64
+ private _formatSalePrice;
65
65
  private _notifyChange;
66
66
  }
@@ -1,5 +1,5 @@
1
1
  import { ICartListItem, ISelectSkuComboItem } from './type';
2
- import { ICountChangeResult, IAddToCartParamsResult, IComboSpecSelectorView, IComboSpecSelectorOptions, IFetchCartCountParams, IMallSkuDetailDataForCombo } from './type';
2
+ import { ICountChangeResult, IAddToCartParamsResult, IComboSpecSelectorView, IComboSpecSelectorOptions, IFetchCartCountParams, IFetchMemberPriceParams, IMallSkuDetailDataForCombo } from './type';
3
3
  export declare class ComboSpecSelector {
4
4
  private product;
5
5
  private specImage;
@@ -17,6 +17,7 @@ export declare class ComboSpecSelector {
17
17
  private perOrderMaxLimit;
18
18
  private salePrice;
19
19
  private originalPrice;
20
+ private memberPrice;
20
21
  private skuComboGroupList;
21
22
  private skuComboItemList;
22
23
  private cartCount;
@@ -41,6 +42,7 @@ export declare class ComboSpecSelector {
41
42
  skuId: number;
42
43
  };
43
44
  updateSkuDetailData(skuDetailData: IMallSkuDetailDataForCombo): void;
45
+ updateMemberPrice(price: number | undefined): void;
44
46
  handleSelectComboData(skuComboItemList: ISelectSkuComboItem[][]): void;
45
47
  handleProductCountChange(count: number, type: string): ICountChangeResult;
46
48
  getAddToCartParams(productId: number, promotionActivityProductId?: number): IAddToCartParamsResult;
@@ -48,7 +50,9 @@ export declare class ComboSpecSelector {
48
50
  handleCloseComboInfo(): void;
49
51
  getSalePrice(): number;
50
52
  getOriginalPrice(): number;
53
+ getMemberPrice(): number | undefined;
51
54
  buildCartCountParams(): IFetchCartCountParams;
55
+ buildMemberPriceParams(): IFetchMemberPriceParams | undefined;
52
56
  private _initProductData;
53
57
  private _initSkuDetail;
54
58
  private _updateSkuData;
@@ -1,5 +1,5 @@
1
1
  import { ICartListItem, IProductSelectedCustomizationItem } from './type';
2
- import { ICountChangeResult, IAddToCartParamsResult, ICustomSpecSelectorView, ICustomSpecSelectorOptions, IFetchCustomCartCountParams, IFetchCartCountResult } from './type';
2
+ import { ICountChangeResult, IAddToCartParamsResult, ICustomSpecSelectorView, ICustomSpecSelectorOptions, IFetchCustomCartCountParams, IFetchCartCountResult, IFetchMemberPriceParams } from './type';
3
3
  export declare class CustomSpecSelector {
4
4
  private product;
5
5
  private promotionActivityProduct;
@@ -19,6 +19,7 @@ export declare class CustomSpecSelector {
19
19
  private perOrderMaxLimit;
20
20
  private salePrice;
21
21
  private originalPrice;
22
+ private memberPrice;
22
23
  private customizationGroupList;
23
24
  private customizationItemList;
24
25
  private cartCount;
@@ -36,6 +37,7 @@ export declare class CustomSpecSelector {
36
37
  cartParams: IFetchCustomCartCountParams;
37
38
  };
38
39
  updateCartCountData(result: IFetchCartCountResult): void;
40
+ updateMemberPrice(price: number | undefined): void;
39
41
  handleCustomizationItemListSelect(customizationItemList: IProductSelectedCustomizationItem[][]): {
40
42
  isValid: boolean;
41
43
  cartParams?: IFetchCustomCartCountParams;
@@ -43,13 +45,17 @@ export declare class CustomSpecSelector {
43
45
  handleProductCountChange(count: number, type: string): ICountChangeResult;
44
46
  getAddToCartParams(productId: number, promotionActivityProductId?: number): IAddToCartParamsResult;
45
47
  getSalePrice(): number;
48
+ getOriginalPrice(): number;
49
+ getMemberPrice(): number | undefined;
46
50
  getSelectedSpecAndCustomization(): string;
47
51
  buildCartCountParams(): IFetchCustomCartCountParams;
52
+ buildMemberPriceParams(): IFetchMemberPriceParams | undefined;
48
53
  private _initProductData;
49
54
  private _updateSkuData;
50
55
  private _checkProductCount;
51
56
  private _selectSpec;
52
57
  private _notifyChange;
58
+ private _getSkuType;
53
59
  private _findSkuCartItem;
54
60
  private _updateSkuCartItem;
55
61
  }
@@ -393,6 +393,7 @@ export interface IComboSpecSelectorView {
393
393
  maxCount: number;
394
394
  isComponentLoading: boolean;
395
395
  visibleComboInfo: boolean;
396
+ memberPrice: number | undefined;
396
397
  }
397
398
  export interface ICustomSpecSelectorView {
398
399
  product: IProduct;
@@ -411,6 +412,7 @@ export interface ICustomSpecSelectorView {
411
412
  cartCount: number;
412
413
  maxCount: number;
413
414
  cartItem: ICartListItem | undefined;
415
+ memberPrice: number | undefined;
414
416
  }
415
417
  export type SelectorChangeCallback = () => void;
416
418
  export interface IFetchCartCountParams {
@@ -437,6 +439,10 @@ export interface IFetchCartCountResult {
437
439
  };
438
440
  [key: string]: any;
439
441
  }
442
+ export interface IFetchMemberPriceParams {
443
+ sku_id: number;
444
+ sku_type: number;
445
+ }
440
446
  export interface IMallSkuDetailParams {
441
447
  sku_id: number;
442
448
  sku_type: number;
@@ -5,6 +5,6 @@ export default class SpecAdjoinMatrix extends AdjoinMatrix {
5
5
  constructor(specList: any, specCombinationList: any);
6
6
  initSpec(): void;
7
7
  initSameLevel(): void;
8
- getSpecsOptions(params: any): never[];
8
+ getSpecsOptions(params: any): string[];
9
9
  fillInSpec(params: any, weight: any): void;
10
10
  }