ydb-components-material 0.1.67 → 0.1.68

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.
package/es/api.js CHANGED
@@ -139,6 +139,9 @@ export var previewApi = function previewApi(params, config) {
139
139
  export var getMaterialLib = function getMaterialLib(params, config) {
140
140
  return post("https://zwfwpt.sxzwfw.gov.cn/DeclarationAPI/declaration/material/queryFileByCardNo", params, config);
141
141
  };
142
+ export var getMaterialPreview = function getMaterialPreview(params, config) {
143
+ return get(window.baseUrl + "/declaration/material/onlinePreview", params, config);
144
+ };
142
145
  export var getSignFileApi = function getSignFileApi(params, config) {
143
146
  return post(window.baseUrl + "/declaration/center/sign/api/getSignFileList", params, config);
144
147
  };
@@ -267,9 +267,7 @@ var FileItem = function FileItem(_ref) {
267
267
  pageNum: 1,
268
268
  pageSize: 10
269
269
  };
270
- getMaterialLib(params, {
271
- token: token
272
- }).then(function (res) {
270
+ getMaterialLib(params).then(function (res) {
273
271
  if (res.code === 200) {
274
272
  var records = res.data.records;
275
273
  setMaterialLib(records);
@@ -299,8 +297,6 @@ var FileItem = function FileItem(_ref) {
299
297
  return getGuideImg({
300
298
  id: guideImg,
301
299
  effectiveTime: 3600000
302
- }, {
303
- tokenTY: tokenTY
304
300
  });
305
301
  case 2:
306
302
  guideImgRes = _context.sent;
@@ -356,11 +352,11 @@ var FileItem = function FileItem(_ref) {
356
352
  });
357
353
  };
358
354
  useEffect(function () {
359
- if (userInfo && isShowLib) {
355
+ if (userInfo && isShowLib && tokenTY) {
360
356
  console.log('userInfo', userInfo);
361
357
  queryFileLibs();
362
358
  }
363
- }, [userInfo, isShowLib]);
359
+ }, [userInfo, isShowLib, tokenTY]);
364
360
  useEffect(function () {
365
361
  window.env = env;
366
362
  window.baseUrl = baseUrl;
@@ -368,7 +364,7 @@ var FileItem = function FileItem(_ref) {
368
364
  window.tokenTY = tokenTY;
369
365
  window.isPC = isPC;
370
366
  window.accessToken = accessToken;
371
- }, [env, baseUrl]);
367
+ }, [env, baseUrl, token, tokenTY, isPC, accessToken]);
372
368
  return /*#__PURE__*/React.createElement("div", {
373
369
  className: "file_item"
374
370
  }, /*#__PURE__*/React.createElement("div", {
package/lib/api.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
4
  exports.__esModule = true;
5
- exports.signurl = exports.signFileDownApi = exports.qrySealApi = exports.previewApi = exports.post = exports.getSignOrderIdApi = exports.getSignFileApi = exports.getSealUrlApi = exports.getPcSealUrlApi = exports.getMaterialLib = exports.getIcons = exports.getGuideImg = exports.get = exports.fileUploadApi = exports.documentDownload = exports.createbycategory = exports.contractSignUrl = exports.contractFinish = exports.checkSignState = void 0;
5
+ exports.signurl = exports.signFileDownApi = exports.qrySealApi = exports.previewApi = exports.post = exports.getSignOrderIdApi = exports.getSignFileApi = exports.getSealUrlApi = exports.getPcSealUrlApi = exports.getMaterialPreview = exports.getMaterialLib = exports.getIcons = exports.getGuideImg = exports.get = exports.fileUploadApi = exports.documentDownload = exports.createbycategory = exports.contractSignUrl = exports.contractFinish = exports.checkSignState = void 0;
6
6
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
7
7
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
8
8
  var post = exports.post = /*#__PURE__*/function () {
@@ -144,6 +144,9 @@ var previewApi = exports.previewApi = function previewApi(params, config) {
144
144
  var getMaterialLib = exports.getMaterialLib = function getMaterialLib(params, config) {
145
145
  return post("https://zwfwpt.sxzwfw.gov.cn/DeclarationAPI/declaration/material/queryFileByCardNo", params, config);
146
146
  };
147
+ var getMaterialPreview = exports.getMaterialPreview = function getMaterialPreview(params, config) {
148
+ return get(window.baseUrl + "/declaration/material/onlinePreview", params, config);
149
+ };
147
150
  var getSignFileApi = exports.getSignFileApi = function getSignFileApi(params, config) {
148
151
  return post(window.baseUrl + "/declaration/center/sign/api/getSignFileList", params, config);
149
152
  };
@@ -273,9 +273,7 @@ var FileItem = function FileItem(_ref) {
273
273
  pageNum: 1,
274
274
  pageSize: 10
275
275
  };
276
- (0, _api.getMaterialLib)(params, {
277
- token: token
278
- }).then(function (res) {
276
+ (0, _api.getMaterialLib)(params).then(function (res) {
279
277
  if (res.code === 200) {
280
278
  var records = res.data.records;
281
279
  setMaterialLib(records);
@@ -305,8 +303,6 @@ var FileItem = function FileItem(_ref) {
305
303
  return (0, _api.getGuideImg)({
306
304
  id: guideImg,
307
305
  effectiveTime: 3600000
308
- }, {
309
- tokenTY: tokenTY
310
306
  });
311
307
  case 2:
312
308
  guideImgRes = _context.sent;
@@ -362,11 +358,11 @@ var FileItem = function FileItem(_ref) {
362
358
  });
363
359
  };
364
360
  (0, _react.useEffect)(function () {
365
- if (userInfo && isShowLib) {
361
+ if (userInfo && isShowLib && tokenTY) {
366
362
  console.log('userInfo', userInfo);
367
363
  queryFileLibs();
368
364
  }
369
- }, [userInfo, isShowLib]);
365
+ }, [userInfo, isShowLib, tokenTY]);
370
366
  (0, _react.useEffect)(function () {
371
367
  window.env = env;
372
368
  window.baseUrl = baseUrl;
@@ -374,7 +370,7 @@ var FileItem = function FileItem(_ref) {
374
370
  window.tokenTY = tokenTY;
375
371
  window.isPC = isPC;
376
372
  window.accessToken = accessToken;
377
- }, [env, baseUrl]);
373
+ }, [env, baseUrl, token, tokenTY, isPC, accessToken]);
378
374
  return /*#__PURE__*/_react["default"].createElement("div", {
379
375
  className: "file_item"
380
376
  }, /*#__PURE__*/_react["default"].createElement("div", {
@@ -89,7 +89,7 @@ function fillRealVersion(meta, packageName, version, basicLibraryVersion) {
89
89
  packageName = 'ydb-components-material';
90
90
  }
91
91
  if (version === void 0) {
92
- version = '0.1.67';
92
+ version = '0.1.68';
93
93
  }
94
94
  if (basicLibraryVersion === void 0) {
95
95
  basicLibraryVersion = {
@@ -94,7 +94,7 @@ function fillRealVersion(meta, packageName, version, basicLibraryVersion) {
94
94
  packageName = 'ydb-components-material';
95
95
  }
96
96
  if (version === void 0) {
97
- version = '0.1.67';
97
+ version = '0.1.68';
98
98
  }
99
99
  if (basicLibraryVersion === void 0) {
100
100
  basicLibraryVersion = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ydb-components-material",
3
- "version": "0.1.67",
3
+ "version": "0.1.68",
4
4
  "description": "ydb-components-material",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -97,10 +97,10 @@
97
97
  },
98
98
  "componentConfig": {
99
99
  "isComponentLibrary": true,
100
- "materialSchema": "https://unpkg.com/ydb-components-material@0.1.67/build/lowcode/assets-prod.json"
100
+ "materialSchema": "https://unpkg.com/ydb-components-material@0.1.68/build/lowcode/assets-prod.json"
101
101
  },
102
102
  "lcMeta": {
103
103
  "type": "component"
104
104
  },
105
- "homepage": "https://unpkg.com/ydb-components-material@0.1.67/build/index.html"
105
+ "homepage": "https://unpkg.com/ydb-components-material@0.1.68/build/index.html"
106
106
  }