@pisell/pisellos 0.0.43 → 0.0.44

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.
@@ -16,6 +16,7 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
16
16
  bookings: any[];
17
17
  shop_note: string;
18
18
  schedule_date: string;
19
+ is_deposit: number;
19
20
  };
20
21
  commitOrder(order: CommitOrderParams): Promise<void>;
21
22
  }
@@ -60,14 +60,20 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
60
60
  order_sales_channel: "online_store",
61
61
  bookings: [],
62
62
  shop_note: "",
63
- schedule_date: ""
63
+ schedule_date: "",
64
+ is_deposit: 0
64
65
  };
66
+ var is_deposit = 0; // 是否存在定金,0 不存在,1 存在
65
67
  if (params.cartItems.length > 0) {
66
68
  params.cartItems.forEach(function (item) {
67
69
  order.bookings.push(item._origin);
70
+ if (item !== null && item !== void 0 && item.deposit) {
71
+ is_deposit = 1;
72
+ }
68
73
  });
69
74
  var firstCartItem = params.cartItems[0];
70
75
  order.schedule_date = firstCartItem.start_date + " " + firstCartItem.start_time + ":00";
76
+ order.is_deposit = is_deposit;
71
77
  }
72
78
  return order;
73
79
  }
@@ -82,9 +88,8 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
82
88
  url = order.url, query = order.query;
83
89
  fetchUrl = url || "/order/appointment";
84
90
  params = this.createOrder(query);
85
- console.log(params);
86
91
  return _context2.abrupt("return", this.request.post(fetchUrl, params));
87
- case 5:
92
+ case 4:
88
93
  case "end":
89
94
  return _context2.stop();
90
95
  }
@@ -16,6 +16,7 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
16
16
  bookings: any[];
17
17
  shop_note: string;
18
18
  schedule_date: string;
19
+ is_deposit: number;
19
20
  };
20
21
  commitOrder(order: CommitOrderParams): Promise<void>;
21
22
  }
@@ -42,14 +42,20 @@ var OrderModule = class extends import_BaseModule.BaseModule {
42
42
  order_sales_channel: "online_store",
43
43
  bookings: [],
44
44
  shop_note: "",
45
- schedule_date: ""
45
+ schedule_date: "",
46
+ is_deposit: 0
46
47
  };
48
+ let is_deposit = 0;
47
49
  if (params.cartItems.length > 0) {
48
50
  params.cartItems.forEach((item) => {
49
51
  order.bookings.push(item._origin);
52
+ if (item == null ? void 0 : item.deposit) {
53
+ is_deposit = 1;
54
+ }
50
55
  });
51
56
  const firstCartItem = params.cartItems[0];
52
57
  order.schedule_date = firstCartItem.start_date + " " + firstCartItem.start_time + ":00";
58
+ order.is_deposit = is_deposit;
53
59
  }
54
60
  return order;
55
61
  }
@@ -57,7 +63,6 @@ var OrderModule = class extends import_BaseModule.BaseModule {
57
63
  const { url, query } = order;
58
64
  const fetchUrl = url || "/order/appointment";
59
65
  const params = this.createOrder(query);
60
- console.log(params);
61
66
  return this.request.post(fetchUrl, params);
62
67
  }
63
68
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@pisell/pisellos",
4
- "version": "0.0.43",
4
+ "version": "0.0.44",
5
5
  "description": "一个可扩展的前端模块化SDK框架,支持插件系统",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",