@pisell/pisellos 2.1.31 → 2.1.33

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.
@@ -131,9 +131,9 @@ export var ProductList = /*#__PURE__*/function (_BaseModule) {
131
131
  // client_schedule_ids: schedule_ids,
132
132
  schedule_date: schedule_date,
133
133
  application_code: (_this$otherParams = this.otherParams) === null || _this$otherParams === void 0 ? void 0 : _this$otherParams.channel,
134
- is_eject: 1,
135
134
  with_schedule: with_schedule,
136
- schedule_datetime: schedule_datetime
135
+ schedule_datetime: schedule_datetime,
136
+ is_eject: 1
137
137
  }, {
138
138
  useCache: true
139
139
  });
@@ -142,9 +142,16 @@ export var ProductList = /*#__PURE__*/function (_BaseModule) {
142
142
  sortedList = (productsData.data.list || []).slice().sort(function (a, b) {
143
143
  return Number(b.sort) - Number(a.sort);
144
144
  });
145
+ if (sortedList.length) {
146
+ sortedList.forEach(function (n) {
147
+ if (n.is_eject !== 1 && n.session) {
148
+ n.is_eject = 1;
149
+ }
150
+ });
151
+ }
145
152
  this.addProduct(sortedList);
146
153
  return _context3.abrupt("return", sortedList);
147
- case 10:
154
+ case 11:
148
155
  case "end":
149
156
  return _context3.stop();
150
157
  }
@@ -342,7 +342,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
342
342
  };
343
343
  setOtherData(key: string, value: any): void;
344
344
  getOtherData(key: string): any;
345
- getProductTypeById(id: number): Promise<"duration" | "session" | "normal">;
345
+ getProductTypeById(id: number): Promise<"normal" | "duration" | "session">;
346
346
  /**
347
347
  * 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
348
348
  *
@@ -97,13 +97,20 @@ var ProductList = class extends import_BaseModule.BaseModule {
97
97
  // client_schedule_ids: schedule_ids,
98
98
  schedule_date,
99
99
  application_code: (_b = this.otherParams) == null ? void 0 : _b.channel,
100
- is_eject: 1,
101
100
  with_schedule,
102
- schedule_datetime
101
+ schedule_datetime,
102
+ is_eject: 1
103
103
  },
104
104
  { useCache: true }
105
105
  );
106
106
  const sortedList = (productsData.data.list || []).slice().sort((a, b) => Number(b.sort) - Number(a.sort));
107
+ if (sortedList.length) {
108
+ sortedList.forEach((n) => {
109
+ if (n.is_eject !== 1 && n.session) {
110
+ n.is_eject = 1;
111
+ }
112
+ });
113
+ }
107
114
  this.addProduct(sortedList);
108
115
  return sortedList;
109
116
  }
@@ -342,7 +342,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
342
342
  };
343
343
  setOtherData(key: string, value: any): void;
344
344
  getOtherData(key: string): any;
345
- getProductTypeById(id: number): Promise<"duration" | "session" | "normal">;
345
+ getProductTypeById(id: number): Promise<"normal" | "duration" | "session">;
346
346
  /**
347
347
  * 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
348
348
  *
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@pisell/pisellos",
4
- "version": "2.1.31",
4
+ "version": "2.1.33",
5
5
  "description": "一个可扩展的前端模块化SDK框架,支持插件系统",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",