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

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/PreviewVideo.js CHANGED
@@ -54,7 +54,7 @@ const PreviewVideo = ({
54
54
  } = await globalApi.getResUrlAction({
55
55
  fileId: fileArr[0].id,
56
56
  apiBaseName: apiBaseName,
57
- ...extraApiParams
57
+ extraApiParams
58
58
  });
59
59
  obj.resourceUrl = url ? url.length > 0 ? url[0].url : fileArr[0].fileUrl : fileArr[0].fileUrl;
60
60
  } catch (err) {
@@ -65,7 +65,7 @@ const PreviewVideo = ({
65
65
  await courseLibraryApi.getResources({
66
66
  fileId: fileArr[0].id,
67
67
  apiBaseName: apiBaseName,
68
- ...extraApiParams
68
+ extraApiParams
69
69
  }).then(res => {
70
70
  if (res.success) {
71
71
  obj.testExamJson = JSON.stringify(res.data);
package/VideoPlayer.js CHANGED
@@ -21,7 +21,7 @@ const VideoPlayer = props => {
21
21
  fileId: id,
22
22
  courseId: courseInfo?.id,
23
23
  apiBaseName: apiBaseName,
24
- ...extraApiParams
24
+ extraApiParams
25
25
  }).then(res => {
26
26
  if (res.data) {
27
27
  setNewSrc(res.data?.map((item, index) => {
@@ -50,7 +50,7 @@ const VideoPlayer = props => {
50
50
  fileId: id,
51
51
  courseId: courseInfo?.id,
52
52
  apiBaseName: apiBaseName,
53
- ...extraApiParams
53
+ extraApiParams
54
54
  }).then(res => {
55
55
  if (res.data?.length) {
56
56
  setTracks(res.data.map((item, index) => {
@@ -7,9 +7,9 @@ import { getApiBaseName } from './utils';
7
7
  * @returns {Promise}
8
8
  */
9
9
  export const getResources = params => {
10
- const { apiBaseName, fileId, ...rest } = params;
10
+ const { apiBaseName, fileId, extraApiParams } = params;
11
11
  return request.get(`/${getApiBaseName(apiBaseName)}/course/getResExam/${fileId}`, {
12
- params: rest
12
+ params: extraApiParams
13
13
  });
14
14
  };
15
15
 
package/api/global.js CHANGED
@@ -7,9 +7,9 @@ import { getApiBaseName } from './utils';
7
7
  * @returns {Promise}
8
8
  */
9
9
  export const getResUrlAction = params => {
10
- const { apiBaseName, fileId, ...rest } = params;
10
+ const { apiBaseName, fileId, extraApiParams } = params;
11
11
  return request.get(`/${getApiBaseName(apiBaseName)}/course/getVideoUrlByFileId/${fileId}`, {
12
- params: rest
12
+ params: extraApiParams
13
13
  });
14
14
  };
15
15
 
@@ -19,11 +19,11 @@ export const getResUrlAction = params => {
19
19
  * @returns {Promise}
20
20
  */
21
21
  export const getVideoCaption = params => {
22
- const { apiBaseName, fileId, ...rest } = params;
22
+ const { apiBaseName, fileId, extraApiParams } = params;
23
23
  return request.get(
24
24
  `/${getApiBaseName(apiBaseName)}/course/getCaptionListByFileId/${fileId}`,
25
25
  {
26
- params: rest
26
+ params: extraApiParams
27
27
  }
28
28
  );
29
29
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cqsjjb/course-res-design",
3
- "version": "0.1.0-beta.7",
3
+ "version": "0.1.0-beta.8",
4
4
  "description": "课程资源设计组件库",
5
5
  "main": "index.js",
6
6
  "author": "jiaoxiwei",