@x-edu/service 0.0.10 → 0.0.11
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/dist/config/index.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/service/uc.d.ts +7 -0
- package/dist/service.js +23 -4
- package/dist/service.mjs +23 -4
- package/dist/service.umd.js +23 -4
- package/package.json +1 -1
package/dist/config/index.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/service.js
CHANGED
|
@@ -17640,7 +17640,8 @@ const config = {
|
|
|
17640
17640
|
},
|
|
17641
17641
|
defaultAreaSite: "hn",
|
|
17642
17642
|
// 内容库
|
|
17643
|
-
"elearning-library": "//elearning-library-gateway.ykt.eduyun.cn"
|
|
17643
|
+
"elearning-library": "//elearning-library-gateway.ykt.eduyun.cn",
|
|
17644
|
+
uc: "//uc-gateway.ykt.eduyun.cn"
|
|
17644
17645
|
},
|
|
17645
17646
|
preproduction: {
|
|
17646
17647
|
// 代理
|
|
@@ -17670,7 +17671,7 @@ const config = {
|
|
|
17670
17671
|
defaultAreaSite: "hn",
|
|
17671
17672
|
// 内容库
|
|
17672
17673
|
"elearning-library": "//elearning-library-gateway.beta.101.com",
|
|
17673
|
-
uc: "
|
|
17674
|
+
uc: "//uc-gateway.sdp.101.com"
|
|
17674
17675
|
}
|
|
17675
17676
|
};
|
|
17676
17677
|
const recommendAPIV2 = ({
|
|
@@ -19468,6 +19469,23 @@ class Ndr {
|
|
|
19468
19469
|
this.config = config2;
|
|
19469
19470
|
}
|
|
19470
19471
|
}
|
|
19472
|
+
class UC {
|
|
19473
|
+
constructor(props) {
|
|
19474
|
+
__publicField(this, "request");
|
|
19475
|
+
__publicField(this, "uc");
|
|
19476
|
+
__publicField(this, "getInstitutions", async () => {
|
|
19477
|
+
const response = await this.request.uc.ucAPI.get("/institutions/actions/search", {
|
|
19478
|
+
params: {
|
|
19479
|
+
app_id: this.uc.options.sdpAppId
|
|
19480
|
+
}
|
|
19481
|
+
});
|
|
19482
|
+
return response.data;
|
|
19483
|
+
});
|
|
19484
|
+
const { request, uc } = props;
|
|
19485
|
+
this.request = request;
|
|
19486
|
+
this.uc = uc;
|
|
19487
|
+
}
|
|
19488
|
+
}
|
|
19471
19489
|
const _Service = class _Service {
|
|
19472
19490
|
constructor(props) {
|
|
19473
19491
|
__publicField(this, "env");
|
|
@@ -19569,11 +19587,12 @@ const _Service = class _Service {
|
|
|
19569
19587
|
elearningTrain: ElearningTrain,
|
|
19570
19588
|
siteConfig: SiteConfig,
|
|
19571
19589
|
library: Library,
|
|
19572
|
-
Ndr
|
|
19590
|
+
Ndr,
|
|
19591
|
+
uc: UC
|
|
19573
19592
|
};
|
|
19574
19593
|
this.service = {};
|
|
19575
19594
|
Object.keys(services).forEach((key) => {
|
|
19576
|
-
this.service[key] = new services[key]({ request: this.request, config: this.config, sdpAppId: this.sdpAppId });
|
|
19595
|
+
this.service[key] = new services[key]({ request: this.request, config: this.config, sdpAppId: this.sdpAppId, uc: this.uc });
|
|
19577
19596
|
});
|
|
19578
19597
|
}
|
|
19579
19598
|
};
|
package/dist/service.mjs
CHANGED
|
@@ -17638,7 +17638,8 @@ const config = {
|
|
|
17638
17638
|
},
|
|
17639
17639
|
defaultAreaSite: "hn",
|
|
17640
17640
|
// 内容库
|
|
17641
|
-
"elearning-library": "//elearning-library-gateway.ykt.eduyun.cn"
|
|
17641
|
+
"elearning-library": "//elearning-library-gateway.ykt.eduyun.cn",
|
|
17642
|
+
uc: "//uc-gateway.ykt.eduyun.cn"
|
|
17642
17643
|
},
|
|
17643
17644
|
preproduction: {
|
|
17644
17645
|
// 代理
|
|
@@ -17668,7 +17669,7 @@ const config = {
|
|
|
17668
17669
|
defaultAreaSite: "hn",
|
|
17669
17670
|
// 内容库
|
|
17670
17671
|
"elearning-library": "//elearning-library-gateway.beta.101.com",
|
|
17671
|
-
uc: "
|
|
17672
|
+
uc: "//uc-gateway.sdp.101.com"
|
|
17672
17673
|
}
|
|
17673
17674
|
};
|
|
17674
17675
|
const recommendAPIV2 = ({
|
|
@@ -19466,6 +19467,23 @@ class Ndr {
|
|
|
19466
19467
|
this.config = config2;
|
|
19467
19468
|
}
|
|
19468
19469
|
}
|
|
19470
|
+
class UC {
|
|
19471
|
+
constructor(props) {
|
|
19472
|
+
__publicField(this, "request");
|
|
19473
|
+
__publicField(this, "uc");
|
|
19474
|
+
__publicField(this, "getInstitutions", async () => {
|
|
19475
|
+
const response = await this.request.uc.ucAPI.get("/institutions/actions/search", {
|
|
19476
|
+
params: {
|
|
19477
|
+
app_id: this.uc.options.sdpAppId
|
|
19478
|
+
}
|
|
19479
|
+
});
|
|
19480
|
+
return response.data;
|
|
19481
|
+
});
|
|
19482
|
+
const { request, uc } = props;
|
|
19483
|
+
this.request = request;
|
|
19484
|
+
this.uc = uc;
|
|
19485
|
+
}
|
|
19486
|
+
}
|
|
19469
19487
|
const _Service = class _Service {
|
|
19470
19488
|
constructor(props) {
|
|
19471
19489
|
__publicField(this, "env");
|
|
@@ -19567,11 +19585,12 @@ const _Service = class _Service {
|
|
|
19567
19585
|
elearningTrain: ElearningTrain,
|
|
19568
19586
|
siteConfig: SiteConfig,
|
|
19569
19587
|
library: Library,
|
|
19570
|
-
Ndr
|
|
19588
|
+
Ndr,
|
|
19589
|
+
uc: UC
|
|
19571
19590
|
};
|
|
19572
19591
|
this.service = {};
|
|
19573
19592
|
Object.keys(services).forEach((key) => {
|
|
19574
|
-
this.service[key] = new services[key]({ request: this.request, config: this.config, sdpAppId: this.sdpAppId });
|
|
19593
|
+
this.service[key] = new services[key]({ request: this.request, config: this.config, sdpAppId: this.sdpAppId, uc: this.uc });
|
|
19575
19594
|
});
|
|
19576
19595
|
}
|
|
19577
19596
|
};
|
package/dist/service.umd.js
CHANGED
|
@@ -17642,7 +17642,8 @@ var __publicField = (obj, key, value) => {
|
|
|
17642
17642
|
},
|
|
17643
17643
|
defaultAreaSite: "hn",
|
|
17644
17644
|
// 内容库
|
|
17645
|
-
"elearning-library": "//elearning-library-gateway.ykt.eduyun.cn"
|
|
17645
|
+
"elearning-library": "//elearning-library-gateway.ykt.eduyun.cn",
|
|
17646
|
+
uc: "//uc-gateway.ykt.eduyun.cn"
|
|
17646
17647
|
},
|
|
17647
17648
|
preproduction: {
|
|
17648
17649
|
// 代理
|
|
@@ -17672,7 +17673,7 @@ var __publicField = (obj, key, value) => {
|
|
|
17672
17673
|
defaultAreaSite: "hn",
|
|
17673
17674
|
// 内容库
|
|
17674
17675
|
"elearning-library": "//elearning-library-gateway.beta.101.com",
|
|
17675
|
-
uc: "
|
|
17676
|
+
uc: "//uc-gateway.sdp.101.com"
|
|
17676
17677
|
}
|
|
17677
17678
|
};
|
|
17678
17679
|
const recommendAPIV2 = ({
|
|
@@ -19470,6 +19471,23 @@ var __publicField = (obj, key, value) => {
|
|
|
19470
19471
|
this.config = config2;
|
|
19471
19472
|
}
|
|
19472
19473
|
}
|
|
19474
|
+
class UC {
|
|
19475
|
+
constructor(props) {
|
|
19476
|
+
__publicField(this, "request");
|
|
19477
|
+
__publicField(this, "uc");
|
|
19478
|
+
__publicField(this, "getInstitutions", async () => {
|
|
19479
|
+
const response = await this.request.uc.ucAPI.get("/institutions/actions/search", {
|
|
19480
|
+
params: {
|
|
19481
|
+
app_id: this.uc.options.sdpAppId
|
|
19482
|
+
}
|
|
19483
|
+
});
|
|
19484
|
+
return response.data;
|
|
19485
|
+
});
|
|
19486
|
+
const { request, uc } = props;
|
|
19487
|
+
this.request = request;
|
|
19488
|
+
this.uc = uc;
|
|
19489
|
+
}
|
|
19490
|
+
}
|
|
19473
19491
|
const _Service = class _Service {
|
|
19474
19492
|
constructor(props) {
|
|
19475
19493
|
__publicField(this, "env");
|
|
@@ -19571,11 +19589,12 @@ var __publicField = (obj, key, value) => {
|
|
|
19571
19589
|
elearningTrain: ElearningTrain,
|
|
19572
19590
|
siteConfig: SiteConfig,
|
|
19573
19591
|
library: Library,
|
|
19574
|
-
Ndr
|
|
19592
|
+
Ndr,
|
|
19593
|
+
uc: UC
|
|
19575
19594
|
};
|
|
19576
19595
|
this.service = {};
|
|
19577
19596
|
Object.keys(services).forEach((key) => {
|
|
19578
|
-
this.service[key] = new services[key]({ request: this.request, config: this.config, sdpAppId: this.sdpAppId });
|
|
19597
|
+
this.service[key] = new services[key]({ request: this.request, config: this.config, sdpAppId: this.sdpAppId, uc: this.uc });
|
|
19579
19598
|
});
|
|
19580
19599
|
}
|
|
19581
19600
|
};
|