@fonixtree/magic-design 1.0.80 → 1.0.82

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.
@@ -222,7 +222,7 @@ function (_super) {
222
222
  }, /*#__PURE__*/_react["default"].createElement("div", {
223
223
  className: "old-price-wrap"
224
224
  }, !!discount && /*#__PURE__*/_react["default"].createElement("span", {
225
- className: "discount"
225
+ className: type === 'groupBuy' ? 'discount2' : 'discount'
226
226
  }, "-", discount, "%"), oldPrice && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
227
227
  className: "old-price",
228
228
  data: __assign(__assign({}, panelProps.salesPrice), {
@@ -232,7 +232,7 @@ function (_super) {
232
232
  style: {
233
233
  color: panelProps.salesPrice.content.color
234
234
  }
235
- })), !showProgress && data.salesCnt > 0 && /*#__PURE__*/_react["default"].createElement("div", {
235
+ })), type !== 'groupBuy' && !showProgress && data.salesCnt > 0 && /*#__PURE__*/_react["default"].createElement("div", {
236
236
  className: "sold-count"
237
237
  }, (0, _commonUtil.convertCount)(data.salesCnt), " sold")), showProgress && ((_d = panelProps.salesProgressVisible) === null || _d === void 0 ? void 0 : _d.open) && /*#__PURE__*/_react["default"].createElement("div", {
238
238
  className: "progress-wrap"
@@ -94,6 +94,16 @@
94
94
  background-color: #CE1126;
95
95
  }
96
96
 
97
+ .discount2 {
98
+ margin-right: 3px;
99
+ font-family: 'Montserrat';
100
+ font-style: normal;
101
+ font-weight: 700;
102
+ font-size: 12px;
103
+ line-height: 15px;
104
+ color: #2F3043;
105
+ }
106
+
97
107
  .old-price {
98
108
  text-decoration: line-through;
99
109
  width: fit-content;
@@ -236,11 +236,13 @@ function (_super) {
236
236
  _this.onItemClick = function (v) {
237
237
  var _a;
238
238
 
239
- var routeUrl = (_a = orderData[v]) === null || _a === void 0 ? void 0 : _a.route;
240
- var selfUrl = (0, _commonUtil.ensure)(function () {
241
- return item.title.content.clickUrl.value || item.image.content.clickUrl.value;
242
- }, '');
243
- (0, _commonUtil.navigateTo)(routeUrl || selfUrl);
239
+ if ((0, _commonUtil.checkLogin)(true)) {
240
+ var routeUrl = (_a = orderData[v]) === null || _a === void 0 ? void 0 : _a.route;
241
+ var selfUrl = (0, _commonUtil.ensure)(function () {
242
+ return item.title.content.clickUrl.value || item.image.content.clickUrl.value;
243
+ }, '');
244
+ (0, _commonUtil.navigateTo)(routeUrl || selfUrl);
245
+ }
244
246
  };
245
247
 
246
248
  _this.getInit = function () {
@@ -308,7 +310,7 @@ function (_super) {
308
310
  }, /*#__PURE__*/_react["default"].createElement("span", {
309
311
  className: "text",
310
312
  onClick: function onClick() {
311
- return (0, _commonUtil.navigateTo)('/main/order/0');
313
+ if ((0, _commonUtil.checkLogin)(true)) (0, _commonUtil.navigateTo)('/main/order/0');
312
314
  }
313
315
  }, (0, _locale.i18n)('VIEW_ALL_ORDERS')), /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
314
316
  color: "#C7C7C7",
@@ -317,7 +317,7 @@ function (_super) {
317
317
  };
318
318
 
319
319
  _this.goLoginPage = function () {
320
- if ((0, _androidUtil.browserVersion)().isApp) {
320
+ if ((0, _androidUtil.browserVersion)().isDitoApp) {
321
321
  (0, _androidUtil.goToLoginApp)();
322
322
  } else {
323
323
  (0, _commonUtil.goLogin)();
@@ -462,11 +462,13 @@ function (_super) {
462
462
  _this.onItemClick = function (v) {
463
463
  var _a;
464
464
 
465
- var routeUrl = (_a = pInfoData[v]) === null || _a === void 0 ? void 0 : _a.route;
466
- var selfUrl = (0, _commonUtil.ensure)(function () {
467
- return item.title.content.clickUrl.value || item.image.content.clickUrl.value;
468
- }, '');
469
- (0, _commonUtil.navigateTo)(routeUrl || selfUrl);
465
+ if ((0, _commonUtil.checkLogin)(true)) {
466
+ var routeUrl = (_a = pInfoData[v]) === null || _a === void 0 ? void 0 : _a.route;
467
+ var selfUrl = (0, _commonUtil.ensure)(function () {
468
+ return item.title.content.clickUrl.value || item.image.content.clickUrl.value;
469
+ }, '');
470
+ (0, _commonUtil.navigateTo)(routeUrl || selfUrl);
471
+ }
470
472
  };
471
473
 
472
474
  return _this;
@@ -22,6 +22,9 @@ var browserVersion = function browserVersion() {
22
22
  weixin: u.indexOf('MicroMessenger') > -1,
23
23
  qq: u.match(/\sQQ/i) == ' qq',
24
24
  isApp: u.indexOf('app/CYLON-APP') > -1,
25
+ isDitoApp: u.indexOf('mydito') > -1,
26
+ ditoAndroidApp: u.indexOf('mydito') > -1 && (u.indexOf('Android') > -1 || u.indexOf('Adr') > -1),
27
+ ditoIosApp: u.indexOf('mydito') > -1 && !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),
25
28
  isAshitaApp: u.indexOf('app/ASHITA-APP') > -1
26
29
  };
27
30
  };
@@ -135,9 +138,9 @@ var sendToApp = function sendToApp(params) {
135
138
  exports.sendToApp = sendToApp;
136
139
 
137
140
  var goToLoginApp = function goToLoginApp() {
138
- if (browserVersion().androidApp) {
141
+ if (browserVersion().ditoAndroidApp) {
139
142
  window.dito.goToLogin();
140
- } else if (browserVersion().iosApp) {
143
+ } else if (browserVersion().ditoIosApp) {
141
144
  window.dito.goToLogin();
142
145
  }
143
146
  };
@@ -371,8 +371,8 @@ var checkLogin = function checkLogin(isLead, redirectUrl, replaceFlag) {
371
371
 
372
372
  if (!isLogin()) {
373
373
  if (isLead) {
374
- if ((0, _androidUtil.browserVersion)().isApp) {
375
- goToLoginApp();
374
+ if ((0, _androidUtil.browserVersion)().isDitoApp) {
375
+ (0, _androidUtil.goToLoginApp)();
376
376
  } else {
377
377
  var _a = window.location,
378
378
  pathname = _a.pathname,
@@ -222,7 +222,7 @@ function (_super) {
222
222
  }, /*#__PURE__*/_react["default"].createElement("div", {
223
223
  className: "old-price-wrap"
224
224
  }, !!discount && /*#__PURE__*/_react["default"].createElement("span", {
225
- className: "discount"
225
+ className: type === 'groupBuy' ? 'discount2' : 'discount'
226
226
  }, "-", discount, "%"), oldPrice && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
227
227
  className: "old-price",
228
228
  data: __assign(__assign({}, panelProps.salesPrice), {
@@ -232,7 +232,7 @@ function (_super) {
232
232
  style: {
233
233
  color: panelProps.salesPrice.content.color
234
234
  }
235
- })), !showProgress && data.salesCnt > 0 && /*#__PURE__*/_react["default"].createElement("div", {
235
+ })), type !== 'groupBuy' && !showProgress && data.salesCnt > 0 && /*#__PURE__*/_react["default"].createElement("div", {
236
236
  className: "sold-count"
237
237
  }, (0, _commonUtil.convertCount)(data.salesCnt), " sold")), showProgress && ((_d = panelProps.salesProgressVisible) === null || _d === void 0 ? void 0 : _d.open) && /*#__PURE__*/_react["default"].createElement("div", {
238
238
  className: "progress-wrap"
@@ -94,6 +94,16 @@
94
94
  background-color: #CE1126;
95
95
  }
96
96
 
97
+ .discount2 {
98
+ margin-right: 3px;
99
+ font-family: 'Montserrat';
100
+ font-style: normal;
101
+ font-weight: 700;
102
+ font-size: 12px;
103
+ line-height: 15px;
104
+ color: #2F3043;
105
+ }
106
+
97
107
  .old-price {
98
108
  text-decoration: line-through;
99
109
  width: fit-content;
@@ -236,11 +236,13 @@ function (_super) {
236
236
  _this.onItemClick = function (v) {
237
237
  var _a;
238
238
 
239
- var routeUrl = (_a = orderData[v]) === null || _a === void 0 ? void 0 : _a.route;
240
- var selfUrl = (0, _commonUtil.ensure)(function () {
241
- return item.title.content.clickUrl.value || item.image.content.clickUrl.value;
242
- }, '');
243
- (0, _commonUtil.navigateTo)(routeUrl || selfUrl);
239
+ if ((0, _commonUtil.checkLogin)(true)) {
240
+ var routeUrl = (_a = orderData[v]) === null || _a === void 0 ? void 0 : _a.route;
241
+ var selfUrl = (0, _commonUtil.ensure)(function () {
242
+ return item.title.content.clickUrl.value || item.image.content.clickUrl.value;
243
+ }, '');
244
+ (0, _commonUtil.navigateTo)(routeUrl || selfUrl);
245
+ }
244
246
  };
245
247
 
246
248
  _this.getInit = function () {
@@ -308,7 +310,7 @@ function (_super) {
308
310
  }, /*#__PURE__*/_react["default"].createElement("span", {
309
311
  className: "text",
310
312
  onClick: function onClick() {
311
- return (0, _commonUtil.navigateTo)('/main/order/0');
313
+ if ((0, _commonUtil.checkLogin)(true)) (0, _commonUtil.navigateTo)('/main/order/0');
312
314
  }
313
315
  }, (0, _locale.i18n)('VIEW_ALL_ORDERS')), /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
314
316
  color: "#C7C7C7",
@@ -317,7 +317,7 @@ function (_super) {
317
317
  };
318
318
 
319
319
  _this.goLoginPage = function () {
320
- if ((0, _androidUtil.browserVersion)().isApp) {
320
+ if ((0, _androidUtil.browserVersion)().isDitoApp) {
321
321
  (0, _androidUtil.goToLoginApp)();
322
322
  } else {
323
323
  (0, _commonUtil.goLogin)();
@@ -462,11 +462,13 @@ function (_super) {
462
462
  _this.onItemClick = function (v) {
463
463
  var _a;
464
464
 
465
- var routeUrl = (_a = pInfoData[v]) === null || _a === void 0 ? void 0 : _a.route;
466
- var selfUrl = (0, _commonUtil.ensure)(function () {
467
- return item.title.content.clickUrl.value || item.image.content.clickUrl.value;
468
- }, '');
469
- (0, _commonUtil.navigateTo)(routeUrl || selfUrl);
465
+ if ((0, _commonUtil.checkLogin)(true)) {
466
+ var routeUrl = (_a = pInfoData[v]) === null || _a === void 0 ? void 0 : _a.route;
467
+ var selfUrl = (0, _commonUtil.ensure)(function () {
468
+ return item.title.content.clickUrl.value || item.image.content.clickUrl.value;
469
+ }, '');
470
+ (0, _commonUtil.navigateTo)(routeUrl || selfUrl);
471
+ }
470
472
  };
471
473
 
472
474
  return _this;
@@ -22,6 +22,9 @@ var browserVersion = function browserVersion() {
22
22
  weixin: u.indexOf('MicroMessenger') > -1,
23
23
  qq: u.match(/\sQQ/i) == ' qq',
24
24
  isApp: u.indexOf('app/CYLON-APP') > -1,
25
+ isDitoApp: u.indexOf('mydito') > -1,
26
+ ditoAndroidApp: u.indexOf('mydito') > -1 && (u.indexOf('Android') > -1 || u.indexOf('Adr') > -1),
27
+ ditoIosApp: u.indexOf('mydito') > -1 && !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),
25
28
  isAshitaApp: u.indexOf('app/ASHITA-APP') > -1
26
29
  };
27
30
  };
@@ -135,9 +138,9 @@ var sendToApp = function sendToApp(params) {
135
138
  exports.sendToApp = sendToApp;
136
139
 
137
140
  var goToLoginApp = function goToLoginApp() {
138
- if (browserVersion().androidApp) {
141
+ if (browserVersion().ditoAndroidApp) {
139
142
  window.dito.goToLogin();
140
- } else if (browserVersion().iosApp) {
143
+ } else if (browserVersion().ditoIosApp) {
141
144
  window.dito.goToLogin();
142
145
  }
143
146
  };
@@ -371,8 +371,8 @@ var checkLogin = function checkLogin(isLead, redirectUrl, replaceFlag) {
371
371
 
372
372
  if (!isLogin()) {
373
373
  if (isLead) {
374
- if ((0, _androidUtil.browserVersion)().isApp) {
375
- goToLoginApp();
374
+ if ((0, _androidUtil.browserVersion)().isDitoApp) {
375
+ (0, _androidUtil.goToLoginApp)();
376
376
  } else {
377
377
  var _a = window.location,
378
378
  pathname = _a.pathname,
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.80",
4
+ "version": "1.0.82",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",