@cqsjjb/course-res-design 0.1.0-beta.8 → 0.1.0-beta.9

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/api/utils.js CHANGED
@@ -8,7 +8,7 @@ export const getApiBaseName = (baseName) => {
8
8
  }
9
9
  try {
10
10
  const location = inIframe() ? window.parent.location : window.location;
11
- return location.pathname.match(/^\/(\w+)\/[C|c]ontainer/)[1];
11
+ return location.pathname.match(/^\/(\.+)\/[C|c]ontainer/)[1];
12
12
  } catch (error) {
13
13
  return 'res';
14
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cqsjjb/course-res-design",
3
- "version": "0.1.0-beta.8",
3
+ "version": "0.1.0-beta.9",
4
4
  "description": "课程资源设计组件库",
5
5
  "main": "index.js",
6
6
  "author": "jiaoxiwei",
package/utils/index.js CHANGED
@@ -4,6 +4,6 @@
4
4
  */
5
5
  export function getApiHost() {
6
6
  return process.env.NODE_ENV === 'development' ?
7
- process.env?.app?.API_HOST || 'https://yjap.cqzxaq.com'
8
- : window.location.origin;
7
+ window.process.env?.app?.API_HOST || 'https://yjap.cqzxaq.com'
8
+ : window.process.env?.app?.API_HOST || window.location.origin;
9
9
  }