tplus-portaltouch 3.46.1 → 3.48.1

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.
@@ -116,19 +116,20 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
116
116
  (0, _inherits3.default)(_default, _Component);
117
117
 
118
118
  function _default(props) {
119
- var _this2 = this;
119
+ var _this3 = this;
120
120
 
121
121
  (0, _classCallCheck3.default)(this, _default);
122
122
 
123
- var _this = (0, _possibleConstructorReturn3.default)(this, (_default.__proto__ || (0, _getPrototypeOf2.default)(_default)).call(this, props));
123
+ var _this2 = (0, _possibleConstructorReturn3.default)(this, (_default.__proto__ || (0, _getPrototypeOf2.default)(_default)).call(this, props));
124
124
 
125
- _this.catchOfflineData = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee() {
125
+ _this2.ccFrameStore = {};
126
+ _this2.catchOfflineData = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee() {
126
127
  var offlineSys, isLoginAfter, downloadCatcherDay, currentDay, downProgress, result;
127
128
  return _regenerator2.default.wrap(function _callee$(_context) {
128
129
  while (1) {
129
130
  switch (_context.prev = _context.next) {
130
131
  case 0:
131
- offlineSys = _this.context.stores.offlineSys;
132
+ offlineSys = _this2.context.stores.offlineSys;
132
133
  isLoginAfter = _mutantsMicrofx.localStore.get("isLoginAfter");
133
134
  downloadCatcherDay = _mutantsMicrofx.localStore.get("downloadCatcherDay");
134
135
  currentDay = Math.ceil(new Date() / 1000 / 60 / 60 / 24);
@@ -186,17 +187,17 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
186
187
  return _context.stop();
187
188
  }
188
189
  }
189
- }, _callee, _this2, [[6, 16, 20, 23]]);
190
+ }, _callee, _this3, [[6, 16, 20, 23]]);
190
191
  }));
191
192
 
192
- _this.getOperation = function () {
193
+ _this2.getOperation = function () {
193
194
  return new _promise2.default(function (resolve, reject) {
194
195
  var homeOperation = _ModifyPassApi.Request.homeOperation,
195
196
  functionData = _ModifyPassApi.Request.functionData;
196
197
 
197
198
  homeOperation().then(function (operations) {
198
199
  _mutantsMicrofx.localStore.set('operationsAuth', (0, _stringify2.default)(operations));
199
- _this.setState({ operations: operations || [] });
200
+ _this2.setState({ operations: operations || [] });
200
201
  resolve();
201
202
  }).catch(function (err) {
202
203
  console.log('homeOperation.error======', err);
@@ -209,16 +210,16 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
209
210
  });
210
211
  };
211
212
 
212
- _this.initPageData = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2() {
213
- var _this$context, _this$context$stores, stores, _this$context$headHoo, addClass, hasUseOffline;
213
+ _this2.initPageData = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2() {
214
+ var _this2$context, _this2$context$stores, stores, _this2$context$headHo, addClass, hasUseOffline;
214
215
 
215
216
  return _regenerator2.default.wrap(function _callee2$(_context2) {
216
217
  while (1) {
217
218
  switch (_context2.prev = _context2.next) {
218
219
  case 0:
219
- _this$context = _this.context, _this$context$stores = _this$context.stores, stores = _this$context$stores === undefined ? {} : _this$context$stores, _this$context$headHoo = _this$context.headHook;
220
- _this$context$headHoo = _this$context$headHoo === undefined ? {} : _this$context$headHoo;
221
- addClass = _this$context$headHoo.addClass;
220
+ _this2$context = _this2.context, _this2$context$stores = _this2$context.stores, stores = _this2$context$stores === undefined ? {} : _this2$context$stores, _this2$context$headHo = _this2$context.headHook;
221
+ _this2$context$headHo = _this2$context$headHo === undefined ? {} : _this2$context$headHo;
222
+ addClass = _this2$context$headHo.addClass;
222
223
  hasUseOffline = (0, _tplusPoslogin.PosInitData)('IsOfflineCash') === "1" && !_mutantsUtil.platform.otherOfflineStatus;
223
224
  ; //是否允许离线
224
225
  // const hasUseOffline = true;
@@ -229,7 +230,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
229
230
  }
230
231
 
231
232
  _context2.next = 8;
232
- return _this.catchOfflineData();
233
+ return _this2.catchOfflineData();
233
234
 
234
235
  case 8:
235
236
  _tplusComponentsTouch.Loading.show({
@@ -239,7 +240,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
239
240
  //权限加载
240
241
  _context2.prev = 9;
241
242
  _context2.next = 12;
242
- return _this.getOperation();
243
+ return _this2.getOperation();
243
244
 
244
245
  case 12:
245
246
  _context2.next = 17;
@@ -258,13 +259,13 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
258
259
  return _context2.finish(17);
259
260
 
260
261
  case 20:
261
- addClass && addClass(_this.state.id, 'portalHead');
262
+ addClass && addClass(_this2.state.id, 'portalHead');
262
263
  // 初始化参数设置。
263
264
  stores.setStore.initSetParams().then(function (ret) {
264
265
  // 在客户端中,如果开启了副屏设置,尝试这打开副屏。
265
- if (_this.getScreenType() === true) {
266
- if (_this.isHorizontalSunMi) {
267
- _this.sunMiPresentationInit(ret);
266
+ if (_this2.getScreenType() === true) {
267
+ if (_this2.isHorizontalSunMi) {
268
+ _this2.sunMiPresentationInit(ret);
268
269
  return;
269
270
  }
270
271
  console.log('副屏页面打开之前,user信息', (0, _stringify2.default)(stores.user));
@@ -274,17 +275,23 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
274
275
  }, 3000);
275
276
  }
276
277
  });
277
- _this.hsyBasicInfoInit();
278
278
 
279
- case 23:
279
+ case 22:
280
280
  case 'end':
281
281
  return _context2.stop();
282
282
  }
283
283
  }
284
- }, _callee2, _this2, [[9, 14, 17, 20]]);
284
+ }, _callee2, _this3, [[9, 14, 17, 20]]);
285
285
  }));
286
286
 
287
- _this.sunMiPresentationInit = function (result) {
287
+ _this2.loadHsyPage = function () {
288
+ if (_this2.isHsyIframeInclude) {
289
+ _this2.initHsyBasicPageInfo();
290
+ _this2.initHsyFrameWin();
291
+ }
292
+ };
293
+
294
+ _this2.sunMiPresentationInit = function (result) {
288
295
  //SunMi初始化参数设置。
289
296
  //副屏幕交互。硬件改动20200428 需要在商米页面加载成功后才能发送 初始化命令
290
297
  // 进行主副屏数据交互 初始化
@@ -308,10 +315,10 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
308
315
  });
309
316
  };
310
317
 
311
- _this.getTcBasicInfoInit = function () {
318
+ _this2.getTcBasicInfoInit = function () {
312
319
  var userStore = _tplusApi.User.restore();
313
320
  var sid = userStore.sid;
314
- var tplusUrl = _this.tplusSiteUrl;
321
+ var tplusUrl = _this2.tplusSiteUrl;
315
322
  if (!tplusUrl) {
316
323
  var msg = "请用admin登录,在服务器配置–地址配置处,设置“内部或外部网络访问T+服务器的地址”!";
317
324
  _tplusComponentsTouch.ModalWraper.warning({
@@ -330,7 +337,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
330
337
  ossjumpUrl = tplusUrl + 'view/ossjump.html?t=' + new Date().getTime() + '&sid=' + sid;
331
338
  }
332
339
  var postMsgUrl = ossjumpUrl;
333
- var user = _this.context.stores.user;
340
+ var user = _this2.context.stores.user;
334
341
 
335
342
  var loginInfo = user.options.get('loginInfo');
336
343
 
@@ -340,18 +347,18 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
340
347
  posCode = _ref4.posCode,
341
348
  TplusStoreId = _ref4.TplusStoreId;
342
349
 
343
- var uid = _this.tplusEncode(UserCode);
344
- var pwd = _this.tplusEncode(user.options.get("password"));
345
- var accNum = _this.tplusEncode(AccountNum);
346
- var code = _this.tplusEncode(posCode);
347
- var store = _this.tplusEncode(TplusStoreId + '');
350
+ var uid = _this2.tplusEncode(UserCode);
351
+ var pwd = _this2.tplusEncode(user.options.get("password"));
352
+ var accNum = _this2.tplusEncode(AccountNum || '');
353
+ var code = _this2.tplusEncode(posCode);
354
+ var store = _this2.tplusEncode(TplusStoreId + '');
348
355
  ossjumpUrl += '&fromApp=nretail&way=inframe&user=' + uid + '&pwd=' + pwd + '&accNum=' + accNum + '&posCode=' + code + '&storeID=' + store;
349
356
  return { ossjumpUrl: ossjumpUrl, postMessageUrl: postMsgUrl };
350
357
  };
351
358
 
352
- _this.getScreenType = function () {
359
+ _this2.getScreenType = function () {
353
360
  var flag = false;
354
- if (_this.hasElectron === true || _this.isHorizontalSunMi) {
361
+ if (_this2.hasElectron === true || _this2.isHorizontalSunMi) {
355
362
  var data = _mutantsMicrofx.localStore.get('setting_setData') || [];
356
363
  data = data.filter(function (item) {
357
364
  return item.Name === 'EnableDoubleScreen';
@@ -364,14 +371,14 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
364
371
  return flag;
365
372
  };
366
373
 
367
- _this.saveLog = function (name) {
374
+ _this2.saveLog = function (name) {
368
375
  var saveLogo = _ModifyPassApi.Request.saveLogo;
369
376
 
370
377
  name = "进入模块:" + name;
371
378
  saveLogo('进入模块', undefined, name);
372
379
  };
373
380
 
374
- _this.handelClick = function () {
381
+ _this2.handelClick = function () {
375
382
  var values = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
376
383
  var type = values.key,
377
384
  isModal = values.isModal,
@@ -382,9 +389,9 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
382
389
  style = values.style,
383
390
  search = values.search,
384
391
  tmenuCode = values.tmenuCode;
385
- var _this$state = _this.state,
386
- operations = _this$state.operations,
387
- isHsyLoadFinish = _this$state.isHsyLoadFinish;
392
+ var _this2$state = _this2.state,
393
+ operations = _this2$state.operations,
394
+ isHsyLoadFinish = _this2$state.isHsyLoadFinish;
388
395
 
389
396
  var controllable = operations.find(function (vv) {
390
397
  return vv.Name === Name;
@@ -405,20 +412,20 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
405
412
  }
406
413
 
407
414
  // 会员拉新
408
- if (type == 'memberRecruitment' && (_this.isEnablePromotion == false || _this.isEnableMember == false)) {
415
+ if (type == 'memberRecruitment' && (_this2.isEnablePromotion == false || _this2.isEnableMember == false)) {
409
416
  _tplusComponentsTouch.Message.warn("您还未开通会员/促销管理,请立即开通", { duration: 3 });
410
417
  return;
411
418
  }
412
419
 
413
420
  // 会员消费查询
414
- if (type == 'memberConsumDetail' && _this.isEnableMember == false) {
421
+ if (type == 'memberConsumDetail' && _this2.isEnableMember == false) {
415
422
  _tplusComponentsTouch.Message.warn("您还未开通会员管理,请立即开通", { duration: 3 });
416
423
  return;
417
424
  }
418
425
 
419
426
  // 更多
420
427
  if (type == 'more') {
421
- return _this.setState({ showMoreModal: true });
428
+ return _this2.setState({ showMoreModal: true });
422
429
  }
423
430
 
424
431
  if (!Title) {
@@ -438,7 +445,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
438
445
  } else if (!HoldFunctionAuth) {
439
446
  errorTip = '\u60A8\u6CA1\u6709\u64CD\u4F5C ' + Title + ' \u7684\u6743\u9650';
440
447
  }
441
- var portalStore = _this.context.stores.portalStore;
448
+ var portalStore = _this2.context.stores.portalStore;
442
449
 
443
450
  if (errorTip) {
444
451
  return _tplusComponentsTouch.Message.warn(errorTip);
@@ -447,7 +454,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
447
454
  return _mutantsMicrofx.stores.modalRouter.show({ url: '/' + type, width: 800, title: title });
448
455
  }
449
456
  // 支持页面内打开,减少再次加载页面的时间。
450
- if (iframe === true) return _this.toFramePage({ type: type, app: app, title: title, style: style, search: search, MenuCode: MenuCode, tmenuCode: tmenuCode, isHsyLoadFinish: isHsyLoadFinish });
457
+ if (iframe === true) return _this2.toFramePage({ type: type, app: app, title: title, style: style, search: search, MenuCode: MenuCode, tmenuCode: tmenuCode, isHsyLoadFinish: isHsyLoadFinish });
451
458
  switch (type) {
452
459
  case 'cashier':
453
460
  portalStore.checkDuty().then(function (onDutyMessage) {
@@ -460,7 +467,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
460
467
 
461
468
  (0, _tplusPoslogin.PosSetData)({ ShiftCode: Code, IdShiftVoucher: IdShiftVoucher, Shift: Shift, IdDailyVoucher: IdDailyVoucher, DailyCode: DailyCode });
462
469
  console.log('onDutyMessage======', onDutyMessage);
463
- _this.saveLog(title);
470
+ _this2.saveLog(title);
464
471
  _mutantsMicrofx.history.push('/RE/RE01');
465
472
  }
466
473
  }).catch(function (data) {
@@ -490,7 +497,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
490
497
  }
491
498
  };
492
499
 
493
- _this.toFramePage = function (params) {
500
+ _this2.toFramePage = function (params) {
494
501
  var _ref6 = params || {},
495
502
  app = _ref6.app,
496
503
  title = _ref6.title,
@@ -503,10 +510,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
503
510
  switch (app) {
504
511
  case 'cc':
505
512
  var sh = '';
506
- // if (this.isMobileEnvironment) { //暂时不支持android系统跳转
507
- // return Message.warn('新功能正在研发中,敬请期待。');
508
- // }
509
- if (!isHsyLoadFinish && !_this.isMobileEnvironment) {
513
+ if (!isHsyLoadFinish && !_this2.isMobileEnvironment) {
510
514
  return _tplusComponentsTouch.Message.warn('正在加载资源中,请稍后。');
511
515
  }
512
516
  if (!search) {
@@ -520,22 +524,22 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
520
524
  if (!sh) {
521
525
  return _tplusComponentsTouch.Message.warn('传递参数有误,请查证。');
522
526
  }
523
- _this.toHsyPage((0, _extends3.default)({}, style, sh));
527
+ _this2.toHsyPage((0, _extends3.default)({}, style, sh));
524
528
  break;
525
529
  case 'tc':
526
530
  if (tmenuCode || MenuCode) {
527
- _this.saveLog(title);
531
+ _this2.saveLog(title);
528
532
  if (MenuCode) {
529
- _this.toTplusPage(MenuCode, search);
533
+ _this2.toTplusPage(MenuCode, search);
530
534
  } else {
531
- _this.toTplusPage(tmenuCode, search);
535
+ _this2.toTplusPage(tmenuCode, search);
532
536
  }
533
537
  }
534
538
  break;
535
539
  }
536
540
  };
537
541
 
538
- _this.getTplusUrlFromCloudServer = function () {
542
+ _this2.getTplusUrlFromCloudServer = function () {
539
543
  //获取T+服务器配置地址。
540
544
  var userStore = _tplusApi.User.restore();
541
545
  var data = 'accesstoken=' + ('' + userStore.accessToken) + '&cloudOrgId=' + ('' + userStore.orgId);
@@ -559,7 +563,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
559
563
  });
560
564
  };
561
565
 
562
- _this.toTplusPage = function () {
566
+ _this2.toTplusPage = function () {
563
567
  var _ref7 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(tmenuCode, search) {
564
568
  var ret, _ref8, ossjumpUrl, postMessageUrl, dsearchPlanID, portalStore, menu, external_frame_tc, win, loadTcURL;
565
569
 
@@ -567,7 +571,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
567
571
  while (1) {
568
572
  switch (_context3.prev = _context3.next) {
569
573
  case 0:
570
- ret = _this.getTcBasicInfoInit();
574
+ ret = _this2.getTcBasicInfoInit();
571
575
 
572
576
  if (!(ret === false)) {
573
577
  _context3.next = 3;
@@ -585,7 +589,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
585
589
  break;
586
590
  }
587
591
 
588
- portalStore = _this.context.stores.portalStore;
592
+ portalStore = _this2.context.stores.portalStore;
589
593
  _context3.next = 9;
590
594
  return portalStore.getSearchPlanId(search);
591
595
 
@@ -593,14 +597,14 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
593
597
  dsearchPlanID = _context3.sent;
594
598
 
595
599
  case 10:
596
- menu = _this.tplusEncode(tmenuCode);
600
+ menu = _this2.tplusEncode(tmenuCode);
597
601
 
598
- ossjumpUrl += '&menu=' + menu + '&fromUrl=' + _this.tplusEncode(location.origin);
602
+ ossjumpUrl += '&menu=' + menu + '&fromUrl=' + _this2.tplusEncode(location.origin);
599
603
  if (dsearchPlanID) {
600
- ossjumpUrl += '&searchPlanID=' + _this.tplusEncode(dsearchPlanID);
604
+ ossjumpUrl += '&searchPlanID=' + _this2.tplusEncode(dsearchPlanID);
601
605
  }
602
606
 
603
- if (!_this.isHorizontalSunMi) {
607
+ if (!_this2.isHorizontalSunMi) {
604
608
  _context3.next = 17;
605
609
  break;
606
610
  }
@@ -610,7 +614,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
610
614
  break;
611
615
 
612
616
  case 17:
613
- if (!(_this.new_retail_app == 'tc' || _this.new_retail_app == 'tczsy' || _this.new_retail_app == 'tcyzj')) {
617
+ if (!(_this2.new_retail_app == 'tc' || _this2.new_retail_app == 'tczsy' || _this2.new_retail_app == 'tcyzj')) {
614
618
  _context3.next = 20;
615
619
  break;
616
620
  }
@@ -621,18 +625,18 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
621
625
  case 20:
622
626
  external_frame_tc = document.getElementById('external-frame-tc');
623
627
  win = external_frame_tc.contentWindow;
624
- loadTcURL = _this.state.loadTcURL;
628
+ loadTcURL = _this2.state.loadTcURL;
625
629
 
626
630
  if (loadTcURL) {
627
631
  win && win.postMessage({ doType: 'openMenuFromPos', tmenuCode: tmenuCode, ossjumpUrl: ossjumpUrl, dsearchPlanID: dsearchPlanID }, postMessageUrl);
628
- _this.setState({ loadTcPage: true });
632
+ _this2.setState({ loadTcPage: true });
629
633
  } else {
630
- _this.setState({ loadTcURL: ossjumpUrl, loadTcPage: true });
634
+ _this2.setState({ loadTcURL: ossjumpUrl, loadTcPage: true });
631
635
  }
632
636
  rx$.changeHsy.next({
633
637
  back: true, fn: function fn() {
634
638
  win && win.postMessage({ doType: 'closeCurrentMenuFromPos' }, postMessageUrl);
635
- _this.setState({ loadTcPage: false });
639
+ _this2.setState({ loadTcPage: false });
636
640
  rx$.changeHsy.next({ back: false });
637
641
  }
638
642
  });
@@ -642,7 +646,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
642
646
  return _context3.stop();
643
647
  }
644
648
  }
645
- }, _callee3, _this2);
649
+ }, _callee3, _this3);
646
650
  }));
647
651
 
648
652
  return function (_x2, _x3) {
@@ -650,9 +654,9 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
650
654
  };
651
655
  }();
652
656
 
653
- _this.toHsyPage = function () {
657
+ _this2.toHsyPage = function () {
654
658
  var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(params) {
655
- 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, _ref10, _ref10$IdStore, IdStore, _ref10$PosId, PosId, _ref11, _ref11$storeName, storeName, commonArgs, actionUrl, cc_url, CC_WEB_URL;
659
+ 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, _ref10, _ref10$IdStore, IdStore, _ref10$PosId, PosId, _ref11, _ref11$storeName, storeName, commonArgs, actionUrl, cc_url, CC_WEB_URL, _hsyPage;
656
660
 
657
661
  return _regenerator2.default.wrap(function _callee4$(_context4) {
658
662
  while (1) {
@@ -662,9 +666,9 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
662
666
  filter = {};
663
667
  //对仓库参数的处理
664
668
 
665
- IdWarehouse = _this.idWarehouse;
666
- WarehouseName = _this.warehouseName;
667
- IsPerformanceDistribution = _this.performanceDistribution === 'SHIPPER_STORE' || false;
669
+ IdWarehouse = _this2.idWarehouse;
670
+ WarehouseName = _this2.warehouseName;
671
+ IsPerformanceDistribution = _this2.performanceDistribution === 'SHIPPER_STORE' || false;
668
672
  _ref10 = _mutantsMicrofx.stores.user.options.get('loginInfo') || {}, _ref10$IdStore = _ref10.IdStore, IdStore = _ref10$IdStore === undefined ? '' : _ref10$IdStore, _ref10$PosId = _ref10.PosId, PosId = _ref10$PosId === undefined ? '' : _ref10$PosId;
669
673
  _ref11 = _mutantsMicrofx.stores.user.options.get('store') || {}, _ref11$storeName = _ref11.storeName, storeName = _ref11$storeName === undefined ? '' : _ref11$storeName;
670
674
  _context4.t0 = pageType;
@@ -765,19 +769,19 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
765
769
  case 18:
766
770
  bar_bg = encodeURIComponent(bar_bg);
767
771
  bar_active_bg = encodeURIComponent(bar_active_bg);
768
- menu = secondRouter ? menu + '/' + _this.randomWord(true, 13) : menu;
772
+ menu = secondRouter ? menu + '/' + _this2.randomWord(true, 13) : menu;
769
773
  pageId = menu;
770
774
  pageParams = (0, _assign2.default)(pageParams, filter);
771
775
  path = encodeURIComponent(path);
772
- _k = _this.randomWord(false, 6);
776
+ _k = _this2.randomWord(false, 6);
773
777
 
774
778
  commonArgs = '?posid=' + PosId + '&content_only=' + content_only + '&bar_bg=' + bar_bg + '&bar_active_bg=' + bar_active_bg;
775
779
  actionUrl = '#/' + menu + '?activePrompt=' + activePrompt + '&closePrompt=' + closePrompt + '&closeable=' + closeable + '&leavePrompt=' + leavePrompt + '&lock=' + lock + '&pageId=' + pageId + '&pageParams=' + encodeURIComponent((0, _stringify2.default)(pageParams)) + '&path=' + path + '&tabId=' + tabId + '&tabLabel=' + encodeURIComponent(tabLabel) + '&_k=' + _k;
776
- cc_url = _this.hsy_domain.replace('#/', '') + commonArgs + actionUrl;
780
+ cc_url = _this2.hsy_domain.replace('#/', '') + commonArgs + actionUrl;
777
781
 
778
782
  console.log('web_hsy_url:', cc_url);
779
783
 
780
- if (!_this.isHorizontalSunMi) {
784
+ if (!_this2.isHorizontalSunMi) {
781
785
  _context4.next = 37;
782
786
  break;
783
787
  }
@@ -790,33 +794,32 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
790
794
 
791
795
  console.log('CC_WEB_URL:', CC_WEB_URL);
792
796
  window.android_CommonFun.openWebUrlByOutBrowser(CC_WEB_URL);
793
- _context4.next = 40;
797
+ _context4.next = 42;
794
798
  break;
795
799
 
796
800
  case 37:
797
- // this.ccFrameWin && this.ccFrameWin.HsyRouterJump && this.ccFrameWin.HsyRouterJump(pageId, pageParams, { closeable, tabLabel });
798
- _this.ccFrameStore && _this.ccFrameStore.sendMessage({ type: CC_FRAME_CONF.HsyRouterJump, pageId: pageId, pageParams: pageParams, extStateParams: { closeable: closeable, tabLabel: tabLabel }, _ident_only_: CC_FRAME_CONF.identOnly });
799
- if (_this.state.showMoreModal === true) {
800
- _this.setState({ loadHsyPage: true, showMoreModal: false });
801
- } else {
802
- _this.setState({ loadHsyPage: true });
801
+ _this2.ccFrameStore && _this2.ccFrameStore.sendMessage({ type: CC_FRAME_CONF.HsyRouterJump, pageId: pageId, pageParams: pageParams, extStateParams: { closeable: closeable, tabLabel: tabLabel }, _ident_only_: CC_FRAME_CONF.identOnly });
802
+ if (_this2.state.showMoreModal === true) {
803
+ _this2.setState({ showMoreModal: false });
803
804
  }
805
+ _hsyPage = document.getElementById(CC_FRAME_CONF.id);
806
+
807
+ if (_hsyPage) _hsyPage.style.top = '60px';
804
808
  rx$.changeHsy.next({
805
809
  back: true, fn: function fn() {
806
- _this.setState({ loadHsyPage: false });
810
+ if (_hsyPage) _hsyPage.style.top = '-100%';
807
811
  rx$.changeHsy.next({ back: false });
808
812
  // 在打开页签之前,关闭之前的,返回键的回调函数
809
- // this.ccFrameWin && this.ccFrameWin.HsyRouterClean && this.ccFrameWin.HsyRouterClean();
810
- _this.ccFrameStore && _this.ccFrameStore.sendMessage({ type: CC_FRAME_CONF.HsyRouterClean, _ident_only_: CC_FRAME_CONF.identOnly });
813
+ _this2.ccFrameStore && _this2.ccFrameStore.sendMessage({ type: CC_FRAME_CONF.HsyRouterClean, _ident_only_: CC_FRAME_CONF.identOnly });
811
814
  }
812
815
  });
813
816
 
814
- case 40:
817
+ case 42:
815
818
  case 'end':
816
819
  return _context4.stop();
817
820
  }
818
821
  }
819
- }, _callee4, _this2);
822
+ }, _callee4, _this3);
820
823
  }));
821
824
 
822
825
  return function (_x4) {
@@ -824,7 +827,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
824
827
  };
825
828
  }();
826
829
 
827
- _this.randomWord = function (only, digits) {
830
+ _this2.randomWord = function (only, digits) {
828
831
  var str = "";
829
832
  var number = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'];
830
833
  var letter = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'];
@@ -836,24 +839,24 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
836
839
  return str;
837
840
  };
838
841
 
839
- _this.closeFrameModal = function () {
840
- _this.setState({ showModal: false });
842
+ _this2.closeFrameModal = function () {
843
+ _this2.setState({ showModal: false });
841
844
  };
842
845
 
843
- _this.closeMoreModal = function () {
844
- _this.setState({ showMoreModal: false });
846
+ _this2.closeMoreModal = function () {
847
+ _this2.setState({ showMoreModal: false });
845
848
  };
846
849
 
847
- _this.tplusEncode = function (code) {
850
+ _this2.tplusEncode = function (code) {
848
851
  var c = String.fromCharCode(code.charCodeAt(0) + code.length);
849
852
  for (var i = 1; i < code.length; i++) {
850
853
  c += String.fromCharCode(code.charCodeAt(i) + code.charCodeAt(i - 1));
851
854
  }
852
- var ret = _this.TplusBase64Encode(c);
855
+ var ret = _this2.TplusBase64Encode(c);
853
856
  return ret;
854
857
  };
855
858
 
856
- _this.TplusBase64Encode = function (input) {
859
+ _this2.TplusBase64Encode = function (input) {
857
860
  var _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
858
861
  var output = "";
859
862
  var chr1 = void 0,
@@ -864,7 +867,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
864
867
  enc3 = void 0,
865
868
  enc4 = void 0;
866
869
  var i = 0;
867
- input = _this._utf8_encode(input);
870
+ input = _this2._utf8_encode(input);
868
871
  while (i < input.length) {
869
872
  chr1 = input.charCodeAt(i++);
870
873
  chr2 = input.charCodeAt(i++);
@@ -883,7 +886,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
883
886
  return output;
884
887
  };
885
888
 
886
- _this._utf8_encode = function (string) {
889
+ _this2._utf8_encode = function (string) {
887
890
  string = string.replace(/\r\n/g, "\n");
888
891
  var utftext = "";
889
892
  for (var n = 0; n < string.length; n++) {
@@ -902,13 +905,13 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
902
905
  return utftext;
903
906
  };
904
907
 
905
- _this.operationControl = function () {
908
+ _this2.operationControl = function () {
906
909
  var menu = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
907
- var operations = _this.state.operations;
910
+ var operations = _this2.state.operations;
908
911
 
909
912
  menu.forEach(function (v) {
910
913
  if (v.sub) {
911
- return _this.operationControl(v.sub);
914
+ return _this2.operationControl(v.sub);
912
915
  }
913
916
  var controllable = operations.find(function (vv) {
914
917
  return vv.Name === v.Name;
@@ -930,9 +933,9 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
930
933
  return menu;
931
934
  };
932
935
 
933
- _this.createLeftNode = function () {
934
- var menu = _this.leftMenu;
935
- var width = menu.length == 0 ? _this.isMobileEnvironment & !_this.isNewRetailBCPosTC ? 5 : 4 : 7;
936
+ _this2.createLeftNode = function () {
937
+ var menu = _this2.leftMenu;
938
+ var width = menu.length == 0 ? _this2.isMobileEnvironment & !_this2.isNewRetailBCPosTC ? 5 : 4 : 7;
936
939
  if (menu.length == 0) {
937
940
  return _react2.default.createElement(
938
941
  _antd.Col,
@@ -948,14 +951,14 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
948
951
  v.sub.map(function (vv) {
949
952
  var item = vv;
950
953
  if (vv.maybe === true) {
951
- item = _this.showStorePrice ? vv : vv.second;
954
+ item = _this2.showStorePrice ? vv : vv.second;
952
955
  }
953
956
  return _react2.default.createElement(
954
957
  'div',
955
958
  {
956
959
  className: 'member-item ' + item.className + ' ' + (item.disabled ? 'menu-item-disabled' : ''),
957
960
  key: item.className,
958
- onClick: _this.handelClick.bind(_this, item)
961
+ onClick: _this2.handelClick.bind(_this2, item)
959
962
  },
960
963
  !!item.title && _react2.default.createElement(
961
964
  'h1',
@@ -975,7 +978,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
975
978
  {
976
979
  className: 'member-item ' + v.className + ' ' + (v.disabled ? 'menu-item-disabled' : ''),
977
980
  key: v.className,
978
- onClick: _this.handelClick.bind(_this, v)
981
+ onClick: _this2.handelClick.bind(_this2, v)
979
982
  },
980
983
  v.title && _react2.default.createElement(
981
984
  'h1',
@@ -1001,15 +1004,15 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
1001
1004
  );
1002
1005
  };
1003
1006
 
1004
- _this.createCenterNode = function () {
1005
- var menuLeftNode = _this.centerLeftMenu.map(function (v) {
1007
+ _this2.createCenterNode = function () {
1008
+ var menuLeftNode = _this2.centerLeftMenu.map(function (v) {
1006
1009
  return _react2.default.createElement(
1007
1010
  'div',
1008
1011
  {
1009
1012
  className: 'worktop-item ' + v.className + ' ' + (v.disabled ? 'menu-item-disabled' : ''),
1010
1013
  style: v.style,
1011
1014
  key: v.className,
1012
- onClick: _this.handelClick.bind(_this, v)
1015
+ onClick: _this2.handelClick.bind(_this2, v)
1013
1016
  },
1014
1017
  v.title && _react2.default.createElement(
1015
1018
  'h1',
@@ -1025,7 +1028,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
1025
1028
  v.disabled && _react2.default.createElement('div', { className: 'item-disabled-placeholder' })
1026
1029
  );
1027
1030
  });
1028
- var menuRightNode = _this.centerRightMenu.map(function (v) {
1031
+ var menuRightNode = _this2.centerRightMenu.map(function (v) {
1029
1032
  return v.container ? _react2.default.createElement(
1030
1033
  'div',
1031
1034
  { style: v.container.style, className: v.container.className, key: v.container.className },
@@ -1035,7 +1038,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
1035
1038
  {
1036
1039
  className: 'worktop-item ' + vv.className + ' ' + (vv.disabled ? 'menu-item-disabled' : ''),
1037
1040
  key: vv.className,
1038
- onClick: _this.handelClick.bind(_this, vv)
1041
+ onClick: _this2.handelClick.bind(_this2, vv)
1039
1042
  },
1040
1043
  vv.title && _react2.default.createElement(
1041
1044
  'h1',
@@ -1055,7 +1058,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
1055
1058
  {
1056
1059
  className: 'worktop-item ' + v.className + ' ' + (v.disabled ? 'menu-item-disabled' : ''),
1057
1060
  key: v.className,
1058
- onClick: _this.handelClick.bind(_this, v)
1061
+ onClick: _this2.handelClick.bind(_this2, v)
1059
1062
  },
1060
1063
  v.title && _react2.default.createElement(
1061
1064
  'h1',
@@ -1086,9 +1089,9 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
1086
1089
  );
1087
1090
  };
1088
1091
 
1089
- _this.createRightNode = function () {
1090
- var width = _this.leftMenu.length == 0 ? _this.isMobileEnvironment & !_this.isNewRetailBCPosTC ? 9 : 10 : 7;
1091
- var node = _this.rightMenu.map(function (v) {
1092
+ _this2.createRightNode = function () {
1093
+ var width = _this2.leftMenu.length == 0 ? _this2.isMobileEnvironment & !_this2.isNewRetailBCPosTC ? 9 : 10 : 7;
1094
+ var node = _this2.rightMenu.map(function (v) {
1092
1095
  return v.container ? _react2.default.createElement(
1093
1096
  'div',
1094
1097
  { style: v.container.style, className: v.container.className, key: v.container.className },
@@ -1098,7 +1101,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
1098
1101
  {
1099
1102
  className: 'stock-item ' + vv.className + ' ' + (vv.disabled ? 'menu-item-disabled' : ''),
1100
1103
  key: vv.className,
1101
- onClick: _this.handelClick.bind(_this, vv)
1104
+ onClick: _this2.handelClick.bind(_this2, vv)
1102
1105
  },
1103
1106
  vv.title && _react2.default.createElement(
1104
1107
  'h1',
@@ -1119,7 +1122,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
1119
1122
  className: 'stock-item ' + v.className + ' ' + (v.disabled ? 'menu-item-disabled' : ''),
1120
1123
  style: v.style,
1121
1124
  key: v.className,
1122
- onClick: _this.handelClick.bind(_this, v)
1125
+ onClick: _this2.handelClick.bind(_this2, v)
1123
1126
  },
1124
1127
  !!v.title && _react2.default.createElement(
1125
1128
  'h1',
@@ -1140,9 +1143,9 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
1140
1143
  );
1141
1144
  };
1142
1145
 
1143
- _this.createMoreNode = function () {
1144
- var arrs = _this.getMoreNodeInfo();
1145
- var items = _this.isNewRetailBCPosTC ? arrs.sub_tc : arrs.sub_cc || [];
1146
+ _this2.createMoreNode = function () {
1147
+ var arrs = _this2.getMoreNodeInfo();
1148
+ var items = _this2.isNewRetailBCPosTC ? arrs.sub_tc : arrs.sub_cc || [];
1146
1149
  var node = items.length > 0 && items.map(function (v) {
1147
1150
  return _react2.default.createElement(
1148
1151
  'div',
@@ -1150,7 +1153,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
1150
1153
  className: 'modal-quick ' + v.className,
1151
1154
  style: v.style,
1152
1155
  key: v.className,
1153
- onClick: _this.handelClick.bind(_this, v)
1156
+ onClick: _this2.handelClick.bind(_this2, v)
1154
1157
  },
1155
1158
  !!v.icon && _react2.default.createElement(
1156
1159
  'div',
@@ -1167,39 +1170,30 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
1167
1170
  return node;
1168
1171
  };
1169
1172
 
1170
- _this.getMoreNodeInfo = function () {
1171
- if (_this.isNewRetailBCPosTC) {
1172
- // if (this.isMobileEnvironment) {
1173
- // return this.centerRightMenu.find(vv => vv.key == 'more') || {};
1174
- // } else {
1175
- return _this.centerRightMenu.find(function (v) {
1173
+ _this2.getMoreNodeInfo = function () {
1174
+ if (_this2.isNewRetailBCPosTC) {
1175
+ return _this2.centerRightMenu.find(function (v) {
1176
1176
  return v.sub && v.sub.find(function (vv) {
1177
1177
  return vv.key == 'more';
1178
1178
  });
1179
1179
  }).sub[1] || {};
1180
- // }
1181
1180
  } else {
1182
- // if (this.isMobileEnvironment) {
1183
- // return this.centerRightMenu.find(vv => vv.key == 'more') || {};
1184
- // } else {
1185
- return _this.centerRightMenu.find(function (v) {
1181
+ return _this2.centerRightMenu.find(function (v) {
1186
1182
  return v.sub && v.sub.find(function (vv) {
1187
1183
  return vv.key == 'more';
1188
1184
  });
1189
1185
  }).sub[1] || {};
1190
- // }
1191
1186
  }
1192
1187
  };
1193
1188
 
1194
- _this.hasElectron = hasElectron;
1195
- _this.state = {
1189
+ _this2.hasElectron = hasElectron;
1190
+ var hsyPageLoadIsFinish = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('hsyPageLoadIsFinish');
1191
+ _this2.state = {
1196
1192
  id: Date.now(),
1197
1193
  operations: [],
1198
1194
  showModal: false,
1199
1195
  showMoreModal: false,
1200
- loadHsyPage: false,
1201
- loadHsyURL: '',
1202
- isHsyLoadFinish: false,
1196
+ isHsyLoadFinish: !!hsyPageLoadIsFinish,
1203
1197
  loadTcPage: false,
1204
1198
  loadTcURL: '',
1205
1199
  modalURL: ''
@@ -1211,36 +1205,33 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
1211
1205
  isHorizontalSunMi = _ref13.isHorizontalSunMi,
1212
1206
  isNewRetailBCPosTC = _ref13.isNewRetailBCPosTC;
1213
1207
 
1214
- _this.isVerticalTouch = !!isVerticalTouch;
1215
- _this.isHorizontalPad = !!isHorizontalPad;
1216
- _this.isHorizontalSunMi = !!isHorizontalSunMi;
1217
- _this.isMobileEnvironment = !!isHorizontalPad || !!isHorizontalSunMi;
1218
- _this.FuPingIsLoaded = false;
1219
- _this.isNewRetailBCPosTC = !!isNewRetailBCPosTC;
1220
- _this.new_retail_app = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('newRetailAppType');
1221
- _this.hsy_domain = _tplusApi.User && _tplusApi.User.getWebEntry();
1208
+ _this2.isVerticalTouch = !!isVerticalTouch;
1209
+ _this2.isHorizontalPad = !!isHorizontalPad;
1210
+ _this2.isHorizontalSunMi = !!isHorizontalSunMi;
1211
+ _this2.isMobileEnvironment = !!isHorizontalPad || !!isHorizontalSunMi;
1212
+ _this2.FuPingIsLoaded = false;
1213
+ _this2.isNewRetailBCPosTC = !!isNewRetailBCPosTC;
1214
+ _this2.new_retail_app = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('newRetailAppType');
1215
+ _this2.hsy_domain = _tplusApi.User && _tplusApi.User.getWebEntry();
1222
1216
  // 是否嵌套好生意的iframe
1223
- _this.isHsyIframeInclude = !_this.isVerticalTouch && !_this.isMobileEnvironment;
1217
+ _this2.isHsyIframeInclude = !_this2.isVerticalTouch && !_this2.isMobileEnvironment;
1224
1218
  //获取初始化参数
1225
- _this.isEnableMember = !!(0, _tplusPoslogin.PosInitData)('isEnableMember'); //是否开启会员
1226
- _this.isEnablePromotion = !!(0, _tplusPoslogin.PosInitData)('isEnablePromotion'); //是否开启促销
1227
- _this.isOfflineCash = (0, _tplusPoslogin.PosInitData)('IsOfflineCash');
1228
- _this.tplusSiteUrl = (0, _tplusPoslogin.PosInitData)("TplusSite") || (0, _tplusPoslogin.PosInitData)("tplusinnersite");
1229
- _this.idWarehouse = (0, _tplusPoslogin.PosInitData)('IdWarehouse') || '';
1230
- _this.warehouseName = (0, _tplusPoslogin.PosInitData)('WarehouseName') || '';
1231
- _this.performanceDistribution = (0, _tplusPoslogin.PosInitData)('PerformanceDistribution');
1232
- _this.showStorePrice = (0, _tplusPoslogin.PosInitData)('ShowStorePrice');
1219
+ _this2.isEnableMember = !!(0, _tplusPoslogin.PosInitData)('isEnableMember'); //是否开启会员
1220
+ _this2.isEnablePromotion = !!(0, _tplusPoslogin.PosInitData)('isEnablePromotion'); //是否开启促销
1221
+ _this2.isOfflineCash = (0, _tplusPoslogin.PosInitData)('IsOfflineCash');
1222
+ _this2.tplusSiteUrl = (0, _tplusPoslogin.PosInitData)("TplusSite") || (0, _tplusPoslogin.PosInitData)("tplusinnersite");
1223
+ _this2.idWarehouse = (0, _tplusPoslogin.PosInitData)('IdWarehouse') || '';
1224
+ _this2.warehouseName = (0, _tplusPoslogin.PosInitData)('WarehouseName') || '';
1225
+ _this2.performanceDistribution = (0, _tplusPoslogin.PosInitData)('PerformanceDistribution');
1226
+ _this2.showStorePrice = (0, _tplusPoslogin.PosInitData)('ShowStorePrice');
1233
1227
 
1234
1228
  //首页布局
1235
- _this.leftMenu = _this.getMenuByPosition('left');
1236
- _this.centerLeftMenu = _this.getMenuByPosition('centerLeft');
1237
- _this.centerRightMenu = _this.getMenuByPosition('centerRight');
1238
- _this.rightMenu = _this.getMenuByPosition('right');
1239
- _this.randomWord = _this.randomWord.bind(_this);
1240
- (0, _mobx.autorun)(function () {
1241
- _this.hsyBasicInfoInit();
1242
- });
1243
- return _this;
1229
+ _this2.leftMenu = _this2.getMenuByPosition('left');
1230
+ _this2.centerLeftMenu = _this2.getMenuByPosition('centerLeft');
1231
+ _this2.centerRightMenu = _this2.getMenuByPosition('centerRight');
1232
+ _this2.rightMenu = _this2.getMenuByPosition('right');
1233
+ _this2.randomWord = _this2.randomWord.bind(_this2);
1234
+ return _this2;
1244
1235
  }
1245
1236
 
1246
1237
  (0, _createClass3.default)(_default, [{
@@ -1282,37 +1273,46 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
1282
1273
  key: 'getMenuByEnvironment',
1283
1274
  value: function getMenuByEnvironment(ccMenu, tcMenu, tcMobilMenu, ccMobilMenu) {
1284
1275
  if (this.isNewRetailBCPosTC) {
1285
- // if(this.isMobileEnvironment){
1286
- // return tcMobilMenu;
1287
- // }else{
1288
- // return tcMenu;
1289
- // }
1290
1276
  return tcMenu;
1291
1277
  } else {
1292
- // if(this.isMobileEnvironment){
1293
- // return ccMobilMenu;
1294
- // }else{
1295
- // return ccMenu;
1296
- // }
1297
1278
  return ccMenu;
1298
1279
  }
1299
1280
  }
1300
1281
  }, {
1301
1282
  key: 'componentDidMount',
1302
1283
  value: function componentDidMount() {
1284
+ var _this4 = this;
1285
+
1303
1286
  this.initPageData();
1304
- this.isHsyIframeInclude && this.initCCFrameWin();
1287
+ //加载好生意界面
1288
+ var hsyPageLoadIsFinish = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('hsyPageLoadIsFinish');
1289
+ if (hsyPageLoadIsFinish == 'true') {
1290
+ this.loadHsyPage();
1291
+ } else {
1292
+ setTimeout(function () {
1293
+ _this4.loadHsyPage();
1294
+ }, 1000);
1295
+ }
1305
1296
  }
1306
- // 初始化好生意iframe
1297
+
1298
+ // 初始化加载hsy
1307
1299
 
1308
1300
  }, {
1309
- key: 'initCCFrameWin',
1310
- value: function initCCFrameWin() {
1311
- var that = this;
1301
+ key: 'initHsyFrameWin',
1302
+
1303
+
1304
+ // 初始化好生意iframe
1305
+ value: function initHsyFrameWin() {
1306
+ var _this = this;
1312
1307
  this.ccFrameStore = new _mutantsMicrofx.stores.IframeStore(document.getElementById(CC_FRAME_CONF.id), this.hsy_domain, function (e, instance) {
1313
1308
  console.log(e, instance, 'cciframe 接收消息');
1314
1309
  if (e.data && e.data.type === CC_FRAME_CONF.HsyLoadFinish) {
1315
- !that.state.isHsyLoadFinish && that.setState({ isHsyLoadFinish: true });
1310
+ //记录好生意界面是否加载完成
1311
+ var hsyPageLoadIsFinish = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('hsyPageLoadIsFinish');
1312
+ if (!(hsyPageLoadIsFinish == 'true')) {
1313
+ _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.set('hsyPageLoadIsFinish', true);
1314
+ _this.setState({ isHsyLoadFinish: true });
1315
+ }
1316
1316
  }
1317
1317
  }, function (e, instance) {
1318
1318
  console.log("ccFrameWin 加载成功========>", e, instance);
@@ -1322,11 +1322,15 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
1322
1322
  // 初始化商米副屏
1323
1323
 
1324
1324
  }, {
1325
- key: 'hsyBasicInfoInit',
1325
+ key: 'initHsyBasicPageInfo',
1326
1326
 
1327
1327
 
1328
1328
  // 初始化智+模块信息
1329
- value: function hsyBasicInfoInit() {
1329
+ value: function initHsyBasicPageInfo() {
1330
+ console.log('start create iframe-hsyPage');
1331
+ var hsyPageLoadIsFinish = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('hsyPageLoadIsFinish');
1332
+ var _hsyPage = document.getElementById(CC_FRAME_CONF.id);
1333
+ if (hsyPageLoadIsFinish == 'true' && _hsyPage) return;
1330
1334
  var theme = _mutantsMicrofx.stores.portalStore.themeStore;
1331
1335
  var color = '#FF8C25';
1332
1336
  switch (theme) {
@@ -1343,13 +1347,23 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
1343
1347
  color = "#FF6B8C";
1344
1348
  break;
1345
1349
  }
1350
+ var _height = document.body.clientHeight;
1346
1351
 
1347
1352
  var _ref14 = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('StoreKey') || {},
1348
1353
  _ref14$PosId = _ref14.PosId,
1349
1354
  PosId = _ref14$PosId === undefined ? '' : _ref14$PosId;
1350
1355
 
1351
1356
  var cc_url = this.hsy_domain.replace('#/', '') + '?fromApp=nretail&posid=' + PosId + '&content_only=true&bar_bg=' + encodeURIComponent('#FFFFFF') + '&bar_active_bg=' + encodeURIComponent(color);
1352
- this.setState({ loadHsyURL: cc_url });
1357
+ var iframe = document.createElement('iframe');
1358
+ iframe.width = '100%';
1359
+ iframe.height = _height - 60 + 'px';
1360
+ iframe.setAttribute("scrolling", "yes");
1361
+ iframe.setAttribute("frameborder", 0);
1362
+ iframe.style.position = 'absolute';
1363
+ iframe.src = cc_url;
1364
+ iframe.id = CC_FRAME_CONF.id;
1365
+ document.body.appendChild(iframe);
1366
+ console.log('finish create iframe-hsyPage succeed.');
1353
1367
  }
1354
1368
 
1355
1369
  //初始化tc、tcyzj、tczsy信息
@@ -1357,7 +1371,9 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
1357
1371
  }, {
1358
1372
  key: 'componentWillUnmount',
1359
1373
  value: function componentWillUnmount() {
1360
- this.ccFrameStore && this.ccFrameStore.destroy();
1374
+ if (this.isHsyIframeInclude && typeof this.ccFrameStore.destroy == 'function') {
1375
+ this.ccFrameStore.destroy();
1376
+ }
1361
1377
  var _context$headHook = this.context.headHook;
1362
1378
  _context$headHook = _context$headHook === undefined ? {} : _context$headHook;
1363
1379
  var removeClass = _context$headHook.removeClass;
@@ -1399,8 +1415,6 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
1399
1415
  showModal = _state.showModal,
1400
1416
  showMoreModal = _state.showMoreModal,
1401
1417
  modalURL = _state.modalURL,
1402
- loadHsyPage = _state.loadHsyPage,
1403
- loadHsyURL = _state.loadHsyURL,
1404
1418
  loadTcPage = _state.loadTcPage,
1405
1419
  loadTcURL = _state.loadTcURL;
1406
1420
 
@@ -1408,72 +1422,63 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
1408
1422
  var htmlContent = null;
1409
1423
  if (this.isVerticalTouch) {
1410
1424
  htmlContent = _react2.default.createElement(_verticalPortal2.default, { handelClick: this.handelClick });
1411
- }
1412
- // else if (this.isHorizontalPad) {
1413
- // htmlContent = <HorizontalPadPortal handelClick={this.handelClick} />
1414
- // }
1415
- else {
1416
- htmlContent = _react2.default.createElement(
1417
- _tplusComponentsTouch.Layout,
1418
- { style: { height: '100%' }, className: 'portal-content' },
1425
+ } else {
1426
+ htmlContent = _react2.default.createElement(
1427
+ _tplusComponentsTouch.Layout,
1428
+ { style: { height: '100%' }, className: 'portal-content' },
1429
+ _react2.default.createElement(
1430
+ Content,
1431
+ { style: { paddingLeft: '50px', paddingRight: '50px' }, className: 'portal-container portal-container-center' },
1419
1432
  _react2.default.createElement(
1420
- Content,
1421
- { style: { paddingLeft: '50px', paddingRight: '50px' }, className: 'portal-container portal-container-center' },
1433
+ _antd.Row,
1434
+ { className: 'portal-content-row' },
1435
+ this.createLeftNode(),
1422
1436
  _react2.default.createElement(
1423
- _antd.Row,
1424
- { className: 'portal-content-row' },
1425
- this.createLeftNode(),
1437
+ _antd.Col,
1438
+ { xl: 10, md: 10, className: 'portal-center-col', key: 'center' },
1426
1439
  _react2.default.createElement(
1427
- _antd.Col,
1428
- { xl: 10, md: 10, className: 'portal-center-col', key: 'center' },
1429
- _react2.default.createElement(
1430
- 'div',
1431
- { className: 'portal-center-content' },
1432
- this.createCenterNode()
1433
- )
1434
- ),
1435
- this.createRightNode()
1436
- )
1437
- ),
1438
- _react2.default.createElement(
1439
- 'div',
1440
- { className: loadHsyPage ? 'portal-hsy-tc-container' : 'portal-hsy-tc-container portal-hsy-tc-container-hide' },
1441
- _react2.default.createElement('iframe', { src: loadHsyURL, width: '100%', height: '93%', frameborder: 'no', border: '0', marginwidth: '0', marginheight: '0', scrolling: 'yes', allowtransparency: 'true', id: CC_FRAME_CONF.id })
1442
- ),
1443
- _react2.default.createElement(
1444
- 'div',
1445
- { className: loadTcPage ? 'portal-hsy-tc-container' : 'portal-hsy-tc-container portal-hsy-tc-container-hide' },
1446
- _react2.default.createElement('iframe', { src: loadTcURL, width: '100%', height: '93%', frameborder: 'no', border: '0', marginwidth: '0', marginheight: '0', scrolling: 'yes', allowtransparency: 'true', id: 'external-frame-tc' })
1447
- ),
1448
- this.isMobileEnvironment && _react2.default.createElement(
1449
- _antd.Modal,
1450
- {
1451
- visible: showModal,
1452
- onCancel: this.closeFrameModal,
1453
- width: '99%',
1454
- height: '99%',
1455
- footer: null
1456
- },
1457
- _react2.default.createElement('iframe', { src: modalURL, width: '100%', height: screenHeight, frameborder: 'no', border: '0', marginwidth: '0', marginheight: '0', scrolling: 'yes', allowtransparency: 'true' })
1458
- ),
1459
- _react2.default.createElement(
1460
- _antd.Modal,
1461
- {
1462
- title: '更多',
1463
- className: 'portal-container-modal-more',
1464
- visible: showMoreModal,
1465
- onCancel: this.closeMoreModal,
1466
- width: 800,
1467
- height: 375,
1468
- footer: null,
1469
- centered: true,
1470
- maskClosable: false,
1471
- keyboard: false
1472
- },
1473
- this.createMoreNode()
1440
+ 'div',
1441
+ { className: 'portal-center-content' },
1442
+ this.createCenterNode()
1443
+ )
1444
+ ),
1445
+ this.createRightNode()
1474
1446
  )
1475
- );
1476
- }
1447
+ ),
1448
+ _react2.default.createElement(
1449
+ 'div',
1450
+ { className: loadTcPage ? 'portal-hsy-tc-container' : 'portal-hsy-tc-container portal-hsy-tc-container-hide' },
1451
+ _react2.default.createElement('iframe', { src: loadTcURL, width: '100%', height: '93%', frameborder: 'no', border: '0', marginwidth: '0', marginheight: '0', scrolling: 'yes', allowtransparency: 'true', id: 'external-frame-tc' })
1452
+ ),
1453
+ this.isMobileEnvironment && _react2.default.createElement(
1454
+ _antd.Modal,
1455
+ {
1456
+ visible: showModal,
1457
+ onCancel: this.closeFrameModal,
1458
+ width: '99%',
1459
+ height: '99%',
1460
+ footer: null
1461
+ },
1462
+ _react2.default.createElement('iframe', { src: modalURL, width: '100%', height: screenHeight, frameborder: 'no', border: '0', marginwidth: '0', marginheight: '0', scrolling: 'yes', allowtransparency: 'true' })
1463
+ ),
1464
+ _react2.default.createElement(
1465
+ _antd.Modal,
1466
+ {
1467
+ title: '更多',
1468
+ className: 'portal-container-modal-more',
1469
+ visible: showMoreModal,
1470
+ onCancel: this.closeMoreModal,
1471
+ width: 800,
1472
+ height: 375,
1473
+ footer: null,
1474
+ centered: true,
1475
+ maskClosable: false,
1476
+ keyboard: false
1477
+ },
1478
+ this.createMoreNode()
1479
+ )
1480
+ );
1481
+ }
1477
1482
  return htmlContent;
1478
1483
  }
1479
1484
  }]);