@pisell/pisellos 2.0.1 → 2.0.3
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.
|
@@ -38,8 +38,8 @@ export var createCartItemOrigin = function createCartItemOrigin() {
|
|
|
38
38
|
// 资源相关
|
|
39
39
|
// 资源状态 -固定
|
|
40
40
|
like_status: "common",
|
|
41
|
-
//
|
|
42
|
-
|
|
41
|
+
// 资源类型
|
|
42
|
+
relation_type: "",
|
|
43
43
|
// 所选资源
|
|
44
44
|
resources: null,
|
|
45
45
|
// 日程id - 固定
|
|
@@ -228,6 +228,7 @@ export var formatResourceToCartItemOrigin = function formatResourceToCartItemOri
|
|
|
228
228
|
// 接口只需要部分字段,需要处理
|
|
229
229
|
resources.forEach(function (resource) {
|
|
230
230
|
origin.resources.push({
|
|
231
|
+
relation_type: "form",
|
|
231
232
|
like_status: "common",
|
|
232
233
|
id: resource.id,
|
|
233
234
|
main_field: resource.main_field,
|
|
@@ -681,6 +681,12 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
681
681
|
key: "updateCart",
|
|
682
682
|
value: function updateCart(params) {
|
|
683
683
|
var _this5 = this;
|
|
684
|
+
if (params.resources) {
|
|
685
|
+
params.resources = params.resources.map(function (n) {
|
|
686
|
+
n.capacity = 1;
|
|
687
|
+
return n;
|
|
688
|
+
});
|
|
689
|
+
}
|
|
684
690
|
this.store.cart.updateItem(params);
|
|
685
691
|
var targetCartItem = this.store.cart.getItem(params._id);
|
|
686
692
|
if (!targetCartItem) {
|
|
@@ -77,8 +77,8 @@ var createCartItemOrigin = () => {
|
|
|
77
77
|
// 资源相关
|
|
78
78
|
// 资源状态 -固定
|
|
79
79
|
like_status: "common",
|
|
80
|
-
//
|
|
81
|
-
|
|
80
|
+
// 资源类型
|
|
81
|
+
relation_type: "",
|
|
82
82
|
// 所选资源
|
|
83
83
|
resources: null,
|
|
84
84
|
// 日程id - 固定
|
|
@@ -215,6 +215,7 @@ var formatResourceToCartItemOrigin = (params) => {
|
|
|
215
215
|
origin.resources = [];
|
|
216
216
|
resources.forEach((resource) => {
|
|
217
217
|
origin.resources.push({
|
|
218
|
+
relation_type: "form",
|
|
218
219
|
like_status: "common",
|
|
219
220
|
id: resource.id,
|
|
220
221
|
main_field: resource.main_field,
|
|
@@ -295,6 +295,12 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
|
|
|
295
295
|
}
|
|
296
296
|
// 更新购物车
|
|
297
297
|
updateCart(params) {
|
|
298
|
+
if (params.resources) {
|
|
299
|
+
params.resources = params.resources.map((n) => {
|
|
300
|
+
n.capacity = 1;
|
|
301
|
+
return n;
|
|
302
|
+
});
|
|
303
|
+
}
|
|
298
304
|
this.store.cart.updateItem(params);
|
|
299
305
|
const targetCartItem = this.store.cart.getItem(params._id);
|
|
300
306
|
if (!targetCartItem) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"private": false,
|
|
3
3
|
"name": "@pisell/pisellos",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.3",
|
|
5
5
|
"description": "一个可扩展的前端模块化SDK框架,支持插件系统",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"docs": "typedoc --out docs src/index.ts",
|
|
22
22
|
"sync": "node sync.js",
|
|
23
23
|
"prepublishOnly": "npm run build",
|
|
24
|
-
"deploy": "yarn run build && yarn run changeset && yarn run version &&
|
|
24
|
+
"deploy": "yarn run build && yarn run changeset && yarn run version && npm run release"
|
|
25
25
|
},
|
|
26
26
|
"repository": {
|
|
27
27
|
"type": "git",
|