@fonixtree/magic-design 1.0.175 → 1.0.176

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 (33) hide show
  1. package/es/composite-comp/dito/components/PersonalInformationSecond/defaultJSON.js +168 -0
  2. package/es/composite-comp/dito/components/PersonalInformationSecond/index.js +84 -0
  3. package/es/composite-comp/dito/components/PersonalInformationSecond/mobile/images/avatar.png +0 -0
  4. package/es/composite-comp/dito/components/PersonalInformationSecond/mobile/index.js +710 -0
  5. package/es/composite-comp/dito/components/PersonalInformationSecond/mobile/index.less +196 -0
  6. package/es/composite-comp/dito/config-panels/PersonalInformationSecondConfig/ConfigDecoration/index.js +91 -0
  7. package/es/composite-comp/dito/config-panels/PersonalInformationSecondConfig/ConfigDecoration/index.less +9 -0
  8. package/es/composite-comp/dito/config-panels/PersonalInformationSecondConfig/OrdersConfigGroup/index.js +131 -0
  9. package/es/composite-comp/dito/config-panels/PersonalInformationSecondConfig/PersonInfoConfigGroup/index.js +131 -0
  10. package/es/composite-comp/dito/config-panels/PersonalInformationSecondConfig/index.js +127 -0
  11. package/es/composite-comp/dito/second-config-panels/PersonalInformationSecondSecondConfig/index.js +206 -0
  12. package/es/composite-comp/dito/second-config-panels/PersonalInformationSecondSecondConfig/index.less +9 -0
  13. package/es/constants/component-types.js +10 -4
  14. package/es/constants/index.js +4 -0
  15. package/es/core/Designer/ConfigPanel/index.js +1 -0
  16. package/es/decorator/compositeDecorator.js +1 -1
  17. package/lib/composite-comp/dito/components/PersonalInformationSecond/defaultJSON.js +168 -0
  18. package/lib/composite-comp/dito/components/PersonalInformationSecond/index.js +84 -0
  19. package/lib/composite-comp/dito/components/PersonalInformationSecond/mobile/images/avatar.png +0 -0
  20. package/lib/composite-comp/dito/components/PersonalInformationSecond/mobile/index.js +710 -0
  21. package/lib/composite-comp/dito/components/PersonalInformationSecond/mobile/index.less +196 -0
  22. package/lib/composite-comp/dito/config-panels/PersonalInformationSecondConfig/ConfigDecoration/index.js +91 -0
  23. package/lib/composite-comp/dito/config-panels/PersonalInformationSecondConfig/ConfigDecoration/index.less +9 -0
  24. package/lib/composite-comp/dito/config-panels/PersonalInformationSecondConfig/OrdersConfigGroup/index.js +131 -0
  25. package/lib/composite-comp/dito/config-panels/PersonalInformationSecondConfig/PersonInfoConfigGroup/index.js +131 -0
  26. package/lib/composite-comp/dito/config-panels/PersonalInformationSecondConfig/index.js +127 -0
  27. package/lib/composite-comp/dito/second-config-panels/PersonalInformationSecondSecondConfig/index.js +206 -0
  28. package/lib/composite-comp/dito/second-config-panels/PersonalInformationSecondSecondConfig/index.less +9 -0
  29. package/lib/constants/component-types.js +10 -4
  30. package/lib/constants/index.js +4 -0
  31. package/lib/core/Designer/ConfigPanel/index.js +1 -0
  32. package/lib/decorator/compositeDecorator.js +1 -1
  33. package/package.json +1 -1
@@ -0,0 +1,710 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.setAccountPageValue = exports.pInfoData = exports.orderData = exports["default"] = void 0;
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ var _classnames = _interopRequireDefault(require("classnames"));
11
+
12
+ var _isEmpty = _interopRequireDefault(require("lodash/isEmpty"));
13
+
14
+ var _antd = require("antd");
15
+
16
+ var _avatar = _interopRequireDefault(require("./images/avatar.png"));
17
+
18
+ var _components = require("../../../../../meta-comp/components");
19
+
20
+ var _androidUtil = require("../../../../../utils/androidUtil");
21
+
22
+ var _locale = require("../../../../../locale");
23
+
24
+ var _Iconfont = _interopRequireDefault(require("../../../../../common/Iconfont"));
25
+
26
+ var _commonUtil = require("../../../../../utils/commonUtil");
27
+
28
+ var _index = require("../../../../../constants/index");
29
+
30
+ var _storeUtil = require("../../../../../utils/storeUtil");
31
+
32
+ var _common = require("../../../../../common");
33
+
34
+ require("./index.less");
35
+
36
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
37
+
38
+ var __extends = void 0 && (void 0).__extends || function () {
39
+ var _extendStatics = function extendStatics(d, b) {
40
+ _extendStatics = Object.setPrototypeOf || {
41
+ __proto__: []
42
+ } instanceof Array && function (d, b) {
43
+ d.__proto__ = b;
44
+ } || function (d, b) {
45
+ for (var p in b) {
46
+ if (b.hasOwnProperty(p)) d[p] = b[p];
47
+ }
48
+ };
49
+
50
+ return _extendStatics(d, b);
51
+ };
52
+
53
+ return function (d, b) {
54
+ _extendStatics(d, b);
55
+
56
+ function __() {
57
+ this.constructor = d;
58
+ }
59
+
60
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
61
+ };
62
+ }();
63
+
64
+ var __assign = void 0 && (void 0).__assign || function () {
65
+ __assign = Object.assign || function (t) {
66
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
67
+ s = arguments[i];
68
+
69
+ for (var p in s) {
70
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
71
+ }
72
+ }
73
+
74
+ return t;
75
+ };
76
+
77
+ return __assign.apply(this, arguments);
78
+ };
79
+
80
+ var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
81
+ function adopt(value) {
82
+ return value instanceof P ? value : new P(function (resolve) {
83
+ resolve(value);
84
+ });
85
+ }
86
+
87
+ return new (P || (P = Promise))(function (resolve, reject) {
88
+ function fulfilled(value) {
89
+ try {
90
+ step(generator.next(value));
91
+ } catch (e) {
92
+ reject(e);
93
+ }
94
+ }
95
+
96
+ function rejected(value) {
97
+ try {
98
+ step(generator["throw"](value));
99
+ } catch (e) {
100
+ reject(e);
101
+ }
102
+ }
103
+
104
+ function step(result) {
105
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
106
+ }
107
+
108
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
109
+ });
110
+ };
111
+
112
+ var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
113
+ var _ = {
114
+ label: 0,
115
+ sent: function sent() {
116
+ if (t[0] & 1) throw t[1];
117
+ return t[1];
118
+ },
119
+ trys: [],
120
+ ops: []
121
+ },
122
+ f,
123
+ y,
124
+ t,
125
+ g;
126
+ return g = {
127
+ next: verb(0),
128
+ "throw": verb(1),
129
+ "return": verb(2)
130
+ }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
131
+ return this;
132
+ }), g;
133
+
134
+ function verb(n) {
135
+ return function (v) {
136
+ return step([n, v]);
137
+ };
138
+ }
139
+
140
+ function step(op) {
141
+ if (f) throw new TypeError("Generator is already executing.");
142
+
143
+ while (_) {
144
+ try {
145
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
146
+ if (y = 0, t) op = [op[0] & 2, t.value];
147
+
148
+ switch (op[0]) {
149
+ case 0:
150
+ case 1:
151
+ t = op;
152
+ break;
153
+
154
+ case 4:
155
+ _.label++;
156
+ return {
157
+ value: op[1],
158
+ done: false
159
+ };
160
+
161
+ case 5:
162
+ _.label++;
163
+ y = op[1];
164
+ op = [0];
165
+ continue;
166
+
167
+ case 7:
168
+ op = _.ops.pop();
169
+
170
+ _.trys.pop();
171
+
172
+ continue;
173
+
174
+ default:
175
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
176
+ _ = 0;
177
+ continue;
178
+ }
179
+
180
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
181
+ _.label = op[1];
182
+ break;
183
+ }
184
+
185
+ if (op[0] === 6 && _.label < t[1]) {
186
+ _.label = t[1];
187
+ t = op;
188
+ break;
189
+ }
190
+
191
+ if (t && _.label < t[2]) {
192
+ _.label = t[2];
193
+
194
+ _.ops.push(op);
195
+
196
+ break;
197
+ }
198
+
199
+ if (t[2]) _.ops.pop();
200
+
201
+ _.trys.pop();
202
+
203
+ continue;
204
+ }
205
+
206
+ op = body.call(thisArg, _);
207
+ } catch (e) {
208
+ op = [6, e];
209
+ y = 0;
210
+ } finally {
211
+ f = t = 0;
212
+ }
213
+ }
214
+
215
+ if (op[0] & 5) throw op[1];
216
+ return {
217
+ value: op[0] ? op[1] : void 0,
218
+ done: true
219
+ };
220
+ }
221
+ };
222
+
223
+ var currentUser = JSON.parse(localStorage.getItem('currentUser')) || {};
224
+
225
+ var setAccountPageValue = function setAccountPageValue(obj) {
226
+ var accountPageValue = JSON.parse(localStorage.getItem('accountPageValue'));
227
+ localStorage.setItem('accountPageValue', JSON.stringify(__assign(__assign({}, accountPageValue), obj)));
228
+ };
229
+
230
+ exports.setAccountPageValue = setAccountPageValue;
231
+
232
+ var getAccountPageValue = function getAccountPageValue(key) {
233
+ var accountPageValue = JSON.parse(localStorage.getItem('accountPageValue'));
234
+ return accountPageValue ? accountPageValue[key] || '' : '';
235
+ };
236
+
237
+ var pInfoData = {
238
+ Wishlist: {
239
+ route: '/favourite/list'
240
+ },
241
+ Stores: {
242
+ route: '/collect-store'
243
+ },
244
+ Vouchers: {
245
+ route: '/my-coupon'
246
+ },
247
+ 'Recently Viewed': {
248
+ route: '/review-list'
249
+ }
250
+ };
251
+ exports.pInfoData = pInfoData;
252
+ var orderData = {
253
+ 'To Pay': {
254
+ key: 'toPayNum',
255
+ route: '/main/order/1'
256
+ },
257
+ 'To Ship': {
258
+ key: 'toDeliveryNum',
259
+ route: '/main/order/2'
260
+ },
261
+ 'To Receive': {
262
+ key: 'toReceiveNum',
263
+ route: '/main/order/3'
264
+ },
265
+ Done: {
266
+ key: 'toRatingNum',
267
+ route: '/main/order/4'
268
+ },
269
+ Cancelled: {
270
+ key: 'returnsNum',
271
+ route: '/main/order/5'
272
+ }
273
+ };
274
+ exports.orderData = orderData;
275
+
276
+ var PersonalInfoMobile =
277
+ /** @class */
278
+ function (_super) {
279
+ __extends(PersonalInfoMobile, _super);
280
+
281
+ function PersonalInfoMobile() {
282
+ var _this = _super !== null && _super.apply(this, arguments) || this;
283
+
284
+ _this.state = {
285
+ messageNum: '',
286
+ userInfo: currentUser,
287
+ loading: false,
288
+ selectedImgFile: {},
289
+ editImgModalVisible: false,
290
+ orderStatus: getAccountPageValue('orderStatus') || {}
291
+ };
292
+
293
+ _this.getNum = function (v) {
294
+ var userInfo = _this.state.userInfo;
295
+
296
+ if (v === _index.personalInfoType.WISHLIST) {
297
+ return userInfo.userCollectionNum || 0;
298
+ } else if (v === _index.personalInfoType.STORES) {
299
+ return userInfo.userCollectionStoreNum || 0;
300
+ } else if (v === _index.personalInfoType.VOUCHERS) {
301
+ return userInfo.couponNum || 0;
302
+ } else if (v === _index.personalInfoType.VIEWED) {
303
+ return userInfo.recentViewNum || 0;
304
+ }
305
+ };
306
+
307
+ _this.handleFileChange = function (e) {
308
+ var file = e.target.files[0];
309
+
310
+ if (file) {
311
+ if (file.name.length > 120) {
312
+ _antd.message.error((0, _locale.i18n)('IMAGE_NAME_IS_TOO_LONG'));
313
+
314
+ return;
315
+ }
316
+
317
+ _this.hideBottomBar();
318
+
319
+ _this.setState({
320
+ editImgModalVisible: true,
321
+ selectedImgFile: file
322
+ });
323
+ }
324
+
325
+ e.target.value = '';
326
+ };
327
+
328
+ _this.goSettings = function () {
329
+ if ((0, _commonUtil.checkLogin)()) {
330
+ (0, _commonUtil.navigateTo)('/settings');
331
+ }
332
+ };
333
+
334
+ _this.goMessageCenter = function () {
335
+ if ((0, _commonUtil.checkLogin)(true)) {
336
+ (0, _commonUtil.navigateTo)('/message-center');
337
+ }
338
+ };
339
+
340
+ _this.clickName = function () {
341
+ var LPObj = (0, _storeUtil.getSessionStore)('channelPurchase') || {};
342
+
343
+ if (!(0, _isEmpty["default"])(LPObj)) {
344
+ return;
345
+ }
346
+
347
+ (0, _commonUtil.navigateTo)('/account/information');
348
+ };
349
+
350
+ _this.goLoginPage = function () {
351
+ if ((0, _androidUtil.browserVersion)().isDitoApp) {
352
+ (0, _androidUtil.goToLoginApp)();
353
+ } else {
354
+ (0, _commonUtil.goLogin)();
355
+ }
356
+ };
357
+
358
+ _this.getMessageNum = function () {
359
+ return __awaiter(_this, void 0, void 0, function () {
360
+ var num;
361
+ return __generator(this, function (_a) {
362
+ switch (_a.label) {
363
+ case 0:
364
+ return [4
365
+ /*yield*/
366
+ , (0, _commonUtil.commonFetch)('/designer/v1/h5/users/inbox/unread/num', {}, 'GET')];
367
+
368
+ case 1:
369
+ num = _a.sent();
370
+ if (num > 9) num = '9+';
371
+ this.setState({
372
+ messageNum: num
373
+ });
374
+ setAccountPageValue({
375
+ messageNum: num
376
+ });
377
+ return [2
378
+ /*return*/
379
+ ];
380
+ }
381
+ });
382
+ });
383
+ };
384
+
385
+ _this.getUserInfo = function () {
386
+ return __awaiter(_this, void 0, void 0, function () {
387
+ var info;
388
+ return __generator(this, function (_a) {
389
+ switch (_a.label) {
390
+ case 0:
391
+ return [4
392
+ /*yield*/
393
+ , (0, _commonUtil.commonFetch)('/designer/v1/h5/users', {}, 'GET')];
394
+
395
+ case 1:
396
+ info = _a.sent();
397
+ this.setState({
398
+ userInfo: info
399
+ });
400
+ return [2
401
+ /*return*/
402
+ ];
403
+ }
404
+ });
405
+ });
406
+ };
407
+
408
+ _this.modifyPhoto = function (params) {
409
+ return __awaiter(_this, void 0, void 0, function () {
410
+ return __generator(this, function (_a) {
411
+ switch (_a.label) {
412
+ case 0:
413
+ return [4
414
+ /*yield*/
415
+ , (0, _commonUtil.commonFetch)('/designer/v1/h5/users/modify', params, 'POST')];
416
+
417
+ case 1:
418
+ _a.sent();
419
+
420
+ this.showBottomBar();
421
+ this.setState(function (preState, props) {
422
+ return {
423
+ userInfo: __assign(__assign({}, preState.userInfo), {
424
+ photo: params.photo
425
+ }),
426
+ loading: false,
427
+ editImgModalVisible: false
428
+ };
429
+ });
430
+ return [2
431
+ /*return*/
432
+ ];
433
+ }
434
+ });
435
+ });
436
+ };
437
+
438
+ _this.hideBottomBar = function () {
439
+ var homeNavBar = document.querySelector('.home-navigation');
440
+ if (homeNavBar) homeNavBar.style.visibility = 'hidden';
441
+ };
442
+
443
+ _this.showBottomBar = function () {
444
+ var homeNavBar = document.querySelector('.home-navigation');
445
+ if (homeNavBar) homeNavBar.style.visibility = 'visible';
446
+ };
447
+
448
+ _this.onUploadImg = function (formData) {
449
+ if (_this.state.loading) return;
450
+
451
+ _this.setState({
452
+ loading: true
453
+ });
454
+
455
+ fetch('/designer/v1/h5/image', {
456
+ method: 'POST',
457
+ body: formData
458
+ }).then(function (response) {
459
+ return response.json();
460
+ }).then(function (responseData) {
461
+ var _a;
462
+
463
+ if (((_a = responseData === null || responseData === void 0 ? void 0 : responseData.fileUrl) === null || _a === void 0 ? void 0 : _a.length) > 120) {
464
+ _antd.message.toast({
465
+ type: 'error',
466
+ message: (0, _locale.i18n)('IMAGE_NAME_IS_TOO_LONG'),
467
+ duration: 3000
468
+ });
469
+
470
+ return;
471
+ }
472
+
473
+ _this.modifyPhoto({
474
+ photo: responseData.fileUrl
475
+ });
476
+ })["catch"](function (err) {
477
+ _antd.message.toast({
478
+ type: 'error',
479
+ message: err === null || err === void 0 ? void 0 : err.data,
480
+ duration: 5000
481
+ });
482
+
483
+ _this.showBottomBar();
484
+
485
+ _this.setState({
486
+ editImgModalVisible: false,
487
+ loading: false
488
+ });
489
+ });
490
+ };
491
+
492
+ _this.onItemClick = function (v) {
493
+ var _a;
494
+
495
+ if ((0, _commonUtil.checkLogin)(true)) {
496
+ var routeUrl = (_a = pInfoData[v]) === null || _a === void 0 ? void 0 : _a.route;
497
+ var selfUrl = (0, _commonUtil.ensure)(function () {
498
+ return item.title.content.clickUrl.value || item.image.content.clickUrl.value;
499
+ }, '');
500
+ (0, _commonUtil.navigateTo)(routeUrl || selfUrl);
501
+ }
502
+ };
503
+
504
+ _this.onOrderItemClick = function (v) {
505
+ var _a;
506
+
507
+ if ((0, _commonUtil.checkLogin)(true)) {
508
+ var routeUrl = (_a = orderData[v]) === null || _a === void 0 ? void 0 : _a.route;
509
+ var selfUrl = (0, _commonUtil.ensure)(function () {
510
+ return item.title.content.clickUrl.value || item.image.content.clickUrl.value;
511
+ }, '');
512
+ (0, _commonUtil.navigateTo)(routeUrl || selfUrl);
513
+ }
514
+ };
515
+
516
+ _this.getInit = function () {
517
+ return __awaiter(_this, void 0, void 0, function () {
518
+ var orderStatus;
519
+ return __generator(this, function (_a) {
520
+ switch (_a.label) {
521
+ case 0:
522
+ return [4
523
+ /*yield*/
524
+ , (0, _commonUtil.commonFetch)('/designer/v1/h5/orders/status/num', {}, 'GET')];
525
+
526
+ case 1:
527
+ orderStatus = _a.sent();
528
+ this.setState({
529
+ orderStatus: orderStatus
530
+ });
531
+ setAccountPageValue({
532
+ orderStatus: orderStatus
533
+ });
534
+ return [2
535
+ /*return*/
536
+ ];
537
+ }
538
+ });
539
+ });
540
+ };
541
+
542
+ _this.getImageHtml = function (item) {
543
+ var orderStatus = _this.state.orderStatus;
544
+ var num = (0, _commonUtil.ensure)(function () {
545
+ return orderStatus[orderData[item.sourceType].key];
546
+ }, '');
547
+ return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
548
+ data: item.image,
549
+ maxWidth: "100%"
550
+ }), num ? /*#__PURE__*/_react["default"].createElement("span", {
551
+ className: "pot"
552
+ }, num) : null);
553
+ };
554
+
555
+ return _this;
556
+ }
557
+
558
+ PersonalInfoMobile.prototype.componentDidMount = function () {
559
+ if ((0, _commonUtil.checkLogin)(false)) {
560
+ this.getUserInfo();
561
+ }
562
+
563
+ this.getMessageNum();
564
+
565
+ if ((0, _commonUtil.isLogin)()) {
566
+ this.getInit();
567
+ }
568
+ };
569
+
570
+ PersonalInfoMobile.prototype.render = function () {
571
+ var _this = this;
572
+
573
+ var data = this.props.data;
574
+ var _a = this.state,
575
+ messageNum = _a.messageNum,
576
+ userInfo = _a.userInfo,
577
+ editImgModalVisible = _a.editImgModalVisible,
578
+ selectedImgFile = _a.selectedImgFile;
579
+ var LPObj = (0, _storeUtil.getSessionStore)('channelPurchase') || {};
580
+ return /*#__PURE__*/_react["default"].createElement("div", {
581
+ className: (0, _classnames["default"])('personal-information-second-mobile')
582
+ }, /*#__PURE__*/_react["default"].createElement("div", {
583
+ className: "top"
584
+ }, /*#__PURE__*/_react["default"].createElement("div", {
585
+ className: "pInfoWrap"
586
+ }, (0, _commonUtil.isLogin)() ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
587
+ className: "photoWrap"
588
+ }, data.decorationIcon.open && data.decorationIcon.content.h5ImgSrc && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
589
+ className: "decorationIcon",
590
+ data: data.decorationIcon
591
+ }), /*#__PURE__*/_react["default"].createElement("img", {
592
+ alt: "",
593
+ className: "photo",
594
+ src: userInfo.photo || _avatar["default"],
595
+ style: {
596
+ height: 44,
597
+ width: 44,
598
+ background: userInfo.photo ? '#fff' : 'unset'
599
+ }
600
+ }), /*#__PURE__*/_react["default"].createElement("input", {
601
+ accept: "image/*",
602
+ id: "userPhoto",
603
+ onChange: this.handleFileChange,
604
+ type: "file"
605
+ })), /*#__PURE__*/_react["default"].createElement("div", {
606
+ className: "userInfo"
607
+ }, /*#__PURE__*/_react["default"].createElement("span", {
608
+ className: "name",
609
+ onClick: this.clickName
610
+ }, userInfo.firstName || userInfo.nickName), /*#__PURE__*/_react["default"].createElement("br", null), /*#__PURE__*/_react["default"].createElement("span", {
611
+ className: "wishlist",
612
+ onClick: function onClick() {
613
+ return _this.onItemClick(_index.personalInfoType.WISHLIST);
614
+ }
615
+ }, /*#__PURE__*/_react["default"].createElement("span", null, this.getNum(_index.personalInfoType.WISHLIST), " "), " Wishlist"), "|", /*#__PURE__*/_react["default"].createElement("span", {
616
+ className: "following",
617
+ onClick: function onClick() {
618
+ return _this.onItemClick(_index.personalInfoType.STORES);
619
+ }
620
+ }, /*#__PURE__*/_react["default"].createElement("span", null, this.getNum(_index.personalInfoType.STORES), " "), " Following"))) : /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
621
+ className: "photoWrap"
622
+ }, data.decorationIcon.open && data.decorationIcon.content.h5ImgSrc && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
623
+ className: "decorationIcon",
624
+ data: data.decorationIcon
625
+ }), /*#__PURE__*/_react["default"].createElement("img", {
626
+ alt: "",
627
+ className: "photo",
628
+ src: _avatar["default"]
629
+ })), data.login.open && /*#__PURE__*/_react["default"].createElement("span", {
630
+ className: "btnLogin",
631
+ onClick: this.goLoginPage
632
+ }, (0, _locale.i18n)('LOGIN_OR_REGISTER')))), /*#__PURE__*/_react["default"].createElement("div", {
633
+ className: "btnGroup"
634
+ }, (0, _isEmpty["default"])(LPObj) && /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
635
+ color: "#3E3E3E",
636
+ onClick: this.goSettings,
637
+ size: 24,
638
+ type: "icon-set"
639
+ }), /*#__PURE__*/_react["default"].createElement("div", {
640
+ className: "iconWrap"
641
+ }, /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
642
+ color: "#3E3E3E",
643
+ onClick: this.goMessageCenter,
644
+ size: 24,
645
+ type: "icon-messages"
646
+ }), !!messageNum && /*#__PURE__*/_react["default"].createElement("span", {
647
+ className: "num"
648
+ }, messageNum)))), /*#__PURE__*/_react["default"].createElement("div", {
649
+ className: "orders"
650
+ }, /*#__PURE__*/_react["default"].createElement("div", {
651
+ className: "fixed-wrap"
652
+ }, /*#__PURE__*/_react["default"].createElement("div", {
653
+ className: "top"
654
+ }, /*#__PURE__*/_react["default"].createElement("span", {
655
+ className: "title"
656
+ }, (0, _locale.i18n)('ORDERS')), /*#__PURE__*/_react["default"].createElement("div", {
657
+ className: "btn-wrap"
658
+ }, /*#__PURE__*/_react["default"].createElement("span", {
659
+ className: "text",
660
+ onClick: function onClick() {
661
+ if ((0, _commonUtil.checkLogin)(true)) (0, _commonUtil.navigateTo)('/main/order/0');
662
+ }
663
+ }, (0, _locale.i18n)('VIEW_ALL_ORDERS')), /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
664
+ color: "#0038A7",
665
+ size: 13,
666
+ type: "icon-outlined-right"
667
+ }))), /*#__PURE__*/_react["default"].createElement("div", {
668
+ className: "list"
669
+ }, data.groupSource2.map(function (item) {
670
+ return /*#__PURE__*/_react["default"].createElement("div", {
671
+ key: item.id,
672
+ className: "item",
673
+ onClick: function onClick() {
674
+ return _this.onOrderItemClick(item.sourceType);
675
+ }
676
+ }, /*#__PURE__*/_react["default"].createElement("div", {
677
+ className: "content-wrap",
678
+ style: {
679
+ pointerEvents: window.magicDesign.mode == 'designer' ? 'auto' : 'none'
680
+ }
681
+ }, /*#__PURE__*/_react["default"].createElement("div", {
682
+ className: "img-wrap"
683
+ }, item.image.open && _this.getImageHtml(item)), item.title.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
684
+ className: "title",
685
+ data: item.title,
686
+ onTextInput: function onTextInput(text) {
687
+ item.title.text = text;
688
+ }
689
+ })));
690
+ })))), editImgModalVisible && /*#__PURE__*/_react["default"].createElement(_common.CropperModal, {
691
+ onClose: function onClose() {
692
+ _this.setState({
693
+ editImgModalVisible: false
694
+ });
695
+
696
+ _this.showBottomBar();
697
+ },
698
+ onSubmit: this.onUploadImg,
699
+ uploadedImageFile: selectedImgFile
700
+ }));
701
+ };
702
+
703
+ PersonalInfoMobile.defaultProps = {
704
+ data: {}
705
+ };
706
+ return PersonalInfoMobile;
707
+ }(_react["default"].Component);
708
+
709
+ var _default = PersonalInfoMobile;
710
+ exports["default"] = _default;