tplus-portaltouch 3.44.1 → 3.44.4

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 (69) hide show
  1. package/dist/api/ModifyPassApi.js.map +1 -1
  2. package/dist/components/dutyandsettle/dutysettlebill.js +55 -81
  3. package/dist/components/dutyandsettle/dutysettlebill.js.map +1 -1
  4. package/dist/components/dutyandsettle/dutysettlehistory.js +9 -8
  5. package/dist/components/dutyandsettle/dutysettlehistory.js.map +1 -1
  6. package/dist/components/dutyandsettle/index.js.map +1 -1
  7. package/dist/components/dutyandsettle/tipContent.js.map +1 -1
  8. package/dist/components/header/customUse.js.map +1 -1
  9. package/dist/components/header/headContent.js +16 -12
  10. package/dist/components/header/headContent.js.map +1 -1
  11. package/dist/components/header/index.js +13 -13
  12. package/dist/components/header/index.js.map +1 -1
  13. package/dist/components/header/offlinePointDesc.js.map +1 -1
  14. package/dist/components/header/style.less +457 -456
  15. package/dist/components/header/themeModal.js.map +1 -1
  16. package/dist/components/header/uploadList.js +6 -6
  17. package/dist/components/header/uploadList.js.map +1 -1
  18. package/dist/components/header/vertical-touch.js.map +1 -1
  19. package/dist/components/header/vertical-touch.less +228 -228
  20. package/dist/containers/Main/index.js +7 -4
  21. package/dist/containers/Main/index.js.map +1 -1
  22. package/dist/dutyService/index.js.map +1 -1
  23. package/dist/index.js.map +1 -1
  24. package/dist/middleWare/index.js.map +1 -1
  25. package/dist/modalRouter/StaticRouter.js.map +1 -1
  26. package/dist/modalRouter/index.js +8 -8
  27. package/dist/modalRouter/index.js.map +1 -1
  28. package/dist/pages/Modal/index.js.map +1 -1
  29. package/dist/pages/Modal/style.less +5 -5
  30. package/dist/pages/Portalbc/data.js +5 -5
  31. package/dist/pages/Portalbc/data.js.map +1 -1
  32. package/dist/pages/Portalbc/horizontalPadPortal.js.map +1 -1
  33. package/dist/pages/Portalbc/horizontalSunMiPortal.js.map +1 -1
  34. package/dist/pages/Portalbc/index.js +54 -58
  35. package/dist/pages/Portalbc/index.js.map +1 -1
  36. package/dist/pages/Portalbc/index.less +822 -821
  37. package/dist/pages/Portalbc/onframe.js.map +1 -1
  38. package/dist/pages/Portalbc/verticalPortal.js.map +1 -1
  39. package/dist/pages/dutyandsettle/AuthProcess.js.map +1 -1
  40. package/dist/pages/dutyandsettle/index.js.map +1 -1
  41. package/dist/pages/dutyandsettle/index.less +529 -529
  42. package/dist/pages/dutyandsettle/offDuty.js +7 -7
  43. package/dist/pages/dutyandsettle/offDuty.js.map +1 -1
  44. package/dist/pages/dutyandsettle/onDialy.js.map +1 -1
  45. package/dist/pages/dutyandsettle/onDuty.js.map +1 -1
  46. package/dist/pages/dutyandsettle/onUnDaily.js.map +1 -1
  47. package/dist/pages/dutyandsettle/settleDialy.js.map +1 -1
  48. package/dist/pages/index.js.map +1 -1
  49. package/dist/pages/modifyPass/index.js.map +1 -1
  50. package/dist/pages/modifyPass/style.less +71 -71
  51. package/dist/pages/notFound/index.js.map +1 -1
  52. package/dist/pages/notFound/style.less +17 -17
  53. package/dist/stores/IframeStore.js +140 -0
  54. package/dist/stores/IframeStore.js.map +1 -0
  55. package/dist/stores/ModalRouter.js.map +1 -1
  56. package/dist/stores/ModifyPassStore.js.map +1 -1
  57. package/dist/stores/PortalStore.js +5 -5
  58. package/dist/stores/PortalStore.js.map +1 -1
  59. package/dist/stores/PosLoginStore.js.map +1 -1
  60. package/dist/stores/billHistoryStore.js.map +1 -1
  61. package/dist/stores/dutySettleStore.js.map +1 -1
  62. package/dist/stores/index.js +6 -1
  63. package/dist/stores/index.js.map +1 -1
  64. package/dist/utils/PrintProcess.js +10 -10
  65. package/dist/utils/PrintProcess.js.map +1 -1
  66. package/dist/utils/index.js.map +1 -1
  67. package/dist/utils/networkCheck.js.map +1 -1
  68. package/package.json +1 -1
  69. package/tsconfig.json +14 -14
@@ -49,12 +49,12 @@ var _inherits2 = require('babel-runtime/helpers/inherits');
49
49
 
50
50
  var _inherits3 = _interopRequireDefault(_inherits2);
51
51
 
52
- var _class, _class2, _temp; /*
53
- * @Description:
54
- * @Date: 2019-08-13 08:42:18
55
- * @LastEditTime: 2022-02-25 14:49:22
56
- * @LastEditors: chenlongad
57
- * @modify:修改跳转到T+的查询方案方式
52
+ var _class, _class2, _temp; /*
53
+ * @Description:
54
+ * @Date: 2019-08-13 08:42:18
55
+ * @LastEditTime: 2022-03-22 14:23:09
56
+ * @LastEditors: chenlongad
57
+ * @modify:修改跳转到T+的查询方案方式
58
58
  */
59
59
 
60
60
 
@@ -112,6 +112,7 @@ var Content = _tplusComponentsTouch.Layout.Content,
112
112
 
113
113
  var tplusWindow = null;
114
114
  var HTTP_PROXY_URL = 'http://tfproxy.chanjet.com/?url=';
115
+ var CC_FRAME_CONF = { id: 'external-frame-cc', identOnly: '_pos_web_', initConnect: 'initConnect', HsyLoadFinish: 'HsyLoadFinish', HsyRouterClean: 'HsyRouterClean', HsyRouterJump: 'HsyRouterJump' };
115
116
 
116
117
  var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_Component) {
117
118
  (0, _inherits3.default)(_default, _Component);
@@ -220,44 +221,45 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
220
221
  _this$context = _this.context, _this$context$stores = _this$context.stores, stores = _this$context$stores === undefined ? {} : _this$context$stores, _this$context$headHoo = _this$context.headHook;
221
222
  _this$context$headHoo = _this$context$headHoo === undefined ? {} : _this$context$headHoo;
222
223
  addClass = _this$context$headHoo.addClass;
223
- hasUseOffline = (0, _tplusPoslogin.PosInitData)('IsOfflineCash') === "1" && !(_this.isVerticalTouch || _this.isMobileEnvironment); //是否允许离线
224
+ hasUseOffline = (0, _tplusPoslogin.PosInitData)('IsOfflineCash') === "1" && !_mutantsUtil.platform.otherOfflineStatus;
225
+ ; //是否允许离线
224
226
  // const hasUseOffline = true;
225
227
 
226
228
  if (!(hasUseOffline == true)) {
227
- _context2.next = 7;
229
+ _context2.next = 8;
228
230
  break;
229
231
  }
230
232
 
231
- _context2.next = 7;
233
+ _context2.next = 8;
232
234
  return _this.catchOfflineData();
233
235
 
234
- case 7:
236
+ case 8:
235
237
  _tplusComponentsTouch.Loading.show({
236
238
  text: '权限加载中,请稍等...',
237
239
  delay: 2500
238
240
  });
239
241
  //权限加载
240
- _context2.prev = 8;
241
- _context2.next = 11;
242
+ _context2.prev = 9;
243
+ _context2.next = 12;
242
244
  return _this.getOperation();
243
245
 
244
- case 11:
245
- _context2.next = 16;
246
+ case 12:
247
+ _context2.next = 17;
246
248
  break;
247
249
 
248
- case 13:
249
- _context2.prev = 13;
250
- _context2.t0 = _context2['catch'](8);
250
+ case 14:
251
+ _context2.prev = 14;
252
+ _context2.t0 = _context2['catch'](9);
251
253
 
252
254
  _tplusComponentsTouch.Loading.hide();
253
255
 
254
- case 16:
255
- _context2.prev = 16;
256
+ case 17:
257
+ _context2.prev = 17;
256
258
 
257
259
  _tplusComponentsTouch.Loading.hide();
258
- return _context2.finish(16);
260
+ return _context2.finish(17);
259
261
 
260
- case 19:
262
+ case 20:
261
263
  addClass && addClass(_this.state.id, 'portalHead');
262
264
  // 初始化参数设置。
263
265
  stores.setStore.initSetParams().then(function (ret) {
@@ -276,27 +278,14 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
276
278
  });
277
279
  _this.hsyBasicInfoInit();
278
280
 
279
- case 22:
281
+ case 23:
280
282
  case 'end':
281
283
  return _context2.stop();
282
284
  }
283
285
  }
284
- }, _callee2, _this2, [[8, 13, 16, 19]]);
286
+ }, _callee2, _this2, [[9, 14, 17, 20]]);
285
287
  }));
286
288
 
287
- _this.initHsyPage = function () {
288
- var external_frame = document.getElementById('external-frame-cc');
289
- var win = external_frame && external_frame.contentWindow;
290
- var timer = setTimeout(function () {
291
- _this.setState({ isHsyLoadFinish: true });
292
- }, 15000);
293
- if (!win) return;
294
- win.HsyLoadFinish = function () {
295
- clearTimeout(timer);
296
- _this.setState({ isHsyLoadFinish: true });
297
- };
298
- };
299
-
300
289
  _this.sunMiPresentationInit = function (result) {
301
290
  //SunMi初始化参数设置。
302
291
  //副屏幕交互。硬件改动20200428 需要在商米页面加载成功后才能发送 初始化命令
@@ -653,7 +642,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
653
642
 
654
643
  _this.toHsyPage = function () {
655
644
  var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(params) {
656
- 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, external_frame, win;
645
+ 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;
657
646
 
658
647
  return _regenerator2.default.wrap(function _callee4$(_context4) {
659
648
  while (1) {
@@ -791,14 +780,12 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
791
780
 
792
781
  console.log('CC_WEB_URL:', CC_WEB_URL);
793
782
  window.android_CommonFun.openWebUrlByOutBrowser(CC_WEB_URL);
794
- _context4.next = 42;
783
+ _context4.next = 40;
795
784
  break;
796
785
 
797
786
  case 37:
798
- external_frame = document.getElementById('external-frame-cc');
799
- win = external_frame.contentWindow;
800
-
801
- win && win.HsyRouterJump && win.HsyRouterJump(pageId, pageParams, { closeable: closeable, tabLabel: tabLabel });
787
+ // this.ccFrameWin && this.ccFrameWin.HsyRouterJump && this.ccFrameWin.HsyRouterJump(pageId, pageParams, { closeable, tabLabel });
788
+ _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 });
802
789
  if (_this.state.showMoreModal === true) {
803
790
  _this.setState({ loadHsyPage: true, showMoreModal: false });
804
791
  } else {
@@ -808,14 +795,13 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
808
795
  back: true, fn: function fn() {
809
796
  _this.setState({ loadHsyPage: false });
810
797
  rx$.changeHsy.next({ back: false });
811
- // 在打开页签之前,关闭之前的。
812
- var external_frame_a = document.getElementById('external-frame-cc');
813
- var wins = external_frame_a.contentWindow;
814
- wins && wins.HsyRouterClean && win.HsyRouterClean();
798
+ // 在打开页签之前,关闭之前的,返回键的回调函数
799
+ // this.ccFrameWin && this.ccFrameWin.HsyRouterClean && this.ccFrameWin.HsyRouterClean();
800
+ _this.ccFrameStore && _this.ccFrameStore.sendMessage({ type: CC_FRAME_CONF.HsyRouterClean, _ident_only_: CC_FRAME_CONF.identOnly });
815
801
  }
816
802
  });
817
803
 
818
- case 42:
804
+ case 40:
819
805
  case 'end':
820
806
  return _context4.stop();
821
807
  }
@@ -1214,7 +1200,6 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
1214
1200
  isVerticalTouch = _ref13.isVerticalTouch,
1215
1201
  isHorizontalPad = _ref13.isHorizontalPad,
1216
1202
  isHorizontalSunMi = _ref13.isHorizontalSunMi,
1217
- isNewRetailBCPos = _ref13.isNewRetailBCPos,
1218
1203
  isNewRetailBCPosTC = _ref13.isNewRetailBCPosTC;
1219
1204
 
1220
1205
  _this.isVerticalTouch = !!isVerticalTouch;
@@ -1222,16 +1207,16 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
1222
1207
  _this.isHorizontalSunMi = !!isHorizontalSunMi;
1223
1208
  _this.isMobileEnvironment = !!isHorizontalPad || !!isHorizontalSunMi;
1224
1209
  _this.FuPingIsLoaded = false;
1225
- _this.isNewRetailBCPos = !!isNewRetailBCPos;
1226
1210
  _this.isNewRetailBCPosTC = !!isNewRetailBCPosTC;
1227
1211
  _this.new_retail_app = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('newRetailAppType');
1228
-
1212
+ _this.hsy_domain = _tplusApi.User && _tplusApi.User.getWebEntry();
1213
+ // 是否嵌套好生意的iframe
1214
+ _this.isHsyIframeInclude = !_this.isVerticalTouch && !_this.isMobileEnvironment;
1229
1215
  //首页布局
1230
1216
  _this.leftMenu = _this.getMenuByPosition('left');
1231
1217
  _this.centerLeftMenu = _this.getMenuByPosition('centerLeft');
1232
1218
  _this.centerRightMenu = _this.getMenuByPosition('centerRight');
1233
1219
  _this.rightMenu = _this.getMenuByPosition('right');
1234
- _this.hsy_domain = _tplusApi.User && _tplusApi.User.getWebEntry();
1235
1220
  _this.randomWord = _this.randomWord.bind(_this);
1236
1221
  (0, _mobx.autorun)(function () {
1237
1222
  _this.hsyBasicInfoInit();
@@ -1297,14 +1282,24 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
1297
1282
  key: 'componentDidMount',
1298
1283
  value: function componentDidMount() {
1299
1284
  this.initPageData();
1300
- if (this.isNewRetailBCPos && !this.isVerticalTouch && !this.isMobileEnvironment) {
1301
- this.initHsyPage();
1302
- }
1285
+ this.isHsyIframeInclude && this.initCCFrameWin();
1303
1286
  }
1287
+ // 初始化好生意iframe
1304
1288
 
1305
- // 初始化好生意页面
1306
-
1307
-
1289
+ }, {
1290
+ key: 'initCCFrameWin',
1291
+ value: function initCCFrameWin() {
1292
+ var that = this;
1293
+ this.ccFrameStore = new _mutantsMicrofx.stores.IframeStore(document.getElementById(CC_FRAME_CONF.id), this.hsy_domain, function (e, instance) {
1294
+ console.log(e, instance, 'cciframe 接收消息');
1295
+ if (e.data && e.data.type === CC_FRAME_CONF.HsyLoadFinish) {
1296
+ !that.state.isHsyLoadFinish && that.setState({ isHsyLoadFinish: true });
1297
+ }
1298
+ }, function (e, instance) {
1299
+ console.log("ccFrameWin 加载成功========>", e, instance);
1300
+ instance.sendMessage({ type: CC_FRAME_CONF.initConnect, _ident_only_: CC_FRAME_CONF.identOnly });
1301
+ }, CC_FRAME_CONF.identOnly);
1302
+ }
1308
1303
  // 初始化商米副屏
1309
1304
 
1310
1305
  }, {
@@ -1343,6 +1338,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
1343
1338
  }, {
1344
1339
  key: 'componentWillUnmount',
1345
1340
  value: function componentWillUnmount() {
1341
+ this.ccFrameStore && this.ccFrameStore.destroy();
1346
1342
  var _context$headHook = this.context.headHook;
1347
1343
  _context$headHook = _context$headHook === undefined ? {} : _context$headHook;
1348
1344
  var removeClass = _context$headHook.removeClass;
@@ -1423,7 +1419,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
1423
1419
  _react2.default.createElement(
1424
1420
  'div',
1425
1421
  { className: loadHsyPage ? 'portal-hsy-tc-container' : 'portal-hsy-tc-container portal-hsy-tc-container-hide' },
1426
- _react2.default.createElement('iframe', { src: loadHsyURL, width: '100%', height: '93%', frameborder: 'no', border: '0', marginwidth: '0', marginheight: '0', scrolling: 'yes', allowtransparency: 'true', id: 'external-frame-cc' })
1422
+ _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 })
1427
1423
  ),
1428
1424
  _react2.default.createElement(
1429
1425
  'div',