@fonixtree/magic-design 1.0.3 → 1.0.5
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/assets/fonts/.DS_Store +0 -0
- package/es/common/ImagePicker/index.js +6 -0
- package/es/common/LinkModal/CatgTable/index.js +3 -6
- package/es/common/LinkModal/FilteredProductModal/index.js +2 -2
- package/es/common/LinkModal/ProductDetailPage/index.js +1 -1
- package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +1 -1
- package/es/meta-comp/config-panels/PlayIconConfig/index.less +4 -0
- package/es/utils/commonUtil.js +3 -2
- package/lib/assets/fonts/.DS_Store +0 -0
- package/lib/common/ImagePicker/index.js +6 -0
- package/lib/common/LinkModal/CatgTable/index.js +3 -6
- package/lib/common/LinkModal/FilteredProductModal/index.js +2 -2
- package/lib/common/LinkModal/ProductDetailPage/index.js +1 -1
- package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +1 -1
- package/lib/meta-comp/config-panels/PlayIconConfig/index.less +4 -0
- package/lib/utils/commonUtil.js +3 -2
- package/package.json +1 -1
|
Binary file
|
|
@@ -201,6 +201,12 @@ function (_super) {
|
|
|
201
201
|
return _this;
|
|
202
202
|
}
|
|
203
203
|
|
|
204
|
+
ImagePicker.prototype.componentDidMount = function () {
|
|
205
|
+
this.setState({
|
|
206
|
+
inputVal: this.props.value
|
|
207
|
+
});
|
|
208
|
+
};
|
|
209
|
+
|
|
204
210
|
ImagePicker.prototype.componentWillReceiveProps = function (nextProps) {
|
|
205
211
|
if (nextProps.value != this.props.value) {
|
|
206
212
|
this.setState({
|
|
@@ -177,21 +177,18 @@ function CatgTable(props) {
|
|
|
177
177
|
|
|
178
178
|
var queryCategory = function queryCategory() {
|
|
179
179
|
return __awaiter(_this, void 0, void 0, function () {
|
|
180
|
-
var res
|
|
180
|
+
var res;
|
|
181
181
|
return __generator(this, function (_a) {
|
|
182
182
|
switch (_a.label) {
|
|
183
183
|
case 0:
|
|
184
184
|
setLoading(true);
|
|
185
185
|
return [4
|
|
186
186
|
/*yield*/
|
|
187
|
-
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/
|
|
187
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/offercatgs/list", {}, 'GET')];
|
|
188
188
|
|
|
189
189
|
case 1:
|
|
190
190
|
res = _a.sent();
|
|
191
|
-
|
|
192
|
-
console.log('res', res);
|
|
193
|
-
console.log('tree', tree);
|
|
194
|
-
setCatgList(tree);
|
|
191
|
+
setCatgList((0, _businessUtil.listToTree)(res));
|
|
195
192
|
setLoading(false);
|
|
196
193
|
return [2
|
|
197
194
|
/*return*/
|
|
@@ -346,7 +346,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
|
|
|
346
346
|
case 0:
|
|
347
347
|
return [4
|
|
348
348
|
/*yield*/
|
|
349
|
-
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/
|
|
349
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/offercatgs/list", {}, 'GET')];
|
|
350
350
|
|
|
351
351
|
case 1:
|
|
352
352
|
res = _a.sent();
|
|
@@ -368,7 +368,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
|
|
|
368
368
|
case 0:
|
|
369
369
|
return [4
|
|
370
370
|
/*yield*/
|
|
371
|
-
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/
|
|
371
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/brands/list", {}, 'GET')];
|
|
372
372
|
|
|
373
373
|
case 1:
|
|
374
374
|
res = _a.sent();
|
|
@@ -309,7 +309,7 @@ var ProductDetailPage = function ProductDetailPage(props) {
|
|
|
309
309
|
case 0:
|
|
310
310
|
return [4
|
|
311
311
|
/*yield*/
|
|
312
|
-
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/
|
|
312
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/brands/list", {}, 'GET')];
|
|
313
313
|
|
|
314
314
|
case 1:
|
|
315
315
|
res = _a.sent();
|
package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js
CHANGED
|
@@ -275,7 +275,7 @@ function (_super) {
|
|
|
275
275
|
];
|
|
276
276
|
return [4
|
|
277
277
|
/*yield*/
|
|
278
|
-
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/
|
|
278
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/brands/list", {}, 'GET')];
|
|
279
279
|
|
|
280
280
|
case 3:
|
|
281
281
|
res = _a.sent();
|
package/es/utils/commonUtil.js
CHANGED
|
@@ -459,7 +459,7 @@ var getColorRgba = function getColorRgba(sHex, alpha) {
|
|
|
459
459
|
exports.getColorRgba = getColorRgba;
|
|
460
460
|
|
|
461
461
|
function asyncDataURLtoImage(dataUrl) {
|
|
462
|
-
return new Promise(function (resolve
|
|
462
|
+
return new Promise(function (resolve) {
|
|
463
463
|
var img = new Image();
|
|
464
464
|
|
|
465
465
|
img.onload = function () {
|
|
@@ -467,7 +467,8 @@ function asyncDataURLtoImage(dataUrl) {
|
|
|
467
467
|
};
|
|
468
468
|
|
|
469
469
|
img.onerror = function () {
|
|
470
|
-
|
|
470
|
+
console.error(dataUrl + ' img error');
|
|
471
|
+
resolve({});
|
|
471
472
|
};
|
|
472
473
|
|
|
473
474
|
img.src = dataUrl;
|
|
Binary file
|
|
@@ -201,6 +201,12 @@ function (_super) {
|
|
|
201
201
|
return _this;
|
|
202
202
|
}
|
|
203
203
|
|
|
204
|
+
ImagePicker.prototype.componentDidMount = function () {
|
|
205
|
+
this.setState({
|
|
206
|
+
inputVal: this.props.value
|
|
207
|
+
});
|
|
208
|
+
};
|
|
209
|
+
|
|
204
210
|
ImagePicker.prototype.componentWillReceiveProps = function (nextProps) {
|
|
205
211
|
if (nextProps.value != this.props.value) {
|
|
206
212
|
this.setState({
|
|
@@ -177,21 +177,18 @@ function CatgTable(props) {
|
|
|
177
177
|
|
|
178
178
|
var queryCategory = function queryCategory() {
|
|
179
179
|
return __awaiter(_this, void 0, void 0, function () {
|
|
180
|
-
var res
|
|
180
|
+
var res;
|
|
181
181
|
return __generator(this, function (_a) {
|
|
182
182
|
switch (_a.label) {
|
|
183
183
|
case 0:
|
|
184
184
|
setLoading(true);
|
|
185
185
|
return [4
|
|
186
186
|
/*yield*/
|
|
187
|
-
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/
|
|
187
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/offercatgs/list", {}, 'GET')];
|
|
188
188
|
|
|
189
189
|
case 1:
|
|
190
190
|
res = _a.sent();
|
|
191
|
-
|
|
192
|
-
console.log('res', res);
|
|
193
|
-
console.log('tree', tree);
|
|
194
|
-
setCatgList(tree);
|
|
191
|
+
setCatgList((0, _businessUtil.listToTree)(res));
|
|
195
192
|
setLoading(false);
|
|
196
193
|
return [2
|
|
197
194
|
/*return*/
|
|
@@ -346,7 +346,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
|
|
|
346
346
|
case 0:
|
|
347
347
|
return [4
|
|
348
348
|
/*yield*/
|
|
349
|
-
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/
|
|
349
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/offercatgs/list", {}, 'GET')];
|
|
350
350
|
|
|
351
351
|
case 1:
|
|
352
352
|
res = _a.sent();
|
|
@@ -368,7 +368,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
|
|
|
368
368
|
case 0:
|
|
369
369
|
return [4
|
|
370
370
|
/*yield*/
|
|
371
|
-
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/
|
|
371
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/brands/list", {}, 'GET')];
|
|
372
372
|
|
|
373
373
|
case 1:
|
|
374
374
|
res = _a.sent();
|
|
@@ -309,7 +309,7 @@ var ProductDetailPage = function ProductDetailPage(props) {
|
|
|
309
309
|
case 0:
|
|
310
310
|
return [4
|
|
311
311
|
/*yield*/
|
|
312
|
-
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/
|
|
312
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/brands/list", {}, 'GET')];
|
|
313
313
|
|
|
314
314
|
case 1:
|
|
315
315
|
res = _a.sent();
|
package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js
CHANGED
|
@@ -275,7 +275,7 @@ function (_super) {
|
|
|
275
275
|
];
|
|
276
276
|
return [4
|
|
277
277
|
/*yield*/
|
|
278
|
-
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/
|
|
278
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/brands/list", {}, 'GET')];
|
|
279
279
|
|
|
280
280
|
case 3:
|
|
281
281
|
res = _a.sent();
|
package/lib/utils/commonUtil.js
CHANGED
|
@@ -459,7 +459,7 @@ var getColorRgba = function getColorRgba(sHex, alpha) {
|
|
|
459
459
|
exports.getColorRgba = getColorRgba;
|
|
460
460
|
|
|
461
461
|
function asyncDataURLtoImage(dataUrl) {
|
|
462
|
-
return new Promise(function (resolve
|
|
462
|
+
return new Promise(function (resolve) {
|
|
463
463
|
var img = new Image();
|
|
464
464
|
|
|
465
465
|
img.onload = function () {
|
|
@@ -467,7 +467,8 @@ function asyncDataURLtoImage(dataUrl) {
|
|
|
467
467
|
};
|
|
468
468
|
|
|
469
469
|
img.onerror = function () {
|
|
470
|
-
|
|
470
|
+
console.error(dataUrl + ' img error');
|
|
471
|
+
resolve({});
|
|
471
472
|
};
|
|
472
473
|
|
|
473
474
|
img.src = dataUrl;
|