hzerojs-plugin-yqcloud-jssdk 1.0.1 → 1.0.3

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 (2) hide show
  1. package/lib/index.js +3 -4
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -42,8 +42,7 @@ var import_index = require("./index.css");
42
42
  var YQ_API_HOST = "https://api.test.yqcloud.com";
43
43
  var src_default = (props) => {
44
44
  var _a, _b;
45
- const { token, entryDetail, apiHost = YQ_API_HOST, tokenPath = "/iam/yqc/open_apps/quick/" } = props;
46
- debugger;
45
+ const { token, entryDetail, apiHost = YQ_API_HOST, tokenPath = "/iam/v1/zknow/encrypt/quick" } = props;
47
46
  const eleRef = import_react.default.useRef(null);
48
47
  const [appConfig, setAppConfig] = import_react.default.useState(false);
49
48
  const [isVisible, setIsVisble] = import_react.default.useState(false);
@@ -73,7 +72,7 @@ var src_default = (props) => {
73
72
  }
74
73
  }, [isVisible]);
75
74
  (0, import_react.useEffect)(() => {
76
- const url = `${apiHost}${tokenPath}${token}`;
75
+ const url = `${apiHost}/iam/yqc/open_apps/quick/${token}`;
77
76
  (0, import_axios.default)(url).then(function(jsonData) {
78
77
  try {
79
78
  if (jsonData && jsonData.failed) {
@@ -89,7 +88,7 @@ var src_default = (props) => {
89
88
  });
90
89
  }, [isVisible]);
91
90
  const openModal = async (openFunction) => {
92
- const secret = await import_axios.default.get("/iam/v1/zknow/encrypt/quick");
91
+ const secret = await import_axios.default.get(tokenPath || "/iam/v1/zknow/encrypt/quick");
93
92
  const authUrl = `${apiHost}/oauth/public/quick_authentication?token=${token}`;
94
93
  const res2 = await import_axios.default.post(authUrl, {
95
94
  secret
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hzerojs-plugin-yqcloud-jssdk",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "main": "lib/index.js",
5
5
  "license": "MIT",
6
6
  "scripts": {