@fonixtree/magic-design 1.0.172 → 1.0.174

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.
@@ -130,7 +130,7 @@ function (_super) {
130
130
  return null;
131
131
  };
132
132
 
133
- CountDown.prototype.componentDidUpdate = function () {
133
+ CountDown.prototype.componentDidMount = function () {
134
134
  var now = this.state.now;
135
135
 
136
136
  if (this.preTime != now) {
@@ -299,10 +299,9 @@ function (_super) {
299
299
 
300
300
  _this.getNextFlashSale = function () {
301
301
  return __awaiter(_this, void 0, void 0, function () {
302
- var data, _i, _a, _b, i, s, v, pageId;
303
-
304
- return __generator(this, function (_c) {
305
- switch (_c.label) {
302
+ var data, i, arr, pageId;
303
+ return __generator(this, function (_a) {
304
+ switch (_a.label) {
306
305
  case 0:
307
306
  return [4
308
307
  /*yield*/
@@ -311,35 +310,34 @@ function (_super) {
311
310
  }, 'GET')];
312
311
 
313
312
  case 1:
314
- data = _c.sent();
313
+ data = _a.sent();
315
314
  if (!(data.length > 0)) return [3
316
315
  /*break*/
317
316
  , 6];
318
- _i = 0, _a = data.entries();
319
- _c.label = 2;
317
+ i = 0;
318
+ _a.label = 2;
320
319
 
321
320
  case 2:
322
- if (!(_i < _a.length)) return [3
321
+ if (!(i < data.length)) return [3
323
322
  /*break*/
324
323
  , 5];
325
- _b = _a[_i], i = _b[0], s = _b[1];
326
324
  return [4
327
325
  /*yield*/
328
- , this.getFlashData(2, s, i, data.length)];
326
+ , this.getFlashData(2, data[i], i, data.length)];
329
327
 
330
328
  case 3:
331
- v = _c.sent();
329
+ arr = _a.sent();
332
330
 
333
- if (v.length > 0) {
334
- return [2
335
- /*return*/
336
- , true]; // 查询到秒杀场次,立即退出
331
+ if (arr.length > 0) {
332
+ return [3
333
+ /*break*/
334
+ , 5]; // 查询到秒杀场次,立即退出
337
335
  }
338
336
 
339
- _c.label = 4;
337
+ _a.label = 4;
340
338
 
341
339
  case 4:
342
- _i++;
340
+ i++;
343
341
  return [3
344
342
  /*break*/
345
343
  , 2];
@@ -361,7 +359,7 @@ function (_super) {
361
359
  (0, _storeUtil.setMagicStore)("flashSale_" + pageId + "_" + this.props.panelProps.id, []);
362
360
  }
363
361
 
364
- _c.label = 7;
362
+ _a.label = 7;
365
363
 
366
364
  case 7:
367
365
  return [2
@@ -85,7 +85,7 @@ function (_super) {
85
85
 
86
86
 
87
87
  var imgLabels = ((_a = data.labels) === null || _a === void 0 ? void 0 : _a.filter(function (f) {
88
- return f.position !== '6' && f.position !== '7';
88
+ return f.position !== '6' && f.position !== '7' && f.position !== '8';
89
89
  })) || [];
90
90
  return /*#__PURE__*/_react["default"].createElement("div", _extends({
91
91
  className: "m-campaign-product-item",
@@ -74,7 +74,7 @@ function (_super) {
74
74
  var flashSale = panelProps.groupSource[0];
75
75
  var groupBuy = panelProps.groupSource[1];
76
76
  var bargain = panelProps.groupSource[2];
77
- var carouselHide = !flashSale.open && !groupBuy.open && !bargain.open;
77
+ var carouselHide = (!flashSale.open || flashSaleHide) && (!groupBuy.open || groupBuyHide) && (!bargain.open || bargainHide);
78
78
  return /*#__PURE__*/_react["default"].createElement("div", {
79
79
  className: "m-campaign-mobile"
80
80
  }, /*#__PURE__*/_react["default"].createElement("div", {
@@ -592,6 +592,11 @@ function (_super) {
592
592
  _this.getMacy(".macyContainer_" + _this.props.panelProps.id, LAYOUT_COLUMN[layout]);
593
593
  }
594
594
  });
595
+ setTimeout(function () {
596
+ if (document.querySelector(".macyContainer_" + _this.props.panelProps.id)) {
597
+ _this.getMacy(".macyContainer_" + _this.props.panelProps.id, LAYOUT_COLUMN[layout]);
598
+ }
599
+ }, 3000);
595
600
  };
596
601
 
597
602
  _this.getMacy = function (container, columns) {
@@ -130,7 +130,7 @@ function (_super) {
130
130
  return null;
131
131
  };
132
132
 
133
- CountDown.prototype.componentDidUpdate = function () {
133
+ CountDown.prototype.componentDidMount = function () {
134
134
  var now = this.state.now;
135
135
 
136
136
  if (this.preTime != now) {
@@ -299,10 +299,9 @@ function (_super) {
299
299
 
300
300
  _this.getNextFlashSale = function () {
301
301
  return __awaiter(_this, void 0, void 0, function () {
302
- var data, _i, _a, _b, i, s, v, pageId;
303
-
304
- return __generator(this, function (_c) {
305
- switch (_c.label) {
302
+ var data, i, arr, pageId;
303
+ return __generator(this, function (_a) {
304
+ switch (_a.label) {
306
305
  case 0:
307
306
  return [4
308
307
  /*yield*/
@@ -311,35 +310,34 @@ function (_super) {
311
310
  }, 'GET')];
312
311
 
313
312
  case 1:
314
- data = _c.sent();
313
+ data = _a.sent();
315
314
  if (!(data.length > 0)) return [3
316
315
  /*break*/
317
316
  , 6];
318
- _i = 0, _a = data.entries();
319
- _c.label = 2;
317
+ i = 0;
318
+ _a.label = 2;
320
319
 
321
320
  case 2:
322
- if (!(_i < _a.length)) return [3
321
+ if (!(i < data.length)) return [3
323
322
  /*break*/
324
323
  , 5];
325
- _b = _a[_i], i = _b[0], s = _b[1];
326
324
  return [4
327
325
  /*yield*/
328
- , this.getFlashData(2, s, i, data.length)];
326
+ , this.getFlashData(2, data[i], i, data.length)];
329
327
 
330
328
  case 3:
331
- v = _c.sent();
329
+ arr = _a.sent();
332
330
 
333
- if (v.length > 0) {
334
- return [2
335
- /*return*/
336
- , true]; // 查询到秒杀场次,立即退出
331
+ if (arr.length > 0) {
332
+ return [3
333
+ /*break*/
334
+ , 5]; // 查询到秒杀场次,立即退出
337
335
  }
338
336
 
339
- _c.label = 4;
337
+ _a.label = 4;
340
338
 
341
339
  case 4:
342
- _i++;
340
+ i++;
343
341
  return [3
344
342
  /*break*/
345
343
  , 2];
@@ -361,7 +359,7 @@ function (_super) {
361
359
  (0, _storeUtil.setMagicStore)("flashSale_" + pageId + "_" + this.props.panelProps.id, []);
362
360
  }
363
361
 
364
- _c.label = 7;
362
+ _a.label = 7;
365
363
 
366
364
  case 7:
367
365
  return [2
@@ -85,7 +85,7 @@ function (_super) {
85
85
 
86
86
 
87
87
  var imgLabels = ((_a = data.labels) === null || _a === void 0 ? void 0 : _a.filter(function (f) {
88
- return f.position !== '6' && f.position !== '7';
88
+ return f.position !== '6' && f.position !== '7' && f.position !== '8';
89
89
  })) || [];
90
90
  return /*#__PURE__*/_react["default"].createElement("div", _extends({
91
91
  className: "m-campaign-product-item",
@@ -74,7 +74,7 @@ function (_super) {
74
74
  var flashSale = panelProps.groupSource[0];
75
75
  var groupBuy = panelProps.groupSource[1];
76
76
  var bargain = panelProps.groupSource[2];
77
- var carouselHide = !flashSale.open && !groupBuy.open && !bargain.open;
77
+ var carouselHide = (!flashSale.open || flashSaleHide) && (!groupBuy.open || groupBuyHide) && (!bargain.open || bargainHide);
78
78
  return /*#__PURE__*/_react["default"].createElement("div", {
79
79
  className: "m-campaign-mobile"
80
80
  }, /*#__PURE__*/_react["default"].createElement("div", {
@@ -592,6 +592,11 @@ function (_super) {
592
592
  _this.getMacy(".macyContainer_" + _this.props.panelProps.id, LAYOUT_COLUMN[layout]);
593
593
  }
594
594
  });
595
+ setTimeout(function () {
596
+ if (document.querySelector(".macyContainer_" + _this.props.panelProps.id)) {
597
+ _this.getMacy(".macyContainer_" + _this.props.panelProps.id, LAYOUT_COLUMN[layout]);
598
+ }
599
+ }, 3000);
595
600
  };
596
601
 
597
602
  _this.getMacy = function (container, columns) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fonixtree/magic-design",
3
3
  "author": "Cylon Team",
4
- "version": "1.0.172",
4
+ "version": "1.0.174",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",