@x-edu/service 0.0.5 → 0.0.6
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/service/like.d.ts +1 -0
- package/dist/service.js +9 -3
- package/dist/service.mjs +9 -3
- package/dist/service.umd.js +9 -3
- package/package.json +1 -1
package/dist/service/like.d.ts
CHANGED
package/dist/service.js
CHANGED
|
@@ -18327,6 +18327,7 @@ class Assessment {
|
|
|
18327
18327
|
class Like {
|
|
18328
18328
|
constructor(props) {
|
|
18329
18329
|
__publicField(this, "request");
|
|
18330
|
+
__publicField(this, "sdpAppId");
|
|
18330
18331
|
// 获取资源点赞
|
|
18331
18332
|
__publicField(this, "getResourceLikes", async ({ resId, type }) => {
|
|
18332
18333
|
const { data } = await this.request.xProxy.xProxyCloudAPI.get(`/res_stats/${resId}`, {
|
|
@@ -18337,10 +18338,15 @@ class Like {
|
|
|
18337
18338
|
return data;
|
|
18338
18339
|
});
|
|
18339
18340
|
__publicField(this, "postResourceLikes", async ({ resId, type = "like" }) => {
|
|
18340
|
-
await this.request.xCloudWeb.xCloudWebAPI.post(`/res_stats/${resId}?type=${type}
|
|
18341
|
+
await this.request.xCloudWeb.xCloudWebAPI.post(`/res_stats/${resId}?type=${type}`, {
|
|
18342
|
+
Headers: {
|
|
18343
|
+
"sdp-app-id": this.sdpAppId
|
|
18344
|
+
}
|
|
18345
|
+
});
|
|
18341
18346
|
});
|
|
18342
|
-
const { request } = props;
|
|
18347
|
+
const { request, sdpAppId } = props;
|
|
18343
18348
|
this.request = request;
|
|
18349
|
+
this.sdpAppId = sdpAppId;
|
|
18344
18350
|
}
|
|
18345
18351
|
}
|
|
18346
18352
|
class Feedback {
|
|
@@ -19378,7 +19384,7 @@ const _Service = class _Service {
|
|
|
19378
19384
|
};
|
|
19379
19385
|
this.service = {};
|
|
19380
19386
|
Object.keys(services).forEach((key) => {
|
|
19381
|
-
this.service[key] = new services[key]({ request: this.request, config: this.config });
|
|
19387
|
+
this.service[key] = new services[key]({ request: this.request, config: this.config, sdpAppId: this.sdpAppId });
|
|
19382
19388
|
});
|
|
19383
19389
|
}
|
|
19384
19390
|
};
|
package/dist/service.mjs
CHANGED
|
@@ -18325,6 +18325,7 @@ class Assessment {
|
|
|
18325
18325
|
class Like {
|
|
18326
18326
|
constructor(props) {
|
|
18327
18327
|
__publicField(this, "request");
|
|
18328
|
+
__publicField(this, "sdpAppId");
|
|
18328
18329
|
// 获取资源点赞
|
|
18329
18330
|
__publicField(this, "getResourceLikes", async ({ resId, type }) => {
|
|
18330
18331
|
const { data } = await this.request.xProxy.xProxyCloudAPI.get(`/res_stats/${resId}`, {
|
|
@@ -18335,10 +18336,15 @@ class Like {
|
|
|
18335
18336
|
return data;
|
|
18336
18337
|
});
|
|
18337
18338
|
__publicField(this, "postResourceLikes", async ({ resId, type = "like" }) => {
|
|
18338
|
-
await this.request.xCloudWeb.xCloudWebAPI.post(`/res_stats/${resId}?type=${type}
|
|
18339
|
+
await this.request.xCloudWeb.xCloudWebAPI.post(`/res_stats/${resId}?type=${type}`, {
|
|
18340
|
+
Headers: {
|
|
18341
|
+
"sdp-app-id": this.sdpAppId
|
|
18342
|
+
}
|
|
18343
|
+
});
|
|
18339
18344
|
});
|
|
18340
|
-
const { request } = props;
|
|
18345
|
+
const { request, sdpAppId } = props;
|
|
18341
18346
|
this.request = request;
|
|
18347
|
+
this.sdpAppId = sdpAppId;
|
|
18342
18348
|
}
|
|
18343
18349
|
}
|
|
18344
18350
|
class Feedback {
|
|
@@ -19376,7 +19382,7 @@ const _Service = class _Service {
|
|
|
19376
19382
|
};
|
|
19377
19383
|
this.service = {};
|
|
19378
19384
|
Object.keys(services).forEach((key) => {
|
|
19379
|
-
this.service[key] = new services[key]({ request: this.request, config: this.config });
|
|
19385
|
+
this.service[key] = new services[key]({ request: this.request, config: this.config, sdpAppId: this.sdpAppId });
|
|
19380
19386
|
});
|
|
19381
19387
|
}
|
|
19382
19388
|
};
|
package/dist/service.umd.js
CHANGED
|
@@ -18329,6 +18329,7 @@ var __publicField = (obj, key, value) => {
|
|
|
18329
18329
|
class Like {
|
|
18330
18330
|
constructor(props) {
|
|
18331
18331
|
__publicField(this, "request");
|
|
18332
|
+
__publicField(this, "sdpAppId");
|
|
18332
18333
|
// 获取资源点赞
|
|
18333
18334
|
__publicField(this, "getResourceLikes", async ({ resId, type }) => {
|
|
18334
18335
|
const { data } = await this.request.xProxy.xProxyCloudAPI.get(`/res_stats/${resId}`, {
|
|
@@ -18339,10 +18340,15 @@ var __publicField = (obj, key, value) => {
|
|
|
18339
18340
|
return data;
|
|
18340
18341
|
});
|
|
18341
18342
|
__publicField(this, "postResourceLikes", async ({ resId, type = "like" }) => {
|
|
18342
|
-
await this.request.xCloudWeb.xCloudWebAPI.post(`/res_stats/${resId}?type=${type}
|
|
18343
|
+
await this.request.xCloudWeb.xCloudWebAPI.post(`/res_stats/${resId}?type=${type}`, {
|
|
18344
|
+
Headers: {
|
|
18345
|
+
"sdp-app-id": this.sdpAppId
|
|
18346
|
+
}
|
|
18347
|
+
});
|
|
18343
18348
|
});
|
|
18344
|
-
const { request } = props;
|
|
18349
|
+
const { request, sdpAppId } = props;
|
|
18345
18350
|
this.request = request;
|
|
18351
|
+
this.sdpAppId = sdpAppId;
|
|
18346
18352
|
}
|
|
18347
18353
|
}
|
|
18348
18354
|
class Feedback {
|
|
@@ -19380,7 +19386,7 @@ var __publicField = (obj, key, value) => {
|
|
|
19380
19386
|
};
|
|
19381
19387
|
this.service = {};
|
|
19382
19388
|
Object.keys(services).forEach((key) => {
|
|
19383
|
-
this.service[key] = new services[key]({ request: this.request, config: this.config });
|
|
19389
|
+
this.service[key] = new services[key]({ request: this.request, config: this.config, sdpAppId: this.sdpAppId });
|
|
19384
19390
|
});
|
|
19385
19391
|
}
|
|
19386
19392
|
};
|