@fonixtree/magic-design 0.0.88 → 0.0.90
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/es/common/LinkModal/CustomTable/index.js +2 -2
- package/es/composite-comp/common/components/ProductItem/index.js +25 -4
- package/es/composite-comp/dito/components/FlashDeal/mobile/index.js +17 -5
- package/lib/common/LinkModal/CustomTable/index.js +2 -2
- package/lib/composite-comp/common/components/ProductItem/index.js +25 -4
- package/lib/composite-comp/dito/components/FlashDeal/mobile/index.js +17 -5
- package/package.json +1 -1
|
@@ -209,8 +209,8 @@ function CustomTable(props) {
|
|
|
209
209
|
dataIndex: 'pageName'
|
|
210
210
|
}];
|
|
211
211
|
var rowSelection = {
|
|
212
|
-
onChange: function onChange(selectedRowKeys) {
|
|
213
|
-
_onChange("customized-" +
|
|
212
|
+
onChange: function onChange(selectedRowKeys, selectedRows) {
|
|
213
|
+
_onChange("customized-" + (selectedRows[0].pageCode || selectedRows[0].bdPageId || ''));
|
|
214
214
|
},
|
|
215
215
|
type: 'radio'
|
|
216
216
|
};
|
|
@@ -105,16 +105,37 @@ function (_super) {
|
|
|
105
105
|
layout = _a.layout,
|
|
106
106
|
imgHeight = _a.imgHeight,
|
|
107
107
|
imgWidth = _a.imgWidth,
|
|
108
|
-
|
|
108
|
+
unknownPrice = _a.unknownPrice,
|
|
109
|
+
rest = __rest(_a, ["data", "panelProps", "onItemClick", "showProName", "showProgress", "fixHeight", "layout", "imgHeight", "imgWidth", "unknownPrice"]);
|
|
109
110
|
|
|
110
111
|
var promotions = (0, _businessUtil.getPromotionList)(data);
|
|
111
|
-
var price = (0, _currencyUtil.
|
|
112
|
+
var price = (0, _currencyUtil.formatCurrency)(data.salesPrice);
|
|
112
113
|
/** 当是拼团时 显示价格 */
|
|
113
114
|
|
|
114
115
|
if (data.sppType && promotions.length) {
|
|
115
|
-
price = data.specialPrice !== null ? (0, _currencyUtil.
|
|
116
|
+
price = data.specialPrice !== null ? (0, _currencyUtil.formatCurrency)(data.specialPrice) : (0, _currencyUtil.formatCurrency)(data.salesPrice);
|
|
116
117
|
}
|
|
117
118
|
|
|
119
|
+
var integerPart = price;
|
|
120
|
+
var decimalPart = null;
|
|
121
|
+
|
|
122
|
+
if (unknownPrice) {
|
|
123
|
+
if (price.length > 5) {
|
|
124
|
+
integerPart = price.slice(0, -5).replace(/\d/g, '? ') + price.slice(-5);
|
|
125
|
+
} else {
|
|
126
|
+
integerPart = price.replace(/\d/, '? ');
|
|
127
|
+
}
|
|
128
|
+
} else if (Array.isArray(price)) {
|
|
129
|
+
integerPart = price[0];
|
|
130
|
+
decimalPart = price[1];
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
var pricePrefix = (0, _commonUtil.ensure)(function () {
|
|
134
|
+
return window.ecommerce.prefix;
|
|
135
|
+
}, 'Rp');
|
|
136
|
+
|
|
137
|
+
var _price = pricePrefix + " " + integerPart + " " + (decimalPart ? '.' + decimalPart : '');
|
|
138
|
+
|
|
118
139
|
var oldPrice = data.marketPrice !== null ? (0, _currencyUtil.formatCurrencyWithSymbol)(data.marketPrice) : null;
|
|
119
140
|
var discount = Number(data.discountPercent) || 0;
|
|
120
141
|
var salePercent = Number(data.salePercent) / 100 || 0;
|
|
@@ -164,7 +185,7 @@ function (_super) {
|
|
|
164
185
|
}), panelProps.activityPrice.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
165
186
|
className: "price",
|
|
166
187
|
data: __assign(__assign({}, panelProps.activityPrice), {
|
|
167
|
-
text:
|
|
188
|
+
text: _price
|
|
168
189
|
}),
|
|
169
190
|
readonly: true
|
|
170
191
|
}), oldPrice && panelProps.salesPrice.open && /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -13,6 +13,8 @@ var _defImg = _interopRequireDefault(require("./imgs/defImg1.png"));
|
|
|
13
13
|
|
|
14
14
|
var _defImg2 = _interopRequireDefault(require("./imgs/defImg2.png"));
|
|
15
15
|
|
|
16
|
+
var _defImg3 = _interopRequireDefault(require("./imgs/defImg3.png"));
|
|
17
|
+
|
|
16
18
|
var _ProductItem = _interopRequireDefault(require("../../../../common/components/ProductItem"));
|
|
17
19
|
|
|
18
20
|
var _coreUtil = require("../../../../../utils/coreUtil");
|
|
@@ -221,11 +223,10 @@ var defaultData = [{
|
|
|
221
223
|
url: _defImg["default"]
|
|
222
224
|
},
|
|
223
225
|
offerName: 'DITO STARTER PACK + 3GB Data',
|
|
224
|
-
salesPrice:
|
|
226
|
+
salesPrice: 1100,
|
|
225
227
|
marketPrice: 100,
|
|
226
228
|
discountPercent: 51,
|
|
227
|
-
salePercent: 5000
|
|
228
|
-
sppType: '2'
|
|
229
|
+
salePercent: 5000
|
|
229
230
|
}, {
|
|
230
231
|
imgUrlContent: {
|
|
231
232
|
url: _defImg2["default"]
|
|
@@ -236,6 +237,16 @@ var defaultData = [{
|
|
|
236
237
|
discountPercent: 50,
|
|
237
238
|
salePercent: 5000,
|
|
238
239
|
sppType: '2'
|
|
240
|
+
}, {
|
|
241
|
+
imgUrlContent: {
|
|
242
|
+
url: _defImg3["default"]
|
|
243
|
+
},
|
|
244
|
+
offerName: 'DITO Level-Up Pack 99 7GB',
|
|
245
|
+
salesPrice: 99,
|
|
246
|
+
marketPrice: 138,
|
|
247
|
+
discountPercent: 28,
|
|
248
|
+
salePercent: 5000,
|
|
249
|
+
sppType: '2'
|
|
239
250
|
}];
|
|
240
251
|
|
|
241
252
|
var FlashDealMobile =
|
|
@@ -255,7 +266,7 @@ function (_super) {
|
|
|
255
266
|
effDate: '',
|
|
256
267
|
expDate: '',
|
|
257
268
|
now: '',
|
|
258
|
-
isWill:
|
|
269
|
+
isWill: true
|
|
259
270
|
};
|
|
260
271
|
|
|
261
272
|
_this.getFlashData = function (pageSize, campaign) {
|
|
@@ -427,7 +438,8 @@ function (_super) {
|
|
|
427
438
|
|
|
428
439
|
return (0, _coreUtil.clickUrl)("/product/detail/" + item.offerId + "?productId=" + ((_a = item.sppProductId) !== null && _a !== void 0 ? _a : ''));
|
|
429
440
|
},
|
|
430
|
-
panelProps: panelProps.content
|
|
441
|
+
panelProps: panelProps.content,
|
|
442
|
+
unknownPrice: isWill
|
|
431
443
|
});
|
|
432
444
|
}))));
|
|
433
445
|
};
|
|
@@ -209,8 +209,8 @@ function CustomTable(props) {
|
|
|
209
209
|
dataIndex: 'pageName'
|
|
210
210
|
}];
|
|
211
211
|
var rowSelection = {
|
|
212
|
-
onChange: function onChange(selectedRowKeys) {
|
|
213
|
-
_onChange("customized-" +
|
|
212
|
+
onChange: function onChange(selectedRowKeys, selectedRows) {
|
|
213
|
+
_onChange("customized-" + (selectedRows[0].pageCode || selectedRows[0].bdPageId || ''));
|
|
214
214
|
},
|
|
215
215
|
type: 'radio'
|
|
216
216
|
};
|
|
@@ -105,16 +105,37 @@ function (_super) {
|
|
|
105
105
|
layout = _a.layout,
|
|
106
106
|
imgHeight = _a.imgHeight,
|
|
107
107
|
imgWidth = _a.imgWidth,
|
|
108
|
-
|
|
108
|
+
unknownPrice = _a.unknownPrice,
|
|
109
|
+
rest = __rest(_a, ["data", "panelProps", "onItemClick", "showProName", "showProgress", "fixHeight", "layout", "imgHeight", "imgWidth", "unknownPrice"]);
|
|
109
110
|
|
|
110
111
|
var promotions = (0, _businessUtil.getPromotionList)(data);
|
|
111
|
-
var price = (0, _currencyUtil.
|
|
112
|
+
var price = (0, _currencyUtil.formatCurrency)(data.salesPrice);
|
|
112
113
|
/** 当是拼团时 显示价格 */
|
|
113
114
|
|
|
114
115
|
if (data.sppType && promotions.length) {
|
|
115
|
-
price = data.specialPrice !== null ? (0, _currencyUtil.
|
|
116
|
+
price = data.specialPrice !== null ? (0, _currencyUtil.formatCurrency)(data.specialPrice) : (0, _currencyUtil.formatCurrency)(data.salesPrice);
|
|
116
117
|
}
|
|
117
118
|
|
|
119
|
+
var integerPart = price;
|
|
120
|
+
var decimalPart = null;
|
|
121
|
+
|
|
122
|
+
if (unknownPrice) {
|
|
123
|
+
if (price.length > 5) {
|
|
124
|
+
integerPart = price.slice(0, -5).replace(/\d/g, '? ') + price.slice(-5);
|
|
125
|
+
} else {
|
|
126
|
+
integerPart = price.replace(/\d/, '? ');
|
|
127
|
+
}
|
|
128
|
+
} else if (Array.isArray(price)) {
|
|
129
|
+
integerPart = price[0];
|
|
130
|
+
decimalPart = price[1];
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
var pricePrefix = (0, _commonUtil.ensure)(function () {
|
|
134
|
+
return window.ecommerce.prefix;
|
|
135
|
+
}, 'Rp');
|
|
136
|
+
|
|
137
|
+
var _price = pricePrefix + " " + integerPart + " " + (decimalPart ? '.' + decimalPart : '');
|
|
138
|
+
|
|
118
139
|
var oldPrice = data.marketPrice !== null ? (0, _currencyUtil.formatCurrencyWithSymbol)(data.marketPrice) : null;
|
|
119
140
|
var discount = Number(data.discountPercent) || 0;
|
|
120
141
|
var salePercent = Number(data.salePercent) / 100 || 0;
|
|
@@ -164,7 +185,7 @@ function (_super) {
|
|
|
164
185
|
}), panelProps.activityPrice.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
165
186
|
className: "price",
|
|
166
187
|
data: __assign(__assign({}, panelProps.activityPrice), {
|
|
167
|
-
text:
|
|
188
|
+
text: _price
|
|
168
189
|
}),
|
|
169
190
|
readonly: true
|
|
170
191
|
}), oldPrice && panelProps.salesPrice.open && /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -13,6 +13,8 @@ var _defImg = _interopRequireDefault(require("./imgs/defImg1.png"));
|
|
|
13
13
|
|
|
14
14
|
var _defImg2 = _interopRequireDefault(require("./imgs/defImg2.png"));
|
|
15
15
|
|
|
16
|
+
var _defImg3 = _interopRequireDefault(require("./imgs/defImg3.png"));
|
|
17
|
+
|
|
16
18
|
var _ProductItem = _interopRequireDefault(require("../../../../common/components/ProductItem"));
|
|
17
19
|
|
|
18
20
|
var _coreUtil = require("../../../../../utils/coreUtil");
|
|
@@ -221,11 +223,10 @@ var defaultData = [{
|
|
|
221
223
|
url: _defImg["default"]
|
|
222
224
|
},
|
|
223
225
|
offerName: 'DITO STARTER PACK + 3GB Data',
|
|
224
|
-
salesPrice:
|
|
226
|
+
salesPrice: 1100,
|
|
225
227
|
marketPrice: 100,
|
|
226
228
|
discountPercent: 51,
|
|
227
|
-
salePercent: 5000
|
|
228
|
-
sppType: '2'
|
|
229
|
+
salePercent: 5000
|
|
229
230
|
}, {
|
|
230
231
|
imgUrlContent: {
|
|
231
232
|
url: _defImg2["default"]
|
|
@@ -236,6 +237,16 @@ var defaultData = [{
|
|
|
236
237
|
discountPercent: 50,
|
|
237
238
|
salePercent: 5000,
|
|
238
239
|
sppType: '2'
|
|
240
|
+
}, {
|
|
241
|
+
imgUrlContent: {
|
|
242
|
+
url: _defImg3["default"]
|
|
243
|
+
},
|
|
244
|
+
offerName: 'DITO Level-Up Pack 99 7GB',
|
|
245
|
+
salesPrice: 99,
|
|
246
|
+
marketPrice: 138,
|
|
247
|
+
discountPercent: 28,
|
|
248
|
+
salePercent: 5000,
|
|
249
|
+
sppType: '2'
|
|
239
250
|
}];
|
|
240
251
|
|
|
241
252
|
var FlashDealMobile =
|
|
@@ -255,7 +266,7 @@ function (_super) {
|
|
|
255
266
|
effDate: '',
|
|
256
267
|
expDate: '',
|
|
257
268
|
now: '',
|
|
258
|
-
isWill:
|
|
269
|
+
isWill: true
|
|
259
270
|
};
|
|
260
271
|
|
|
261
272
|
_this.getFlashData = function (pageSize, campaign) {
|
|
@@ -427,7 +438,8 @@ function (_super) {
|
|
|
427
438
|
|
|
428
439
|
return (0, _coreUtil.clickUrl)("/product/detail/" + item.offerId + "?productId=" + ((_a = item.sppProductId) !== null && _a !== void 0 ? _a : ''));
|
|
429
440
|
},
|
|
430
|
-
panelProps: panelProps.content
|
|
441
|
+
panelProps: panelProps.content,
|
|
442
|
+
unknownPrice: isWill
|
|
431
443
|
});
|
|
432
444
|
}))));
|
|
433
445
|
};
|