@x-edu/service 0.0.9 → 0.0.10

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.
@@ -18,6 +18,7 @@ declare const config: {
18
18
  train: string;
19
19
  't-course': string;
20
20
  eLabour: string;
21
+ library: string;
21
22
  };
22
23
  defaultAreaSite: string;
23
24
  'elearning-library': string;
@@ -32,6 +33,7 @@ declare const config: {
32
33
  'x-study-record': string;
33
34
  cdn: string;
34
35
  'cdn-hot-proxy': string;
36
+ 'cdn-bdcs-file': string;
35
37
  'site-config': string;
36
38
  serviceName: {
37
39
  site: string;
@@ -39,6 +41,7 @@ declare const config: {
39
41
  train: string;
40
42
  't-course': string;
41
43
  eLabour: string;
44
+ library: string;
42
45
  };
43
46
  defaultAreaSite: string;
44
47
  'elearning-library': string;
package/dist/index.d.ts CHANGED
@@ -35,6 +35,7 @@ export declare const serviceConfig: {
35
35
  train: string;
36
36
  't-course': string;
37
37
  eLabour: string;
38
+ library: string;
38
39
  };
39
40
  defaultAreaSite: string;
40
41
  'elearning-library': string;
@@ -49,6 +50,7 @@ export declare const serviceConfig: {
49
50
  'x-study-record': string;
50
51
  cdn: string;
51
52
  'cdn-hot-proxy': string;
53
+ 'cdn-bdcs-file': string;
52
54
  'site-config': string;
53
55
  serviceName: {
54
56
  site: string;
@@ -56,6 +58,7 @@ export declare const serviceConfig: {
56
58
  train: string;
57
59
  't-course': string;
58
60
  eLabour: string;
61
+ library: string;
59
62
  };
60
63
  defaultAreaSite: string;
61
64
  'elearning-library': string;
@@ -91,5 +91,21 @@ declare class Ndr {
91
91
  id: any;
92
92
  serviceName: any;
93
93
  }) => Promise<any>;
94
+ fetchTchMaterialDetail: ({ id, serviceName }: {
95
+ id: any;
96
+ serviceName: any;
97
+ }) => Promise<any>;
98
+ fetchTchMaterialAudio: ({ id, serviceName }: {
99
+ id: any;
100
+ serviceName: any;
101
+ }) => Promise<any>;
102
+ fetchLabourDetailNDR: ({ id, serviceName }: {
103
+ id: any;
104
+ serviceName: any;
105
+ }) => Promise<any>;
106
+ fetchResourceDetailNDR: ({ id, serviceName }: {
107
+ id: any;
108
+ serviceName: any;
109
+ }) => Promise<any>;
94
110
  }
95
111
  export default Ndr;
package/dist/service.js CHANGED
@@ -17635,7 +17635,8 @@ const config = {
17635
17635
  zxxRegion: "zxx_region",
17636
17636
  train: "teach",
17637
17637
  "t-course": "teach",
17638
- eLabour: "ldjy"
17638
+ eLabour: "ldjy",
17639
+ library: "zxx"
17639
17640
  },
17640
17641
  defaultAreaSite: "hn",
17641
17642
  // 内容库
@@ -17655,6 +17656,7 @@ const config = {
17655
17656
  "x-study-record": "//x-study-record-api.beta.101.com",
17656
17657
  cdn: "//ndcs-pre.101.com",
17657
17658
  "cdn-hot-proxy": "//betacs.101.com",
17659
+ "cdn-bdcs-file": "//ndcs-pre.101.com",
17658
17660
  // 站点配置(存在灰度能力)
17659
17661
  "site-config": "//grey-config-web.ykt.cbern.com.cn",
17660
17662
  serviceName: {
@@ -17662,7 +17664,8 @@ const config = {
17662
17664
  zxxRegion: "preproduction_content_zxx_region",
17663
17665
  train: "preproduction_content_staticize",
17664
17666
  "t-course": "preproduction_content_x_course",
17665
- eLabour: "preproduction_content_zxx"
17667
+ eLabour: "preproduction_content_zxx",
17668
+ library: "preproduction_content_zxx"
17666
17669
  },
17667
17670
  defaultAreaSite: "hn",
17668
17671
  // 内容库
@@ -19441,6 +19444,25 @@ class Ndr {
19441
19444
  const { data } = await this.request.cdn.cdnAPI.get(`${serviceName2}/ndrs/teaching_lesson/resources/${id}/relation_resource.json`);
19442
19445
  return data;
19443
19446
  });
19447
+ // 获取电子教材详情
19448
+ __publicField(this, "fetchTchMaterialDetail", async ({ id, serviceName: serviceName2 }) => {
19449
+ const { data } = await this.request.cdn.cdnAPI.get(`${serviceName2}/ndrv2/resources/tch_material/details/${id}.json`);
19450
+ return data;
19451
+ });
19452
+ __publicField(this, "fetchTchMaterialAudio", async ({ id, serviceName: serviceName2 }) => {
19453
+ const { data } = await this.request.cdn.cdnAPI.get(`${serviceName2}/ndrs/resources/${id}/relation_audios.json`);
19454
+ return data;
19455
+ });
19456
+ // 劳动教育
19457
+ __publicField(this, "fetchLabourDetailNDR", async ({ id, serviceName: serviceName2 }) => {
19458
+ const { data } = await this.request.cdn.cdnAPI.get(`${serviceName2}/ndrs/special_edu/resources/details/${id}.json`);
19459
+ return data;
19460
+ });
19461
+ // 获取 ndr 详情数据
19462
+ __publicField(this, "fetchResourceDetailNDR", async ({ id, serviceName: serviceName2 }) => {
19463
+ const { data } = await this.request.cdn.cdnAPI.get(`${serviceName2}/ndrs/special_edu/resources/details/${id}.json`);
19464
+ return data;
19465
+ });
19444
19466
  const { request, config: config2 } = props;
19445
19467
  this.request = request;
19446
19468
  this.config = config2;
package/dist/service.mjs CHANGED
@@ -17633,7 +17633,8 @@ const config = {
17633
17633
  zxxRegion: "zxx_region",
17634
17634
  train: "teach",
17635
17635
  "t-course": "teach",
17636
- eLabour: "ldjy"
17636
+ eLabour: "ldjy",
17637
+ library: "zxx"
17637
17638
  },
17638
17639
  defaultAreaSite: "hn",
17639
17640
  // 内容库
@@ -17653,6 +17654,7 @@ const config = {
17653
17654
  "x-study-record": "//x-study-record-api.beta.101.com",
17654
17655
  cdn: "//ndcs-pre.101.com",
17655
17656
  "cdn-hot-proxy": "//betacs.101.com",
17657
+ "cdn-bdcs-file": "//ndcs-pre.101.com",
17656
17658
  // 站点配置(存在灰度能力)
17657
17659
  "site-config": "//grey-config-web.ykt.cbern.com.cn",
17658
17660
  serviceName: {
@@ -17660,7 +17662,8 @@ const config = {
17660
17662
  zxxRegion: "preproduction_content_zxx_region",
17661
17663
  train: "preproduction_content_staticize",
17662
17664
  "t-course": "preproduction_content_x_course",
17663
- eLabour: "preproduction_content_zxx"
17665
+ eLabour: "preproduction_content_zxx",
17666
+ library: "preproduction_content_zxx"
17664
17667
  },
17665
17668
  defaultAreaSite: "hn",
17666
17669
  // 内容库
@@ -19439,6 +19442,25 @@ class Ndr {
19439
19442
  const { data } = await this.request.cdn.cdnAPI.get(`${serviceName2}/ndrs/teaching_lesson/resources/${id}/relation_resource.json`);
19440
19443
  return data;
19441
19444
  });
19445
+ // 获取电子教材详情
19446
+ __publicField(this, "fetchTchMaterialDetail", async ({ id, serviceName: serviceName2 }) => {
19447
+ const { data } = await this.request.cdn.cdnAPI.get(`${serviceName2}/ndrv2/resources/tch_material/details/${id}.json`);
19448
+ return data;
19449
+ });
19450
+ __publicField(this, "fetchTchMaterialAudio", async ({ id, serviceName: serviceName2 }) => {
19451
+ const { data } = await this.request.cdn.cdnAPI.get(`${serviceName2}/ndrs/resources/${id}/relation_audios.json`);
19452
+ return data;
19453
+ });
19454
+ // 劳动教育
19455
+ __publicField(this, "fetchLabourDetailNDR", async ({ id, serviceName: serviceName2 }) => {
19456
+ const { data } = await this.request.cdn.cdnAPI.get(`${serviceName2}/ndrs/special_edu/resources/details/${id}.json`);
19457
+ return data;
19458
+ });
19459
+ // 获取 ndr 详情数据
19460
+ __publicField(this, "fetchResourceDetailNDR", async ({ id, serviceName: serviceName2 }) => {
19461
+ const { data } = await this.request.cdn.cdnAPI.get(`${serviceName2}/ndrs/special_edu/resources/details/${id}.json`);
19462
+ return data;
19463
+ });
19442
19464
  const { request, config: config2 } = props;
19443
19465
  this.request = request;
19444
19466
  this.config = config2;
@@ -17637,7 +17637,8 @@ var __publicField = (obj, key, value) => {
17637
17637
  zxxRegion: "zxx_region",
17638
17638
  train: "teach",
17639
17639
  "t-course": "teach",
17640
- eLabour: "ldjy"
17640
+ eLabour: "ldjy",
17641
+ library: "zxx"
17641
17642
  },
17642
17643
  defaultAreaSite: "hn",
17643
17644
  // 内容库
@@ -17657,6 +17658,7 @@ var __publicField = (obj, key, value) => {
17657
17658
  "x-study-record": "//x-study-record-api.beta.101.com",
17658
17659
  cdn: "//ndcs-pre.101.com",
17659
17660
  "cdn-hot-proxy": "//betacs.101.com",
17661
+ "cdn-bdcs-file": "//ndcs-pre.101.com",
17660
17662
  // 站点配置(存在灰度能力)
17661
17663
  "site-config": "//grey-config-web.ykt.cbern.com.cn",
17662
17664
  serviceName: {
@@ -17664,7 +17666,8 @@ var __publicField = (obj, key, value) => {
17664
17666
  zxxRegion: "preproduction_content_zxx_region",
17665
17667
  train: "preproduction_content_staticize",
17666
17668
  "t-course": "preproduction_content_x_course",
17667
- eLabour: "preproduction_content_zxx"
17669
+ eLabour: "preproduction_content_zxx",
17670
+ library: "preproduction_content_zxx"
17668
17671
  },
17669
17672
  defaultAreaSite: "hn",
17670
17673
  // 内容库
@@ -19443,6 +19446,25 @@ var __publicField = (obj, key, value) => {
19443
19446
  const { data } = await this.request.cdn.cdnAPI.get(`${serviceName2}/ndrs/teaching_lesson/resources/${id}/relation_resource.json`);
19444
19447
  return data;
19445
19448
  });
19449
+ // 获取电子教材详情
19450
+ __publicField(this, "fetchTchMaterialDetail", async ({ id, serviceName: serviceName2 }) => {
19451
+ const { data } = await this.request.cdn.cdnAPI.get(`${serviceName2}/ndrv2/resources/tch_material/details/${id}.json`);
19452
+ return data;
19453
+ });
19454
+ __publicField(this, "fetchTchMaterialAudio", async ({ id, serviceName: serviceName2 }) => {
19455
+ const { data } = await this.request.cdn.cdnAPI.get(`${serviceName2}/ndrs/resources/${id}/relation_audios.json`);
19456
+ return data;
19457
+ });
19458
+ // 劳动教育
19459
+ __publicField(this, "fetchLabourDetailNDR", async ({ id, serviceName: serviceName2 }) => {
19460
+ const { data } = await this.request.cdn.cdnAPI.get(`${serviceName2}/ndrs/special_edu/resources/details/${id}.json`);
19461
+ return data;
19462
+ });
19463
+ // 获取 ndr 详情数据
19464
+ __publicField(this, "fetchResourceDetailNDR", async ({ id, serviceName: serviceName2 }) => {
19465
+ const { data } = await this.request.cdn.cdnAPI.get(`${serviceName2}/ndrs/special_edu/resources/details/${id}.json`);
19466
+ return data;
19467
+ });
19446
19468
  const { request, config: config2 } = props;
19447
19469
  this.request = request;
19448
19470
  this.config = config2;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@x-edu/service",
3
- "version": "0.0.9",
3
+ "version": "0.0.10",
4
4
  "main": "dist/service.js",
5
5
  "module": "dist/service.mjs",
6
6
  "types": "dist/index.d.ts",
@@ -57,7 +57,7 @@
57
57
  "vite-plugin-inspect": "^0.8.4"
58
58
  },
59
59
  "peerDependencies": {
60
- "react": "17.x",
61
- "react-dom": "17.x"
60
+ "react": "^17.0.0 || ^18.0.0",
61
+ "react-dom": "^17.0.0 || ^18.0.0"
62
62
  }
63
63
  }