app/Resources/static-src/libs/ltc-sdk-server/index.js
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
import Api from './api';
import EsMessenger from 'es-post-message';
class LtcSDKServer {
constructor() {
this.options = {};
this.resource = this._getResource();
this.childrenList = this.getChildrenList();
this.messenger = new EsMessenger({
name: 'parent',
project: 'LtcProject',
children: this.getChildren(),
type: 'parent'
});
this.event();
}
_getResource() {
let resource = $.parseJSON($('#ltc-source-list').text());
resource.context.lang = document.documentElement.lang;
resource.context.csrf = $('meta[name=csrf-token]').attr('content');
return resource;
}
getChildrenList() {
let childs = [];
['task-create-content-iframe', 'task-create-finish-iframe', 'task-content-iframe'].forEach(function(value){
if ($('#'+value).length > 0) {
childs.push(value);
}
});
return childs;
}
getChildren() {
let childs = [];
this.childrenList.forEach(function(value){
childs.push(document.getElementById(value));
});
return childs;
}
event() {
this.messenger.on('init', ()=> {
this.childrenList.forEach((value) => {
this.emitChild(value, 'initResourceList', this.resource);
})
});
this.messenger.on('getApi', (msg) => {
let apiName = msg.name;
let options = {
headers: {
'Accept': 'application/vnd.edusoho.v2+json',
'X-Requested-With': 'XMLHttpRequest',
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。