@x-edu/service 0.0.12 → 0.0.15
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/README.md +38 -0
- package/dist/config/index.d.ts +25 -0
- package/dist/index.d.ts +25 -0
- package/dist/service.js +1788 -2760
- package/dist/service.mjs +1799 -2771
- package/dist/service.umd.js +1774 -2746
- package/package.json +7 -2
package/README.md
CHANGED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# @x-edu/service
|
|
2
|
+
x 学习相关 API
|
|
3
|
+
|
|
4
|
+
## 安装
|
|
5
|
+
```bash
|
|
6
|
+
npm i @x-edu/service
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## 示例
|
|
10
|
+
```js service.js
|
|
11
|
+
import Service from '@x-edu/service'
|
|
12
|
+
|
|
13
|
+
export let service
|
|
14
|
+
|
|
15
|
+
export function initService({
|
|
16
|
+
uc,
|
|
17
|
+
sdpAppId
|
|
18
|
+
}) {
|
|
19
|
+
service = new Service({
|
|
20
|
+
uc,
|
|
21
|
+
sdpAppId
|
|
22
|
+
})
|
|
23
|
+
return service
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
```js app.js
|
|
28
|
+
const uc = new UC()
|
|
29
|
+
const sdpAppI = 'xxxx'
|
|
30
|
+
|
|
31
|
+
initService({ uc, sdpAppId })
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
```js biz.js
|
|
35
|
+
import { service as serviceInstance } from '@/service'
|
|
36
|
+
|
|
37
|
+
serviceInstance.service.xxx()
|
|
38
|
+
```
|
package/dist/config/index.d.ts
CHANGED
|
@@ -24,6 +24,31 @@ declare const config: {
|
|
|
24
24
|
'elearning-library': string;
|
|
25
25
|
uc: string;
|
|
26
26
|
};
|
|
27
|
+
'ncet-xedu-beta': {
|
|
28
|
+
"x-proxy": string;
|
|
29
|
+
recommend: string;
|
|
30
|
+
"e-assessment-api": string;
|
|
31
|
+
"x-cloud-web": string;
|
|
32
|
+
"x-feedback": string;
|
|
33
|
+
"cs-feedback": string;
|
|
34
|
+
"e-favorite-api": string;
|
|
35
|
+
"x-study-record": string;
|
|
36
|
+
cdn: any;
|
|
37
|
+
"cdn-s-file": any;
|
|
38
|
+
"cdn-bdcs-file": string;
|
|
39
|
+
"site-config": string;
|
|
40
|
+
serviceName: {
|
|
41
|
+
site: string;
|
|
42
|
+
zxxRegion: string;
|
|
43
|
+
train: string;
|
|
44
|
+
"t-course": string;
|
|
45
|
+
eLabour: string;
|
|
46
|
+
library: string;
|
|
47
|
+
};
|
|
48
|
+
defaultAreaSite: string;
|
|
49
|
+
"elearning-library": string;
|
|
50
|
+
uc: string;
|
|
51
|
+
};
|
|
27
52
|
preproduction: {
|
|
28
53
|
'x-proxy': string;
|
|
29
54
|
'x-cloud-web': string;
|
package/dist/index.d.ts
CHANGED
|
@@ -41,6 +41,31 @@ export declare const serviceConfig: {
|
|
|
41
41
|
'elearning-library': string;
|
|
42
42
|
uc: string;
|
|
43
43
|
};
|
|
44
|
+
'ncet-xedu-beta': {
|
|
45
|
+
"x-proxy": string;
|
|
46
|
+
recommend: string;
|
|
47
|
+
"e-assessment-api": string;
|
|
48
|
+
"x-cloud-web": string;
|
|
49
|
+
"x-feedback": string;
|
|
50
|
+
"cs-feedback": string;
|
|
51
|
+
"e-favorite-api": string;
|
|
52
|
+
"x-study-record": string;
|
|
53
|
+
cdn: any;
|
|
54
|
+
"cdn-s-file": any;
|
|
55
|
+
"cdn-bdcs-file": string;
|
|
56
|
+
"site-config": string;
|
|
57
|
+
serviceName: {
|
|
58
|
+
site: string;
|
|
59
|
+
zxxRegion: string;
|
|
60
|
+
train: string;
|
|
61
|
+
"t-course": string;
|
|
62
|
+
eLabour: string;
|
|
63
|
+
library: string;
|
|
64
|
+
};
|
|
65
|
+
defaultAreaSite: string;
|
|
66
|
+
"elearning-library": string;
|
|
67
|
+
uc: string;
|
|
68
|
+
};
|
|
44
69
|
preproduction: {
|
|
45
70
|
'x-proxy': string;
|
|
46
71
|
'x-cloud-web': string;
|