@fonixtree/magic-design 1.0.14 → 1.0.16
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/ProductModal/index.js +4 -6
- package/es/composite-comp/dito/components/Recommend/defaultJSON.js +1 -1
- package/es/utils/currencyUtil.js +21 -2
- package/lib/common/ProductModal/index.js +4 -6
- package/lib/composite-comp/dito/components/Recommend/defaultJSON.js +1 -1
- package/lib/utils/currencyUtil.js +21 -2
- package/package.json +1 -1
- package/es/assets/fonts/.DS_Store +0 -0
- package/lib/assets/fonts/.DS_Store +0 -0
|
@@ -204,8 +204,6 @@ var __spreadArrays = void 0 && (void 0).__spreadArrays || function () {
|
|
|
204
204
|
return r;
|
|
205
205
|
};
|
|
206
206
|
|
|
207
|
-
var precision = (0, _currencyUtil.getPrecision)();
|
|
208
|
-
|
|
209
207
|
var formatData = function formatData(list) {
|
|
210
208
|
list.map(function (item) {
|
|
211
209
|
item.preSalesPrice = (0, _currencyUtil.formatCurrencyWithSymbol)(item.salesPrice);
|
|
@@ -701,8 +699,8 @@ var ProductModal = function ProductModal(props) {
|
|
|
701
699
|
productCode: productCode,
|
|
702
700
|
storeId: storeId,
|
|
703
701
|
cmpTypeId: promotions || '',
|
|
704
|
-
minPrice:
|
|
705
|
-
maxPrice:
|
|
702
|
+
minPrice: (0, _currencyUtil.formatBackendCurrency)(minPrice),
|
|
703
|
+
maxPrice: (0, _currencyUtil.formatBackendCurrency)(maxPrice),
|
|
706
704
|
catgIds: selCatgsList.join(','),
|
|
707
705
|
brandIds: selBrandsList.join(','),
|
|
708
706
|
labelIds: selLabelData.value || '',
|
|
@@ -731,8 +729,8 @@ var ProductModal = function ProductModal(props) {
|
|
|
731
729
|
productName: productName,
|
|
732
730
|
productCode: productCode,
|
|
733
731
|
cmpTypeId: promotions || '',
|
|
734
|
-
minPrice:
|
|
735
|
-
maxPrice:
|
|
732
|
+
minPrice: (0, _currencyUtil.formatBackendCurrency)(minPrice),
|
|
733
|
+
maxPrice: (0, _currencyUtil.formatBackendCurrency)(maxPrice),
|
|
736
734
|
catgIds: selCatgsList.join(','),
|
|
737
735
|
brandIds: selBrandsList.join(','),
|
|
738
736
|
labelIds: selLabelData.value || '',
|
package/es/utils/currencyUtil.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.numberToFixed = exports.getPricePrefix = exports.getPrecision = exports.formatCurrencyWithSymbol = exports.formatCurrency = exports.currencyToFont = exports.calcFloatCount = exports.addSeparators = void 0;
|
|
6
|
+
exports.numberToFixed = exports.getPricePrefix = exports.getPrecision = exports.formatCurrencyWithSymbol = exports.formatCurrency = exports.formatBackendCurrency = exports.currencyToFont = exports.calcFloatCount = exports.addSeparators = void 0;
|
|
7
7
|
|
|
8
8
|
var _divide = _interopRequireDefault(require("lodash/divide"));
|
|
9
9
|
|
|
@@ -54,11 +54,30 @@ var getPrecision = function getPrecision() {
|
|
|
54
54
|
return window.systemParams.precision;
|
|
55
55
|
}, '0');
|
|
56
56
|
return Number(ret);
|
|
57
|
-
};
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* 前端数值转换为后端数值
|
|
60
|
+
* @param num
|
|
61
|
+
*/
|
|
58
62
|
|
|
59
63
|
|
|
60
64
|
exports.getPrecision = getPrecision;
|
|
61
65
|
|
|
66
|
+
var formatBackendCurrency = function formatBackendCurrency(num) {
|
|
67
|
+
var precision = (0, _commonUtil.ensure)(function () {
|
|
68
|
+
return window.systemParams.precision;
|
|
69
|
+
}, '0');
|
|
70
|
+
|
|
71
|
+
if (!num) {
|
|
72
|
+
return num;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return num * Math.pow(10, precision);
|
|
76
|
+
}; // 格式化金额
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
exports.formatBackendCurrency = formatBackendCurrency;
|
|
80
|
+
|
|
62
81
|
var formatCurrency = function formatCurrency(num) {
|
|
63
82
|
var displayPrecision = (0, _commonUtil.ensure)(function () {
|
|
64
83
|
return window.systemParams.displayCurrencyPrecision;
|
|
@@ -204,8 +204,6 @@ var __spreadArrays = void 0 && (void 0).__spreadArrays || function () {
|
|
|
204
204
|
return r;
|
|
205
205
|
};
|
|
206
206
|
|
|
207
|
-
var precision = (0, _currencyUtil.getPrecision)();
|
|
208
|
-
|
|
209
207
|
var formatData = function formatData(list) {
|
|
210
208
|
list.map(function (item) {
|
|
211
209
|
item.preSalesPrice = (0, _currencyUtil.formatCurrencyWithSymbol)(item.salesPrice);
|
|
@@ -701,8 +699,8 @@ var ProductModal = function ProductModal(props) {
|
|
|
701
699
|
productCode: productCode,
|
|
702
700
|
storeId: storeId,
|
|
703
701
|
cmpTypeId: promotions || '',
|
|
704
|
-
minPrice:
|
|
705
|
-
maxPrice:
|
|
702
|
+
minPrice: (0, _currencyUtil.formatBackendCurrency)(minPrice),
|
|
703
|
+
maxPrice: (0, _currencyUtil.formatBackendCurrency)(maxPrice),
|
|
706
704
|
catgIds: selCatgsList.join(','),
|
|
707
705
|
brandIds: selBrandsList.join(','),
|
|
708
706
|
labelIds: selLabelData.value || '',
|
|
@@ -731,8 +729,8 @@ var ProductModal = function ProductModal(props) {
|
|
|
731
729
|
productName: productName,
|
|
732
730
|
productCode: productCode,
|
|
733
731
|
cmpTypeId: promotions || '',
|
|
734
|
-
minPrice:
|
|
735
|
-
maxPrice:
|
|
732
|
+
minPrice: (0, _currencyUtil.formatBackendCurrency)(minPrice),
|
|
733
|
+
maxPrice: (0, _currencyUtil.formatBackendCurrency)(maxPrice),
|
|
736
734
|
catgIds: selCatgsList.join(','),
|
|
737
735
|
brandIds: selBrandsList.join(','),
|
|
738
736
|
labelIds: selLabelData.value || '',
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.numberToFixed = exports.getPricePrefix = exports.getPrecision = exports.formatCurrencyWithSymbol = exports.formatCurrency = exports.currencyToFont = exports.calcFloatCount = exports.addSeparators = void 0;
|
|
6
|
+
exports.numberToFixed = exports.getPricePrefix = exports.getPrecision = exports.formatCurrencyWithSymbol = exports.formatCurrency = exports.formatBackendCurrency = exports.currencyToFont = exports.calcFloatCount = exports.addSeparators = void 0;
|
|
7
7
|
|
|
8
8
|
var _divide = _interopRequireDefault(require("lodash/divide"));
|
|
9
9
|
|
|
@@ -54,11 +54,30 @@ var getPrecision = function getPrecision() {
|
|
|
54
54
|
return window.systemParams.precision;
|
|
55
55
|
}, '0');
|
|
56
56
|
return Number(ret);
|
|
57
|
-
};
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* 前端数值转换为后端数值
|
|
60
|
+
* @param num
|
|
61
|
+
*/
|
|
58
62
|
|
|
59
63
|
|
|
60
64
|
exports.getPrecision = getPrecision;
|
|
61
65
|
|
|
66
|
+
var formatBackendCurrency = function formatBackendCurrency(num) {
|
|
67
|
+
var precision = (0, _commonUtil.ensure)(function () {
|
|
68
|
+
return window.systemParams.precision;
|
|
69
|
+
}, '0');
|
|
70
|
+
|
|
71
|
+
if (!num) {
|
|
72
|
+
return num;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return num * Math.pow(10, precision);
|
|
76
|
+
}; // 格式化金额
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
exports.formatBackendCurrency = formatBackendCurrency;
|
|
80
|
+
|
|
62
81
|
var formatCurrency = function formatCurrency(num) {
|
|
63
82
|
var displayPrecision = (0, _commonUtil.ensure)(function () {
|
|
64
83
|
return window.systemParams.displayCurrencyPrecision;
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|