tplus-portaltouch 3.22.6 → 3.22.7

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.
@@ -5,29 +5,29 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = undefined;
7
7
 
8
- var _stringify = require('babel-runtime/core-js/json/stringify');
9
-
10
- var _stringify2 = _interopRequireDefault(_stringify);
11
-
12
8
  var _assign = require('babel-runtime/core-js/object/assign');
13
9
 
14
10
  var _assign2 = _interopRequireDefault(_assign);
15
11
 
16
- var _regenerator = require('babel-runtime/regenerator');
12
+ var _extends2 = require('babel-runtime/helpers/extends');
17
13
 
18
- var _regenerator2 = _interopRequireDefault(_regenerator);
14
+ var _extends3 = _interopRequireDefault(_extends2);
19
15
 
20
- var _asyncToGenerator2 = require('babel-runtime/helpers/asyncToGenerator');
16
+ var _stringify = require('babel-runtime/core-js/json/stringify');
21
17
 
22
- var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);
18
+ var _stringify2 = _interopRequireDefault(_stringify);
23
19
 
24
20
  var _promise = require('babel-runtime/core-js/promise');
25
21
 
26
22
  var _promise2 = _interopRequireDefault(_promise);
27
23
 
28
- var _extends2 = require('babel-runtime/helpers/extends');
24
+ var _regenerator = require('babel-runtime/regenerator');
29
25
 
30
- var _extends3 = _interopRequireDefault(_extends2);
26
+ var _regenerator2 = _interopRequireDefault(_regenerator);
27
+
28
+ var _asyncToGenerator2 = require('babel-runtime/helpers/asyncToGenerator');
29
+
30
+ var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);
31
31
 
32
32
  var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');
33
33
 
@@ -52,7 +52,7 @@ var _inherits3 = _interopRequireDefault(_inherits2);
52
52
  var _class, _class2, _temp; /*
53
53
  * @Description:
54
54
  * @Date: 2019-08-13 08:42:18
55
- * @LastEditTime: 2021-10-27 11:15:33
55
+ * @LastEditTime: 2021-09-27 19:05:04
56
56
  * @LastEditors: chenlongad
57
57
  * @modify:修改跳转到T+的查询方案方式
58
58
  */
@@ -121,6 +121,105 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
121
121
 
122
122
  var _this = (0, _possibleConstructorReturn3.default)(this, (_default.__proto__ || (0, _getPrototypeOf2.default)(_default)).call(this, props));
123
123
 
124
+ _this.catchOfflineData = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee() {
125
+ var offlineSys, isLoginAfter, downloadCatcherDay, currentDay, downProgress, result;
126
+ return _regenerator2.default.wrap(function _callee$(_context) {
127
+ while (1) {
128
+ switch (_context.prev = _context.next) {
129
+ case 0:
130
+ offlineSys = _this.context.stores.offlineSys;
131
+ isLoginAfter = _mutantsMicrofx.localStore.get("isLoginAfter");
132
+ downloadCatcherDay = _mutantsMicrofx.localStore.get("downloadCatcherDay");
133
+ currentDay = Math.ceil(new Date() / 1000 / 60 / 60 / 24);
134
+
135
+ if (!(isLoginAfter == 1)) {
136
+ _context.next = 14;
137
+ break;
138
+ }
139
+
140
+ if (!(!downloadCatcherDay || currentDay > downloadCatcherDay)) {
141
+ _context.next = 13;
142
+ break;
143
+ }
144
+
145
+ downProgress = function downProgress(params) {
146
+ _tplusComponentsTouch.Loading.transfer(params);
147
+ };
148
+
149
+ _tplusComponentsTouch.Loading.show({
150
+ text: '离线数据下载中',
151
+ delay: 0,
152
+ showProgress: true
153
+ });
154
+ _context.next = 10;
155
+ return offlineSys.downloadCatcherData(downProgress);
156
+
157
+ case 10:
158
+ result = _context.sent;
159
+
160
+ _tplusComponentsTouch.Loading.hide();
161
+ if (result) {
162
+ _mutantsMicrofx.localStore.set("downloadCatcherDay", currentDay);
163
+ }
164
+
165
+ case 13:
166
+ _mutantsMicrofx.localStore.set("isLoginAfter", 0);
167
+
168
+ case 14:
169
+ case 'end':
170
+ return _context.stop();
171
+ }
172
+ }
173
+ }, _callee, _this2);
174
+ }));
175
+
176
+ _this.getOperation = function () {
177
+ return new _promise2.default(function (resolve, reject) {
178
+ var _this$context = _this.context,
179
+ _this$context$stores = _this$context.stores;
180
+ _this$context$stores = _this$context$stores === undefined ? {} : _this$context$stores;
181
+ var portalStore = _this$context$stores.portalStore,
182
+ _this$context$headHoo = _this$context.headHook;
183
+ _this$context$headHoo = _this$context$headHoo === undefined ? {} : _this$context$headHoo;
184
+ var addClass = _this$context$headHoo.addClass;
185
+ var homeOperation = _ModifyPassApi.Request.homeOperation,
186
+ functionData = _ModifyPassApi.Request.functionData;
187
+
188
+ _tplusComponentsTouch.Loading.show({
189
+ text: '首页权限加载中...',
190
+ delay: 2500
191
+ });
192
+ homeOperation().then(function (operations) {
193
+ _mutantsMicrofx.localStore.set('operationsAuth', (0, _stringify2.default)(operations));
194
+ _this.setState({ operations: operations || [] });
195
+ _tplusComponentsTouch.Loading.hide();
196
+ resolve();
197
+ }).catch(function (err) {
198
+ console.log('homeOperation.error======', err);
199
+ _tplusComponentsTouch.Loading.hide();
200
+ resolve();
201
+ });
202
+ functionData().then(function (data) {
203
+ // 加载权限数据 DR-29735 by majian
204
+ (0, _tplusPoslogin.PosSetData)(data);
205
+ });
206
+ // portalStore && portalStore.getPortalMenu();
207
+ addClass && addClass(_this.state.id, 'portalHead');
208
+ // 初始化参数设置。
209
+ _mutantsMicrofx.stores.setStore.initSetParams().then(function (ret) {
210
+ // 在客户端中,如果开启了副屏设置,尝试这打开副屏。
211
+ if (_this.getScreenType() === true) {
212
+ if (_this.isHorizontalSunMi) {
213
+ _this.sunMiPresentationInit(ret);
214
+ return;
215
+ }
216
+ window.open('vicescreen?ts=' + new Date().getTime(), 'screen');
217
+ }
218
+ });
219
+ _this.hsyBasicInfoInit();
220
+ });
221
+ };
222
+
124
223
  _this.initHsyPage = function () {
125
224
  var external_frame = document.getElementById('external-frame-cc');
126
225
  var win = external_frame && external_frame.contentWindow;
@@ -138,12 +237,12 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
138
237
  //SunMi初始化参数设置。
139
238
  //副屏幕交互。硬件改动20200428 需要在商米页面加载成功后才能发送 初始化命令
140
239
  // 进行主副屏数据交互 初始化
141
- var _ref = _mutantsMicrofx.localStore.get('user') || {},
142
- _ref$store = _ref.store;
240
+ var _ref2 = _mutantsMicrofx.localStore.get('user') || {},
241
+ _ref2$store = _ref2.store;
143
242
 
144
- _ref$store = _ref$store === undefined ? {} : _ref$store;
145
- var _ref$store$storeName = _ref$store.storeName,
146
- storeName = _ref$store$storeName === undefined ? '' : _ref$store$storeName;
243
+ _ref2$store = _ref2$store === undefined ? {} : _ref2$store;
244
+ var _ref2$store$storeName = _ref2$store.storeName,
245
+ storeName = _ref2$store$storeName === undefined ? '' : _ref2$store$storeName;
147
246
 
148
247
  console.log(result);
149
248
 
@@ -187,11 +286,11 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
187
286
 
188
287
  var loginInfo = user.options.get('loginInfo');
189
288
 
190
- var _ref2 = loginInfo || {},
191
- UserCode = _ref2.UserCode,
192
- AccountNum = _ref2.AccountNum,
193
- posCode = _ref2.posCode,
194
- TplusStoreId = _ref2.TplusStoreId;
289
+ var _ref3 = loginInfo || {},
290
+ UserCode = _ref3.UserCode,
291
+ AccountNum = _ref3.AccountNum,
292
+ posCode = _ref3.posCode,
293
+ TplusStoreId = _ref3.TplusStoreId;
195
294
 
196
295
  var uid = _this.tplusEncode(UserCode);
197
296
  var pwd = _this.tplusEncode(user.options.get("password"));
@@ -243,11 +342,11 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
243
342
  return vv.Name === Name;
244
343
  });
245
344
 
246
- var _ref3 = controllable || {},
247
- Visibility = _ref3.Visibility,
248
- HoldFunctionAuth = _ref3.HoldFunctionAuth,
249
- Title = _ref3.Title,
250
- MenuCode = _ref3.MenuCode;
345
+ var _ref4 = controllable || {},
346
+ Visibility = _ref4.Visibility,
347
+ HoldFunctionAuth = _ref4.HoldFunctionAuth,
348
+ Title = _ref4.Title,
349
+ MenuCode = _ref4.MenuCode;
251
350
 
252
351
  var errorTip = void 0;
253
352
  if (type == 'more') {
@@ -264,6 +363,12 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
264
363
  okType: 'primary'
265
364
  });
266
365
  }
366
+
367
+ if (!_mutantsMicrofx.stores.offlineSys.shouldOpenHomeOperation(Name)) {
368
+ _tplusComponentsTouch.Message.warn("离线模式下此操作不可用");
369
+ return;
370
+ }
371
+
267
372
  if (!Visibility) {
268
373
  errorTip = '\u60A8\u7684 ' + Title + ' \u6A21\u5757\u6CA1\u6709\u542F\u7528';
269
374
  } else if (!HoldFunctionAuth) {
@@ -322,14 +427,14 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
322
427
  };
323
428
 
324
429
  _this.toFramePage = function (params) {
325
- var _ref4 = params || {},
326
- app = _ref4.app,
327
- title = _ref4.title,
328
- style = _ref4.style,
329
- search = _ref4.search,
330
- tmenuCode = _ref4.tmenuCode,
331
- MenuCode = _ref4.MenuCode,
332
- isHsyLoadFinish = _ref4.isHsyLoadFinish;
430
+ var _ref5 = params || {},
431
+ app = _ref5.app,
432
+ title = _ref5.title,
433
+ style = _ref5.style,
434
+ search = _ref5.search,
435
+ tmenuCode = _ref5.tmenuCode,
436
+ MenuCode = _ref5.MenuCode,
437
+ isHsyLoadFinish = _ref5.isHsyLoadFinish;
333
438
 
334
439
  switch (app) {
335
440
  case 'cc':
@@ -388,37 +493,37 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
388
493
  };
389
494
 
390
495
  _this.toTplusPage = function () {
391
- var _ref5 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(tmenuCode, search) {
392
- var ret, _ref6, ossjumpUrl, postMessageUrl, dsearchPlanID, portalStore, menu, external_frame_tc, win, loadTcURL;
496
+ var _ref6 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(tmenuCode, search) {
497
+ var ret, _ref7, ossjumpUrl, postMessageUrl, dsearchPlanID, portalStore, menu, external_frame_tc, win, loadTcURL;
393
498
 
394
- return _regenerator2.default.wrap(function _callee$(_context) {
499
+ return _regenerator2.default.wrap(function _callee2$(_context2) {
395
500
  while (1) {
396
- switch (_context.prev = _context.next) {
501
+ switch (_context2.prev = _context2.next) {
397
502
  case 0:
398
503
  ret = _this.getTcBasicInfoInit();
399
504
 
400
505
  if (!(ret === false)) {
401
- _context.next = 3;
506
+ _context2.next = 3;
402
507
  break;
403
508
  }
404
509
 
405
- return _context.abrupt('return');
510
+ return _context2.abrupt('return');
406
511
 
407
512
  case 3:
408
- _ref6 = ret || {}, ossjumpUrl = _ref6.ossjumpUrl, postMessageUrl = _ref6.postMessageUrl;
513
+ _ref7 = ret || {}, ossjumpUrl = _ref7.ossjumpUrl, postMessageUrl = _ref7.postMessageUrl;
409
514
  dsearchPlanID = '';
410
515
 
411
516
  if (!(search && search.id)) {
412
- _context.next = 10;
517
+ _context2.next = 10;
413
518
  break;
414
519
  }
415
520
 
416
521
  portalStore = _this.context.stores.portalStore;
417
- _context.next = 9;
522
+ _context2.next = 9;
418
523
  return portalStore.getSearchPlanId(search);
419
524
 
420
525
  case 9:
421
- dsearchPlanID = _context.sent;
526
+ dsearchPlanID = _context2.sent;
422
527
 
423
528
  case 10:
424
529
  menu = _this.tplusEncode(tmenuCode);
@@ -429,22 +534,22 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
429
534
  }
430
535
 
431
536
  if (!_this.isHorizontalSunMi) {
432
- _context.next = 17;
537
+ _context2.next = 17;
433
538
  break;
434
539
  }
435
540
 
436
541
  window.android_CommonFun.openWebUrlByOutBrowser(ossjumpUrl);
437
- _context.next = 25;
542
+ _context2.next = 25;
438
543
  break;
439
544
 
440
545
  case 17:
441
546
  if (!(_this.new_retail_app == 'tc' || _this.new_retail_app == 'tczsy' || _this.new_retail_app == 'tcyzj')) {
442
- _context.next = 20;
547
+ _context2.next = 20;
443
548
  break;
444
549
  }
445
550
 
446
551
  _mutantsMicrofx.nativeMs.useDefaultBrowser(ossjumpUrl);
447
- return _context.abrupt('return');
552
+ return _context2.abrupt('return');
448
553
 
449
554
  case 20:
450
555
  external_frame_tc = document.getElementById('external-frame-tc');
@@ -467,24 +572,24 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
467
572
 
468
573
  case 25:
469
574
  case 'end':
470
- return _context.stop();
575
+ return _context2.stop();
471
576
  }
472
577
  }
473
- }, _callee, _this2);
578
+ }, _callee2, _this2);
474
579
  }));
475
580
 
476
581
  return function (_x2, _x3) {
477
- return _ref5.apply(this, arguments);
582
+ return _ref6.apply(this, arguments);
478
583
  };
479
584
  }();
480
585
 
481
586
  _this.toHsyPage = function () {
482
- var _ref7 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(params) {
483
- var content_only, bar_bg, bar_active_bg, menu, secondRouter, activePrompt, closePrompt, closeable, leavePrompt, lock, pageId, pageParams, path, tabId, tabLabel, pageType, _k, filter, IdWarehouse, WarehouseName, IsPerformanceDistribution, _ref8, _ref8$loginInfo, _ref8$loginInfo$IdSto, IdStore, _ref8$loginInfo$PosId, PosId, _ref8$store, _ref8$store$storeName, storeName, commonArgs, actionUrl, cc_url, CC_WEB_URL, external_frame, win;
587
+ var _ref8 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(params) {
588
+ var content_only, bar_bg, bar_active_bg, menu, secondRouter, activePrompt, closePrompt, closeable, leavePrompt, lock, pageId, pageParams, path, tabId, tabLabel, pageType, _k, filter, IdWarehouse, WarehouseName, IsPerformanceDistribution, _ref9, _ref9$loginInfo, _ref9$loginInfo$IdSto, IdStore, _ref9$loginInfo$PosId, PosId, _ref9$store, _ref9$store$storeName, storeName, commonArgs, actionUrl, cc_url, CC_WEB_URL, external_frame, win;
484
589
 
485
- return _regenerator2.default.wrap(function _callee2$(_context2) {
590
+ return _regenerator2.default.wrap(function _callee3$(_context3) {
486
591
  while (1) {
487
- switch (_context2.prev = _context2.next) {
592
+ switch (_context3.prev = _context3.next) {
488
593
  case 0:
489
594
  content_only = params.content_only, bar_bg = params.bar_bg, bar_active_bg = params.bar_active_bg, menu = params.menu, secondRouter = params.secondRouter, activePrompt = params.activePrompt, closePrompt = params.closePrompt, closeable = params.closeable, leavePrompt = params.leavePrompt, lock = params.lock, pageId = params.pageId, pageParams = params.pageParams, path = params.path, tabId = params.tabId, tabLabel = params.tabLabel, pageType = params.pageType, _k = params._k;
490
595
  filter = {};
@@ -493,11 +598,11 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
493
598
  IdWarehouse = (0, _tplusPoslogin.PosInitData)('IdWarehouse') || '';
494
599
  WarehouseName = (0, _tplusPoslogin.PosInitData)('WarehouseName') || '';
495
600
  IsPerformanceDistribution = (0, _tplusPoslogin.PosInitData)('PerformanceDistribution') === 'SHIPPER_STORE' || false;
496
- _ref8 = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('user') || {}, _ref8$loginInfo = _ref8.loginInfo, _ref8$loginInfo$IdSto = _ref8$loginInfo.IdStore, IdStore = _ref8$loginInfo$IdSto === undefined ? '' : _ref8$loginInfo$IdSto, _ref8$loginInfo$PosId = _ref8$loginInfo.PosId, PosId = _ref8$loginInfo$PosId === undefined ? '' : _ref8$loginInfo$PosId, _ref8$store = _ref8.store;
497
- _ref8$store = _ref8$store === undefined ? {} : _ref8$store;
498
- _ref8$store$storeName = _ref8$store.storeName, storeName = _ref8$store$storeName === undefined ? '' : _ref8$store$storeName;
499
- _context2.t0 = pageType;
500
- _context2.next = _context2.t0 === 'voucher' ? 11 : _context2.t0 === 'report' ? 14 : 18;
601
+ _ref9 = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('user') || {}, _ref9$loginInfo = _ref9.loginInfo, _ref9$loginInfo$IdSto = _ref9$loginInfo.IdStore, IdStore = _ref9$loginInfo$IdSto === undefined ? '' : _ref9$loginInfo$IdSto, _ref9$loginInfo$PosId = _ref9$loginInfo.PosId, PosId = _ref9$loginInfo$PosId === undefined ? '' : _ref9$loginInfo$PosId, _ref9$store = _ref9.store;
602
+ _ref9$store = _ref9$store === undefined ? {} : _ref9$store;
603
+ _ref9$store$storeName = _ref9$store.storeName, storeName = _ref9$store$storeName === undefined ? '' : _ref9$store$storeName;
604
+ _context3.t0 = pageType;
605
+ _context3.next = _context3.t0 === 'voucher' ? 11 : _context3.t0 === 'report' ? 14 : 18;
501
606
  break;
502
607
 
503
608
  case 11:
@@ -527,7 +632,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
527
632
  }
528
633
  };
529
634
  }
530
- return _context2.abrupt('break', 18);
635
+ return _context3.abrupt('break', 18);
531
636
 
532
637
  case 14:
533
638
  filter = {
@@ -583,7 +688,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
583
688
  }
584
689
  };
585
690
  }
586
- return _context2.abrupt('break', 18);
691
+ return _context3.abrupt('break', 18);
587
692
 
588
693
  case 18:
589
694
  bar_bg = encodeURIComponent(bar_bg);
@@ -601,19 +706,19 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
601
706
  console.log('web_hsy_url:', cc_url);
602
707
 
603
708
  if (!_this.isHorizontalSunMi) {
604
- _context2.next = 37;
709
+ _context3.next = 37;
605
710
  break;
606
711
  }
607
712
 
608
- _context2.next = 32;
713
+ _context3.next = 32;
609
714
  return _tplusApi.User.getLoginCCMidWebUrl(cc_url);
610
715
 
611
716
  case 32:
612
- CC_WEB_URL = _context2.sent;
717
+ CC_WEB_URL = _context3.sent;
613
718
 
614
719
  console.log('CC_WEB_URL:', CC_WEB_URL);
615
720
  window.android_CommonFun.openWebUrlByOutBrowser(CC_WEB_URL);
616
- _context2.next = 42;
721
+ _context3.next = 42;
617
722
  break;
618
723
 
619
724
  case 37:
@@ -635,14 +740,14 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
635
740
 
636
741
  case 42:
637
742
  case 'end':
638
- return _context2.stop();
743
+ return _context3.stop();
639
744
  }
640
745
  }
641
- }, _callee2, _this2);
746
+ }, _callee3, _this2);
642
747
  }));
643
748
 
644
749
  return function (_x4) {
645
- return _ref7.apply(this, arguments);
750
+ return _ref8.apply(this, arguments);
646
751
  };
647
752
  }();
648
753
 
@@ -736,10 +841,10 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
736
841
  return vv.Name === v.Name;
737
842
  });
738
843
 
739
- var _ref9 = controllable || {},
740
- Visibility = _ref9.Visibility,
741
- HoldFunctionAuth = _ref9.HoldFunctionAuth,
742
- Title = _ref9.Title;
844
+ var _ref10 = controllable || {},
845
+ Visibility = _ref10.Visibility,
846
+ HoldFunctionAuth = _ref10.HoldFunctionAuth,
847
+ Title = _ref10.Title;
743
848
 
744
849
  var errorTip = void 0;
745
850
  if (!Visibility) {
@@ -982,12 +1087,12 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
982
1087
  modalURL: ''
983
1088
  };
984
1089
 
985
- var _ref10 = _mutantsUtil.platform || {},
986
- isVerticalTouch = _ref10.isVerticalTouch,
987
- isHorizontalPad = _ref10.isHorizontalPad,
988
- isHorizontalSunMi = _ref10.isHorizontalSunMi,
989
- isNewRetailBCPos = _ref10.isNewRetailBCPos,
990
- isNewRetailBCPosTC = _ref10.isNewRetailBCPosTC;
1090
+ var _ref11 = _mutantsUtil.platform || {},
1091
+ isVerticalTouch = _ref11.isVerticalTouch,
1092
+ isHorizontalPad = _ref11.isHorizontalPad,
1093
+ isHorizontalSunMi = _ref11.isHorizontalSunMi,
1094
+ isNewRetailBCPos = _ref11.isNewRetailBCPos,
1095
+ isNewRetailBCPosTC = _ref11.isNewRetailBCPosTC;
991
1096
 
992
1097
  _this.isVerticalTouch = !!isVerticalTouch;
993
1098
  _this.isHorizontalPad = !!isHorizontalPad;
@@ -1020,49 +1125,33 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
1020
1125
 
1021
1126
  (0, _createClass3.default)(_default, [{
1022
1127
  key: 'componentWillMount',
1023
- value: function componentWillMount() {
1024
- var _this3 = this;
1025
-
1026
- var _context3 = this.context,
1027
- _context3$stores = _context3.stores;
1028
- _context3$stores = _context3$stores === undefined ? {} : _context3$stores;
1029
- var portalStore = _context3$stores.portalStore,
1030
- _context3$headHook = _context3.headHook;
1031
- _context3$headHook = _context3$headHook === undefined ? {} : _context3$headHook;
1032
- var addClass = _context3$headHook.addClass;
1033
- var homeOperation = _ModifyPassApi.Request.homeOperation,
1034
- functionData = _ModifyPassApi.Request.functionData;
1035
-
1036
- _tplusComponentsTouch.Loading.show({
1037
- text: '首页权限加载中...',
1038
- delay: 2500
1039
- });
1040
- homeOperation().then(function (operations) {
1041
- _mutantsMicrofx.localStore.set('operationsAuth', operations ? (0, _stringify2.default)(operations) : []);
1042
- _this3.setState({ operations: operations || [] });
1043
- _tplusComponentsTouch.Loading.hide();
1044
- }).catch(function (err) {
1045
- console.log('homeOperation.error======', err);
1046
- _tplusComponentsTouch.Loading.hide();
1047
- });
1048
- functionData().then(function (data) {
1049
- // 加载权限数据 DR-29735 by majian
1050
- (0, _tplusPoslogin.PosSetData)(data);
1051
- });
1052
- addClass && addClass(this.state.id, 'portalHead');
1053
- // 初始化参数设置。
1054
- _mutantsMicrofx.stores.setStore.initSetParams().then(function (ret) {
1055
- // 在客户端中,如果开启了副屏设置,尝试这打开副屏。
1056
- if (_this3.getScreenType() === true) {
1057
- if (_this3.isHorizontalSunMi) {
1058
- _this3.sunMiPresentationInit(ret);
1059
- return;
1128
+ value: function () {
1129
+ var _ref12 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4() {
1130
+ return _regenerator2.default.wrap(function _callee4$(_context4) {
1131
+ while (1) {
1132
+ switch (_context4.prev = _context4.next) {
1133
+ case 0:
1134
+ _context4.next = 2;
1135
+ return this.catchOfflineData();
1136
+
1137
+ case 2:
1138
+ _context4.next = 4;
1139
+ return this.getOperation();
1140
+
1141
+ case 4:
1142
+ case 'end':
1143
+ return _context4.stop();
1144
+ }
1060
1145
  }
1061
- window.open('vicescreen?ts=' + new Date().getTime(), 'screen');
1062
- }
1063
- });
1064
- this.hsyBasicInfoInit();
1065
- }
1146
+ }, _callee4, this);
1147
+ }));
1148
+
1149
+ function componentWillMount() {
1150
+ return _ref12.apply(this, arguments);
1151
+ }
1152
+
1153
+ return componentWillMount;
1154
+ }()
1066
1155
  }, {
1067
1156
  key: 'componentDidMount',
1068
1157
  value: function componentDidMount() {
@@ -1099,9 +1188,9 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
1099
1188
  break;
1100
1189
  }
1101
1190
 
1102
- var _ref11 = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('StoreKey') || {},
1103
- _ref11$PosId = _ref11.PosId,
1104
- PosId = _ref11$PosId === undefined ? '' : _ref11$PosId;
1191
+ var _ref13 = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('StoreKey') || {},
1192
+ _ref13$PosId = _ref13.PosId,
1193
+ PosId = _ref13$PosId === undefined ? '' : _ref13$PosId;
1105
1194
 
1106
1195
  var cc_url = this.hsy_domain.replace('#/', '') + '?fromApp=nretail&posid=' + PosId + '&content_only=true&bar_bg=' + encodeURIComponent('#FFFFFF') + '&bar_active_bg=' + encodeURIComponent(color);
1107
1196
  this.setState({ loadHsyURL: cc_url });