ydb-components-material 0.1.156 → 0.1.157

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.
@@ -497,7 +497,7 @@ var FileItem = function FileItem(_ref) {
497
497
  });
498
498
  case 2:
499
499
  sealList = _context4.sent;
500
- if (!(userInfo.corpType === 'C04')) {
500
+ if (!(userInfo.certificateSno && userInfo.certificateSno.substring(0, 2) === '92')) {
501
501
  _context4.next = 3;
502
502
  break;
503
503
  }
@@ -183,7 +183,22 @@ function SealPage(props) {
183
183
  timerRef.current = null;
184
184
  };
185
185
  useEffect(function () {
186
- if (orderId) {
186
+ // PC端签批 获取签章结果 (文件地址)
187
+ window.addEventListener('message', function (e) {
188
+ console.log('e-------', e);
189
+ if (e.data.type === 'signal' && e.data.data && e.data.data.length) {
190
+ setHideClose(true);
191
+ console.log('pc端签章结果', e.data.data[0]); // 文件路径
192
+ signFileDown(e.data.data[0]);
193
+ }
194
+ });
195
+ return function () {
196
+ window.removeEventListener('message', function (e) {});
197
+ };
198
+ }, []);
199
+ useEffect(function () {
200
+ // 移动端轮询签章结果
201
+ if (orderId && !isPC) {
187
202
  handleClearInterval();
188
203
  timerRef.current = setInterval(function () {
189
204
  getSignFileFun();
@@ -192,7 +207,7 @@ function SealPage(props) {
192
207
  return function () {
193
208
  handleClearInterval();
194
209
  };
195
- }, [orderId]);
210
+ }, [orderId, isPC]);
196
211
  var handleTouchMove = function handleTouchMove(e) {
197
212
  e.preventDefault(); // 只有在 passive: false 时才能调用
198
213
  console.log('Touch move');
@@ -503,7 +503,7 @@ var FileItem = function FileItem(_ref) {
503
503
  });
504
504
  case 2:
505
505
  sealList = _context4.sent;
506
- if (!(userInfo.corpType === 'C04')) {
506
+ if (!(userInfo.certificateSno && userInfo.certificateSno.substring(0, 2) === '92')) {
507
507
  _context4.next = 3;
508
508
  break;
509
509
  }
@@ -189,7 +189,22 @@ function SealPage(props) {
189
189
  timerRef.current = null;
190
190
  };
191
191
  (0, _react.useEffect)(function () {
192
- if (orderId) {
192
+ // PC端签批 获取签章结果 (文件地址)
193
+ window.addEventListener('message', function (e) {
194
+ console.log('e-------', e);
195
+ if (e.data.type === 'signal' && e.data.data && e.data.data.length) {
196
+ setHideClose(true);
197
+ console.log('pc端签章结果', e.data.data[0]); // 文件路径
198
+ signFileDown(e.data.data[0]);
199
+ }
200
+ });
201
+ return function () {
202
+ window.removeEventListener('message', function (e) {});
203
+ };
204
+ }, []);
205
+ (0, _react.useEffect)(function () {
206
+ // 移动端轮询签章结果
207
+ if (orderId && !isPC) {
193
208
  handleClearInterval();
194
209
  timerRef.current = setInterval(function () {
195
210
  getSignFileFun();
@@ -198,7 +213,7 @@ function SealPage(props) {
198
213
  return function () {
199
214
  handleClearInterval();
200
215
  };
201
- }, [orderId]);
216
+ }, [orderId, isPC]);
202
217
  var handleTouchMove = function handleTouchMove(e) {
203
218
  e.preventDefault(); // 只有在 passive: false 时才能调用
204
219
  console.log('Touch move');
@@ -98,7 +98,7 @@ function fillRealVersion(meta, packageName, version, basicLibraryVersion) {
98
98
  packageName = 'ydb-components-material';
99
99
  }
100
100
  if (version === void 0) {
101
- version = '0.1.156';
101
+ version = '0.1.157';
102
102
  }
103
103
  if (basicLibraryVersion === void 0) {
104
104
  basicLibraryVersion = {
@@ -103,7 +103,7 @@ function fillRealVersion(meta, packageName, version, basicLibraryVersion) {
103
103
  packageName = 'ydb-components-material';
104
104
  }
105
105
  if (version === void 0) {
106
- version = '0.1.156';
106
+ version = '0.1.157';
107
107
  }
108
108
  if (basicLibraryVersion === void 0) {
109
109
  basicLibraryVersion = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ydb-components-material",
3
- "version": "0.1.156",
3
+ "version": "0.1.157",
4
4
  "description": "ydb-components-material",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -102,10 +102,10 @@
102
102
  },
103
103
  "componentConfig": {
104
104
  "isComponentLibrary": true,
105
- "materialSchema": "https://unpkg.com/ydb-components-material@0.1.156/build/lowcode/assets-prod.json"
105
+ "materialSchema": "https://unpkg.com/ydb-components-material@0.1.157/build/lowcode/assets-prod.json"
106
106
  },
107
107
  "lcMeta": {
108
108
  "type": "component"
109
109
  },
110
- "homepage": "https://unpkg.com/ydb-components-material@0.1.156/build/index.html"
110
+ "homepage": "https://unpkg.com/ydb-components-material@0.1.157/build/index.html"
111
111
  }