@fonixtree/magic-design 2.0.83 → 2.0.85

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.
Files changed (47) hide show
  1. package/es/common/GroupList/index.js +2 -0
  2. package/es/composite-comp/dito/components/CommonFunctions/defaultJSON.js +8 -4
  3. package/es/composite-comp/dito/components/CommonFunctions/mobile/index.js +6 -4
  4. package/es/composite-comp/dito/components/CommonFunctions/mobile/index.less +2 -5
  5. package/es/composite-comp/dito/components/Orders/defaultJSON.js +4 -4
  6. package/es/composite-comp/dito/components/Orders/mobile/index.js +19 -8
  7. package/es/composite-comp/dito/components/Orders/mobile/index.less +13 -9
  8. package/es/composite-comp/dito/components/PersonalInformation/defaultJSON.js +6 -6
  9. package/es/composite-comp/dito/components/PersonalInformation/index.js +1 -1
  10. package/es/composite-comp/dito/components/PersonalInformation/mobile/index.js +38 -9
  11. package/es/composite-comp/dito/components/PersonalInformation/mobile/index.less +20 -18
  12. package/es/composite-comp/dito/config-panels/OrdersConfig/ConfigGroup/index.js +4 -1
  13. package/es/composite-comp/dito/config-panels/OrdersConfig/index.js +1 -0
  14. package/es/composite-comp/dito/config-panels/PersonalInformationConfig/ConfigGroup/index.js +4 -1
  15. package/es/composite-comp/dito/config-panels/PersonalInformationConfig/index.js +1 -0
  16. package/es/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.js +4 -4
  17. package/es/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.js +2 -2
  18. package/es/constants/index.js +5 -5
  19. package/es/core/Designer/ConfigPanel/index.js +1 -1
  20. package/es/locale/en/en.json +5 -5
  21. package/es/locale/es/es.json +5 -5
  22. package/es/locale/id/id.json +5 -5
  23. package/es/utils/commonUtil.js +1 -1
  24. package/lib/common/GroupList/index.js +2 -0
  25. package/lib/composite-comp/dito/components/CommonFunctions/defaultJSON.js +8 -4
  26. package/lib/composite-comp/dito/components/CommonFunctions/mobile/index.js +6 -4
  27. package/lib/composite-comp/dito/components/CommonFunctions/mobile/index.less +2 -5
  28. package/lib/composite-comp/dito/components/Orders/defaultJSON.js +4 -4
  29. package/lib/composite-comp/dito/components/Orders/mobile/index.js +19 -8
  30. package/lib/composite-comp/dito/components/Orders/mobile/index.less +13 -9
  31. package/lib/composite-comp/dito/components/PersonalInformation/defaultJSON.js +6 -6
  32. package/lib/composite-comp/dito/components/PersonalInformation/index.js +1 -1
  33. package/lib/composite-comp/dito/components/PersonalInformation/mobile/index.js +38 -9
  34. package/lib/composite-comp/dito/components/PersonalInformation/mobile/index.less +20 -18
  35. package/lib/composite-comp/dito/config-panels/OrdersConfig/ConfigGroup/index.js +4 -1
  36. package/lib/composite-comp/dito/config-panels/OrdersConfig/index.js +1 -0
  37. package/lib/composite-comp/dito/config-panels/PersonalInformationConfig/ConfigGroup/index.js +4 -1
  38. package/lib/composite-comp/dito/config-panels/PersonalInformationConfig/index.js +1 -0
  39. package/lib/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.js +4 -4
  40. package/lib/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.js +2 -2
  41. package/lib/constants/index.js +5 -5
  42. package/lib/core/Designer/ConfigPanel/index.js +1 -1
  43. package/lib/locale/en/en.json +5 -5
  44. package/lib/locale/es/es.json +5 -5
  45. package/lib/locale/id/id.json +5 -5
  46. package/lib/utils/commonUtil.js +1 -1
  47. package/package.json +1 -1
@@ -46,17 +46,17 @@ var walletType = {
46
46
  };
47
47
  exports.walletType = walletType;
48
48
  var orderStatusType = {
49
- PAY: 'To pay',
49
+ PAY: 'To Pay',
50
50
  SHIP: 'To Ship',
51
51
  RECEIVE: 'To Receive',
52
- RATING: 'Rating',
53
- RETURN: 'Return'
52
+ DONE: 'Done',
53
+ CANCELLED: 'Cancelled'
54
54
  };
55
55
  exports.orderStatusType = orderStatusType;
56
56
  var personalInfoType = {
57
57
  WISHLIST: 'Wishlist',
58
58
  STORES: 'Stores',
59
- COUPONS: 'Coupons',
59
+ VOUCHERS: 'Vouchers',
60
60
  VIEWED: 'Recently Viewed'
61
61
  };
62
62
  exports.personalInfoType = personalInfoType;
@@ -212,7 +212,7 @@ var compInfoMap = {
212
212
  name: 'Menu Navigation',
213
213
  icon: 'icon-footer'
214
214
  },
215
- PERSONAL_INFORMATION: {
215
+ PERSONAL_INFOMATION: {
216
216
  name: 'Personal Information',
217
217
  icon: 'icon-account'
218
218
  },
@@ -131,7 +131,7 @@ var getSecondConfigName = function getSecondConfigName(selectedNode, clickedGrou
131
131
  groupName = panelProps.button.text;
132
132
  break;
133
133
 
134
- case 'PERSONAL_INFORMATION':
134
+ case 'PERSONAL_INFOMATION':
135
135
  case 'ORDERS':
136
136
  groupName = panelProps.sourceType;
137
137
  break;
@@ -1,13 +1,13 @@
1
1
  {
2
- "RETURN": "Return",
3
- "RATING": "Rating",
2
+ "CANCELLED": "Cancelled",
3
+ "DONE": "Done",
4
4
  "TO_RECEIVE": "To Receive",
5
5
  "TO_SHIP": "To ship",
6
- "TO_PAY": "To pay",
6
+ "TO_PAY": "To Pay",
7
7
  "VIEW_ALL_ORDERS": "View All Orders",
8
- "ORDERS": "ORDERS",
8
+ "ORDERS": "Orders",
9
9
  "RECENTLY_VIEWED": "Recently Viewed",
10
- "COUPONS": "Coupons",
10
+ "VOUCHERS": "Vouchers",
11
11
  "STORES": "Stores",
12
12
  "WISHLIST": "Wishlist",
13
13
  "IMAGE_NAME_IS_TOO_LONG": "Image name is too long",
@@ -1,13 +1,13 @@
1
1
  {
2
- "RETURN": "Return",
3
- "RATING": "Rating",
2
+ "CANCELLED": "Cancelled",
3
+ "DONE": "Done",
4
4
  "TO_RECEIVE": "To Receive",
5
5
  "TO_SHIP": "To ship",
6
- "TO_PAY": "To pay",
6
+ "TO_PAY": "To Pay",
7
7
  "VIEW_ALL_ORDERS": "View All Orders",
8
- "ORDERS": "ORDERS",
8
+ "ORDERS": "Orders",
9
9
  "RECENTLY_VIEWED": "Recently Viewed",
10
- "COUPONS": "Coupons",
10
+ "VOUCHERS": "Vouchers",
11
11
  "STORES": "Stores",
12
12
  "WISHLIST": "Wishlist",
13
13
  "IMAGE_NAME_IS_TOO_LONG": "Image name is too long",
@@ -1,13 +1,13 @@
1
1
  {
2
- "RETURN": "Return",
3
- "RATING": "Rating",
2
+ "CANCELLED": "Cancelled",
3
+ "DONE": "Done",
4
4
  "TO_RECEIVE": "To Receive",
5
5
  "TO_SHIP": "To ship",
6
- "TO_PAY": "To pay",
6
+ "TO_PAY": "To Pay",
7
7
  "VIEW_ALL_ORDERS": "View All Orders",
8
- "ORDERS": "ORDERS",
8
+ "ORDERS": "Orders",
9
9
  "RECENTLY_VIEWED": "Recently Viewed",
10
- "COUPONS": "Coupons",
10
+ "VOUCHERS": "Vouchers",
11
11
  "STORES": "Stores",
12
12
  "WISHLIST": "Wishlist",
13
13
  "IMAGE_NAME_IS_TOO_LONG": "Image name is too long",
@@ -752,7 +752,7 @@ function pushGA(data, eventName) {
752
752
  elementName: data.elementName
753
753
  };
754
754
  console.log('GA push', eventName, eventData);
755
- window.gtag('event', eventName, eventData);
755
+ if (window.gtag) window.gtag('event', eventName, eventData);
756
756
  }
757
757
  } catch (error) {
758
758
  console.error(error);
@@ -121,6 +121,8 @@ function (_super) {
121
121
  _this.setState({});
122
122
 
123
123
  (0, _coreUtil.renderPreview)();
124
+
125
+ _this.props.reRender();
124
126
  };
125
127
 
126
128
  _this.deleteItem = function (e, item) {
@@ -7,7 +7,7 @@ exports.getDefaultJSON = exports.CommonFunctionsGroupSourceJSON = void 0;
7
7
 
8
8
  var _uuid = require("uuid");
9
9
 
10
- var CommonFunctionsGroupSourceJSON = function CommonFunctionsGroupSourceJSON() {
10
+ var CommonFunctionsGroupSourceJSON = function CommonFunctionsGroupSourceJSON(text, url) {
11
11
  var groupId = (0, _uuid.v4)();
12
12
  return {
13
13
  id: groupId,
@@ -17,7 +17,7 @@ var CommonFunctionsGroupSourceJSON = function CommonFunctionsGroupSourceJSON() {
17
17
  open: true,
18
18
  type: 'TEXT',
19
19
  specialContent: [],
20
- text: 'Function Name',
20
+ text: text || 'Chat With Us',
21
21
  content: {
22
22
  sizeType: 'Customize font styles',
23
23
  fontFamily: 'Open Sans',
@@ -25,7 +25,11 @@ var CommonFunctionsGroupSourceJSON = function CommonFunctionsGroupSourceJSON() {
25
25
  fontSize: 14,
26
26
  color: '#2C2C2C',
27
27
  width: 0,
28
- textAlign: 'center'
28
+ textAlign: 'center',
29
+ clickUrl: {
30
+ name: url,
31
+ value: url
32
+ }
29
33
  },
30
34
  underline: {
31
35
  open: false,
@@ -63,7 +67,7 @@ var getDefaultJSON = function getDefaultJSON() {
63
67
  return {
64
68
  id: (0, _uuid.v4)(),
65
69
  type: 'COMMON_FUNCTIONS',
66
- groupSource: [CommonFunctionsGroupSourceJSON()],
70
+ groupSource: [CommonFunctionsGroupSourceJSON('Address', '/address/manage'), CommonFunctionsGroupSourceJSON('Policies', '/account/policies'), CommonFunctionsGroupSourceJSON('Security Center', '/account/security'), CommonFunctionsGroupSourceJSON('Chat With Us')],
67
71
  spacing: {
68
72
  pc: {
69
73
  paddingTop: 0,
@@ -56,10 +56,12 @@ function (_super) {
56
56
  _this.state = {};
57
57
 
58
58
  _this.onItemClick = function (item) {
59
- var url = (0, _commonUtil.ensure)(function () {
60
- return item.title.content.clickUrl.value || item.image.content.clickUrl.value;
61
- }, '');
62
- (0, _commonUtil.navigateTo)(url);
59
+ if ((0, _commonUtil.checkLogin)()) {
60
+ var url = (0, _commonUtil.ensure)(function () {
61
+ return item.title.content.clickUrl.value || item.image.content.clickUrl.value;
62
+ }, '');
63
+ (0, _commonUtil.navigateTo)(url);
64
+ }
63
65
  };
64
66
 
65
67
  return _this;
@@ -1,7 +1,5 @@
1
1
  .common-functions-mobile {
2
- background: #ffffff;
3
- padding-top: 1.7rem;
4
- height: calc(100vh - 6.36rem);
2
+ padding: 0.32rem 0;
5
3
  box-sizing: border-box;
6
4
  overflow: auto;
7
5
  }
@@ -12,7 +10,6 @@
12
10
  .common-functions-mobile ul li {
13
11
  padding: 0.24rem 0.32rem;
14
12
  box-sizing: border-box;
15
- background: #ffffff;
16
13
  display: flex;
17
14
  justify-content: space-between;
18
15
  align-items: center;
@@ -24,7 +21,7 @@
24
21
  .common-functions-mobile ul li > div .img {
25
22
  width: 0.32rem;
26
23
  height: 0.32rem;
27
- margin-right: 0.24rem;
24
+ margin-right: 0.08rem;
28
25
  }
29
26
  .common-functions-mobile ul li > div .title {
30
27
  font-size: 0.28rem;
@@ -7,7 +7,7 @@ exports.getDefaultJSON = exports.OrdersGroupSourceJSON = void 0;
7
7
 
8
8
  var _uuid = require("uuid");
9
9
 
10
- var OrdersGroupSourceJSON = function OrdersGroupSourceJSON() {
10
+ var OrdersGroupSourceJSON = function OrdersGroupSourceJSON(text) {
11
11
  var groupId = (0, _uuid.v4)();
12
12
  return {
13
13
  id: groupId,
@@ -17,7 +17,7 @@ var OrdersGroupSourceJSON = function OrdersGroupSourceJSON() {
17
17
  open: true,
18
18
  type: 'TEXT',
19
19
  specialContent: [],
20
- text: 'To pay',
20
+ text: text || 'Name',
21
21
  content: {
22
22
  sizeType: 'Customize font styles',
23
23
  fontFamily: 'Open Sans',
@@ -54,7 +54,7 @@ var OrdersGroupSourceJSON = function OrdersGroupSourceJSON() {
54
54
  h5ImgHoverUrl: ''
55
55
  }
56
56
  },
57
- sourceType: 'To pay'
57
+ sourceType: text
58
58
  };
59
59
  };
60
60
 
@@ -64,7 +64,7 @@ var getDefaultJSON = function getDefaultJSON() {
64
64
  return {
65
65
  id: (0, _uuid.v4)(),
66
66
  type: 'ORDERS',
67
- groupSource: [OrdersGroupSourceJSON()],
67
+ groupSource: [OrdersGroupSourceJSON('To Pay'), OrdersGroupSourceJSON('To Ship'), OrdersGroupSourceJSON('To Receive'), OrdersGroupSourceJSON('Done'), OrdersGroupSourceJSON('Cancelled')],
68
68
  spacing: {
69
69
  pc: {
70
70
  paddingTop: 0,
@@ -198,7 +198,7 @@ var getAccountPageValue = function getAccountPageValue(key) {
198
198
  };
199
199
 
200
200
  var orderData = {
201
- 'To pay': {
201
+ 'To Pay': {
202
202
  key: 'toPayNum',
203
203
  route: '/main/order/1'
204
204
  },
@@ -210,11 +210,11 @@ var orderData = {
210
210
  key: 'toReceiveNum',
211
211
  route: '/main/order/3'
212
212
  },
213
- Rating: {
213
+ Done: {
214
214
  key: 'toRatingNum',
215
215
  route: '/rating-list'
216
216
  },
217
- Return: {
217
+ Cancelled: {
218
218
  key: 'returnsNum',
219
219
  route: '/aftersale-list'
220
220
  }
@@ -234,8 +234,13 @@ function (_super) {
234
234
  };
235
235
 
236
236
  _this.onItemClick = function (v) {
237
- var url = orderData[v].route;
238
- (0, _commonUtil.navigateTo)(url);
237
+ var _a;
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
244
  };
240
245
 
241
246
  _this.getInit = function () {
@@ -266,7 +271,9 @@ function (_super) {
266
271
 
267
272
  _this.getImageHtml = function (item) {
268
273
  var orderStatus = _this.state.orderStatus;
269
- var num = orderStatus[orderData[item.sourceType].key];
274
+ var num = (0, _commonUtil.ensure)(function () {
275
+ return orderStatus[orderData[item.sourceType].key];
276
+ }, '');
270
277
  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
271
278
  data: item.image,
272
279
  maxWidth: "100%"
@@ -290,6 +297,8 @@ function (_super) {
290
297
  var data = this.props.data;
291
298
  return /*#__PURE__*/_react["default"].createElement("div", {
292
299
  className: (0, _classnames["default"])('orders-mobile')
300
+ }, /*#__PURE__*/_react["default"].createElement("div", {
301
+ className: "fixed-wrap"
293
302
  }, /*#__PURE__*/_react["default"].createElement("div", {
294
303
  className: "top"
295
304
  }, /*#__PURE__*/_react["default"].createElement("span", {
@@ -319,9 +328,11 @@ function (_super) {
319
328
  }, item.image.open && _this.getImageHtml(item)), item.title.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
320
329
  className: "title",
321
330
  data: item.title,
322
- readonly: true
331
+ onTextInput: function onTextInput(text) {
332
+ item.title.text = text;
333
+ }
323
334
  }));
324
- })));
335
+ }))));
325
336
  };
326
337
 
327
338
  OrdersMobile.defaultProps = {
@@ -1,4 +1,7 @@
1
1
  .orders-mobile {
2
+ height: 1.4rem;
3
+ }
4
+ .orders-mobile .fixed-wrap {
2
5
  display: flex;
3
6
  flex-direction: column;
4
7
  background-color: #fff;
@@ -12,7 +15,7 @@
12
15
  top: -1.4rem;
13
16
  padding: 0.32rem;
14
17
  }
15
- .orders-mobile .top {
18
+ .orders-mobile .fixed-wrap .top {
16
19
  display: flex;
17
20
  flex-direction: row;
18
21
  justify-content: space-between;
@@ -20,45 +23,46 @@
20
23
  line-height: 0.36rem;
21
24
  color: var(--font-color);
22
25
  }
23
- .orders-mobile .top .title {
26
+ .orders-mobile .fixed-wrap .top .title {
24
27
  font-size: 0.28rem;
25
28
  font-weight: 600;
26
29
  color: #2C2C2C;
27
30
  }
28
- .orders-mobile .top .btn-wrap {
31
+ .orders-mobile .fixed-wrap .top .btn-wrap {
29
32
  display: flex;
30
33
  flex-direction: row;
31
34
  justify-content: center;
32
35
  align-items: center;
33
36
  }
34
- .orders-mobile .top .btn-wrap .text {
37
+ .orders-mobile .fixed-wrap .top .btn-wrap .text {
35
38
  font-size: 0.28rem;
36
39
  color: #929292;
37
40
  font-weight: 400;
38
41
  margin-right: 0.08rem;
39
42
  }
40
- .orders-mobile .list {
43
+ .orders-mobile .fixed-wrap .list {
41
44
  display: flex;
42
45
  flex-direction: row;
43
46
  justify-content: space-between;
47
+ height: 1.32rem;
44
48
  margin-top: 0.48rem;
45
49
  margin-bottom: 0.02rem;
46
50
  }
47
- .orders-mobile .list .item {
51
+ .orders-mobile .fixed-wrap .list .item {
48
52
  display: flex;
49
53
  flex-direction: column;
50
54
  justify-content: center;
51
55
  align-items: center;
52
56
  flex: 1;
53
57
  }
54
- .orders-mobile .list .item .img-wrap {
58
+ .orders-mobile .fixed-wrap .list .item .img-wrap {
55
59
  position: relative;
56
60
  display: flex;
57
61
  margin-bottom: 0.16rem;
58
62
  width: 0.72rem;
59
63
  height: 0.72rem;
60
64
  }
61
- .orders-mobile .list .item .img-wrap .pot {
65
+ .orders-mobile .fixed-wrap .list .item .img-wrap .pot {
62
66
  display: inline-block;
63
67
  padding: 0 0.08rem;
64
68
  background: #ce1126;
@@ -74,7 +78,7 @@
74
78
  border-radius: 50%;
75
79
  line-height: 0.3rem;
76
80
  }
77
- .orders-mobile .list .item .title {
81
+ .orders-mobile .fixed-wrap .list .item .title {
78
82
  height: 0.44rem;
79
83
  font-size: 0.24rem;
80
84
  line-height: 0.22rem;
@@ -7,7 +7,7 @@ exports.getDefaultJSON = exports.PersonalInfoGroupSourceJSON = void 0;
7
7
 
8
8
  var _uuid = require("uuid");
9
9
 
10
- var PersonalInfoGroupSourceJSON = function PersonalInfoGroupSourceJSON() {
10
+ var PersonalInfoGroupSourceJSON = function PersonalInfoGroupSourceJSON(text) {
11
11
  var groupId = (0, _uuid.v4)();
12
12
  return {
13
13
  id: groupId,
@@ -17,7 +17,7 @@ var PersonalInfoGroupSourceJSON = function PersonalInfoGroupSourceJSON() {
17
17
  open: true,
18
18
  type: 'TEXT',
19
19
  specialContent: [],
20
- text: 'Wishlist',
20
+ text: text || 'Name',
21
21
  content: {
22
22
  sizeType: 'Customize font styles',
23
23
  fontFamily: 'Open Sans',
@@ -40,7 +40,7 @@ var PersonalInfoGroupSourceJSON = function PersonalInfoGroupSourceJSON() {
40
40
  open: true,
41
41
  type: 'TEXT',
42
42
  specialContent: [],
43
- text: 'number',
43
+ text: 0,
44
44
  content: {
45
45
  sizeType: 'Customize font styles',
46
46
  fontFamily: 'Open Sans',
@@ -57,7 +57,7 @@ var PersonalInfoGroupSourceJSON = function PersonalInfoGroupSourceJSON() {
57
57
  },
58
58
  vertical: {}
59
59
  },
60
- sourceType: 'Wishlist'
60
+ sourceType: text
61
61
  };
62
62
  };
63
63
 
@@ -66,11 +66,11 @@ exports.PersonalInfoGroupSourceJSON = PersonalInfoGroupSourceJSON;
66
66
  var getDefaultJSON = function getDefaultJSON() {
67
67
  return {
68
68
  id: (0, _uuid.v4)(),
69
- type: 'PERSONAL_INFORMATION',
69
+ type: 'PERSONAL_INFOMATION',
70
70
  login: {
71
71
  open: true
72
72
  },
73
- groupSource: [PersonalInfoGroupSourceJSON()],
73
+ groupSource: [PersonalInfoGroupSourceJSON('Wishlist'), PersonalInfoGroupSourceJSON('Stores'), PersonalInfoGroupSourceJSON('Vouchers'), PersonalInfoGroupSourceJSON('Recently Viewed')],
74
74
  spacing: {
75
75
  pc: {
76
76
  paddingTop: 0,
@@ -74,7 +74,7 @@ function (_super) {
74
74
  };
75
75
 
76
76
  PersonalInformation.defaultProps = {};
77
- PersonalInformation.type = 'PERSONAL_INFORMATION';
77
+ PersonalInformation.type = 'PERSONAL_INFOMATION';
78
78
  PersonalInformation.getDefaultJSON = _defaultJSON.getDefaultJSON;
79
79
  PersonalInformation = __decorate([_compositeDecorator["default"]], PersonalInformation);
80
80
  return PersonalInformation;
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.setAccountPageValue = exports["default"] = void 0;
6
+ exports.setAccountPageValue = exports.pInfoData = exports["default"] = void 0;
7
7
 
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
 
@@ -218,7 +218,23 @@ var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
218
218
  }
219
219
  };
220
220
 
221
+ var pInfoData = {
222
+ Wishlist: {
223
+ route: '/favourite/list'
224
+ },
225
+ Stores: {
226
+ route: '/collect-store'
227
+ },
228
+ Vouchers: {
229
+ route: '/my-coupon'
230
+ },
231
+ 'Recently Viewed': {
232
+ route: '/review-list'
233
+ }
234
+ };
235
+ exports.pInfoData = pInfoData;
221
236
  var LPObj = (0, _storeUtil.getSessionStore)('channelPurchase') || {};
237
+ var currentUser = JSON.parse(localStorage.getItem('currentUser')) || {};
222
238
 
223
239
  var setAccountPageValue = function setAccountPageValue(obj) {
224
240
  var accountPageValue = JSON.parse(localStorage.getItem('accountPageValue'));
@@ -237,20 +253,20 @@ function (_super) {
237
253
 
238
254
  _this.state = {
239
255
  messageNum: '',
240
- userInfo: {}
256
+ userInfo: currentUser
241
257
  };
242
258
 
243
259
  _this.getNum = function (v) {
244
260
  var userInfo = _this.state.userInfo;
245
261
 
246
262
  if (v === _index.personalInfoType.WISHLIST) {
247
- return userInfo.userCollectionNum || 1;
263
+ return userInfo.userCollectionNum || 0;
248
264
  } else if (v === _index.personalInfoType.STORES) {
249
- return userInfo.userCollectionStoreNum || 2;
250
- } else if (v === _index.personalInfoType.COUPONS) {
251
- return userInfo.couponNum || 3;
265
+ return userInfo.userCollectionStoreNum || 0;
266
+ } else if (v === _index.personalInfoType.VOUCHERS) {
267
+ return userInfo.couponNum || 0;
252
268
  } else if (v === _index.personalInfoType.VIEWED) {
253
- return userInfo.recentViewNum || 4;
269
+ return userInfo.recentViewNum || 0;
254
270
  }
255
271
  };
256
272
 
@@ -292,7 +308,7 @@ function (_super) {
292
308
  };
293
309
 
294
310
  _this.goLoginPage = function () {
295
- if (browserVersion().isApp) {
311
+ if ((0, _androidUtil.browserVersion)().isApp) {
296
312
  (0, _androidUtil.goToLoginApp)();
297
313
  } else {
298
314
  (0, _commonUtil.goLogin)();
@@ -349,6 +365,16 @@ function (_super) {
349
365
  });
350
366
  };
351
367
 
368
+ _this.onItemClick = function (v) {
369
+ var _a;
370
+
371
+ var routeUrl = (_a = pInfoData[v]) === null || _a === void 0 ? void 0 : _a.route;
372
+ var selfUrl = (0, _commonUtil.ensure)(function () {
373
+ return item.title.content.clickUrl.value || item.image.content.clickUrl.value;
374
+ }, '');
375
+ (0, _commonUtil.navigateTo)(routeUrl || selfUrl);
376
+ };
377
+
352
378
  return _this;
353
379
  }
354
380
 
@@ -424,7 +450,10 @@ function (_super) {
424
450
  className: "bottom"
425
451
  }, data.groupSource.map(function (item) {
426
452
  return /*#__PURE__*/_react["default"].createElement("div", {
427
- className: "item"
453
+ className: "item",
454
+ onClick: function onClick() {
455
+ return _this.onItemClick(item.sourceType);
456
+ }
428
457
  }, item.number.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
429
458
  className: "number",
430
459
  data: __assign(__assign({}, item.number), {
@@ -3,21 +3,21 @@
3
3
  padding: 0.32rem;
4
4
  box-sizing: border-box;
5
5
  }
6
- .top {
6
+ .personal-information-mobile .top {
7
7
  display: flex;
8
8
  justify-content: space-between;
9
9
  align-items: start;
10
10
  }
11
- .top .pInfoWrap {
11
+ .personal-information-mobile .top .pInfoWrap {
12
12
  display: flex;
13
13
  align-items: center;
14
14
  }
15
- .top .pInfoWrap .photoWrap {
15
+ .personal-information-mobile .top .pInfoWrap .photoWrap {
16
16
  position: relative;
17
17
  display: inline-block;
18
18
  vertical-align: middle;
19
19
  }
20
- .top .pInfoWrap .photoWrap > input {
20
+ .personal-information-mobile .top .pInfoWrap .photoWrap > input {
21
21
  position: absolute;
22
22
  top: 0;
23
23
  left: 0;
@@ -25,14 +25,14 @@
25
25
  height: 100%;
26
26
  opacity: 0;
27
27
  }
28
- .top .pInfoWrap .userInfo {
28
+ .personal-information-mobile .top .pInfoWrap .userInfo {
29
29
  display: inline-block;
30
30
  vertical-align: middle;
31
31
  }
32
- .top .pInfoWrap .userInfo p {
32
+ .personal-information-mobile .top .pInfoWrap .userInfo p {
33
33
  margin: 0;
34
34
  }
35
- .top .pInfoWrap .userInfo .name {
35
+ .personal-information-mobile .top .pInfoWrap .userInfo .name {
36
36
  font-size: 0.28rem;
37
37
  font-weight: 500;
38
38
  color: #ffffff;
@@ -42,13 +42,13 @@
42
42
  overflow: hidden;
43
43
  word-break: break-all;
44
44
  }
45
- .top .pInfoWrap .userInfo .phone {
45
+ .personal-information-mobile .top .pInfoWrap .userInfo .phone {
46
46
  font-size: 0.28rem;
47
47
  font-weight: 400;
48
48
  color: #ffffff;
49
49
  margin-top: 0.1rem;
50
50
  }
51
- .top .pInfoWrap .photo {
51
+ .personal-information-mobile .top .pInfoWrap .photo {
52
52
  display: inline-block;
53
53
  width: 0.88rem;
54
54
  height: 0.88rem;
@@ -58,18 +58,18 @@
58
58
  margin-right: 0.3rem;
59
59
  border-radius: 50%;
60
60
  }
61
- .top .pInfoWrap .btnLogin {
61
+ .personal-information-mobile .top .pInfoWrap .btnLogin {
62
62
  font-size: 0.28rem;
63
63
  font-weight: 400;
64
64
  color: #ffffff;
65
65
  font-family: Montserrat;
66
66
  }
67
- .top .btnGroup .iconWrap {
67
+ .personal-information-mobile .top .btnGroup .iconWrap {
68
68
  display: inline-block;
69
69
  margin-left: 0.3rem;
70
70
  position: relative;
71
71
  }
72
- .top .btnGroup .num {
72
+ .personal-information-mobile .top .btnGroup .num {
73
73
  position: absolute;
74
74
  top: -0.04rem;
75
75
  left: 0.28rem;
@@ -84,14 +84,14 @@
84
84
  font-size: 0.12rem;
85
85
  color: #ffffff;
86
86
  }
87
- .bottom {
87
+ .personal-information-mobile .bottom {
88
88
  display: flex;
89
89
  flex-direction: row;
90
90
  justify-content: space-around;
91
91
  width: 100%;
92
92
  margin-top: 0.48rem;
93
93
  }
94
- .bottom .item {
94
+ .personal-information-mobile .bottom .item {
95
95
  display: flex;
96
96
  flex-direction: column;
97
97
  justify-content: flex-start;
@@ -99,7 +99,7 @@
99
99
  flex: 1;
100
100
  position: relative;
101
101
  }
102
- .bottom .item:after {
102
+ .personal-information-mobile .bottom .item:after {
103
103
  content: '';
104
104
  display: inline-block;
105
105
  width: 0.02rem;
@@ -109,16 +109,18 @@
109
109
  top: 0.12rem;
110
110
  background: #ccc;
111
111
  }
112
- .bottom .item:last-child:after {
112
+ .personal-information-mobile .bottom .item:last-child:after {
113
113
  display: none;
114
114
  }
115
- .bottom .item .number {
115
+ .personal-information-mobile .bottom .item .number {
116
+ width: 70% !important;
116
117
  font-size: 0.36rem;
117
118
  font-weight: 600;
118
119
  color: #ffffff;
119
120
  text-align: center;
120
121
  }
121
- .bottom .item .title {
122
+ .personal-information-mobile .bottom .item .title {
123
+ width: 70% !important;
122
124
  font-size: 0.24rem;
123
125
  font-weight: 400;
124
126
  color: #ffffff;