@pisell/pisellos 0.0.346 → 0.0.348

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.
@@ -49,5 +49,5 @@ export declare class Product extends BaseModule implements Module {
49
49
  getCategories(): ProductCategory[];
50
50
  setOtherParams(key: string, value: any): void;
51
51
  getOtherParams(): any;
52
- getProductType(): "duration" | "session" | "normal";
52
+ getProductType(): "normal" | "duration" | "session";
53
53
  }
@@ -3191,8 +3191,11 @@ export var CheckoutImpl = /*#__PURE__*/function (_BaseModule) {
3191
3191
  depositPaidAmount = paymentItems.filter(function (item) {
3192
3192
  return item.order_payment_type === 'deposit' && item.status !== 'voided';
3193
3193
  }).reduce(function (sum, item) {
3194
- // 如果是 wallet,并且还没同步到后端,则不计入这一部分金额
3195
- if (item.voucher_id && !item.isSynced) {
3194
+ // 如果是 wallet,并且还没同步到后端,且此时还没有其他类型的支付项(现金,eftpos,标记支付),不计入已付金额
3195
+ // 如果有其他支付项了,代表此时处于马上要同步的状态,所以计入
3196
+ if (item.voucher_id && !item.isSynced && paymentItems.filter(function (item) {
3197
+ return !item.voucher_id;
3198
+ }).length === 0) {
3196
3199
  return sum;
3197
3200
  }
3198
3201
  var amount = new Decimal(item.amount || '0');
@@ -177,7 +177,8 @@ var onlineStoreConfig = {
177
177
  transformParams: function transformParams(params) {
178
178
  return {
179
179
  email: params.email,
180
- code: params.code
180
+ code: params.code,
181
+ action: params.action
181
182
  };
182
183
  }
183
184
  },
@@ -318,6 +318,7 @@ export interface CheckEmailCodeParams {
318
318
  email: string;
319
319
  shop_id: number;
320
320
  code: string;
321
+ action: string;
321
322
  }
322
323
  /**
323
324
  * 检查手机验证码是否有效参数接口
@@ -49,5 +49,5 @@ export declare class Product extends BaseModule implements Module {
49
49
  getCategories(): ProductCategory[];
50
50
  setOtherParams(key: string, value: any): void;
51
51
  getOtherParams(): any;
52
- getProductType(): "duration" | "session" | "normal";
52
+ getProductType(): "normal" | "duration" | "session";
53
53
  }
@@ -1967,7 +1967,7 @@ var CheckoutImpl = class extends import_BaseModule.BaseModule {
1967
1967
  const depositPaidAmount = paymentItems.filter(
1968
1968
  (item) => item.order_payment_type === "deposit" && item.status !== "voided"
1969
1969
  ).reduce((sum, item) => {
1970
- if (item.voucher_id && !item.isSynced) {
1970
+ if (item.voucher_id && !item.isSynced && paymentItems.filter((item2) => !item2.voucher_id).length === 0) {
1971
1971
  return sum;
1972
1972
  }
1973
1973
  const amount = new import_decimal.default(item.amount || "0");
@@ -147,7 +147,8 @@ var onlineStoreConfig = {
147
147
  method: "GET",
148
148
  transformParams: (params) => ({
149
149
  email: params.email,
150
- code: params.code
150
+ code: params.code,
151
+ action: params.action
151
152
  })
152
153
  },
153
154
  checkMobileCode: {
@@ -318,6 +318,7 @@ export interface CheckEmailCodeParams {
318
318
  email: string;
319
319
  shop_id: number;
320
320
  code: string;
321
+ action: string;
321
322
  }
322
323
  /**
323
324
  * 检查手机验证码是否有效参数接口
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@pisell/pisellos",
4
- "version": "0.0.346",
4
+ "version": "0.0.348",
5
5
  "description": "一个可扩展的前端模块化SDK框架,支持插件系统",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",