web/activities/discuss/static-src/js/manage/index.js
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
import { initEditor } from 'app/js/activity-manage/editor.js';
export default class Discuss {
constructor() {
this._init();
}
_init() {
this._inItStep2form();
window.ltc.on('getActivity', (msg) => {
window.ltc.emit('returnActivity', {valid:this.validator.form(), data: this._serializeArray($('#step2-form'))});
});
window.ltc.on('getValidate', (msg) => {
window.ltc.emit('returnValidate', {valid: this.validator.form()});
});
}
_inItStep2form() {
var $step2_form = $('#step2-form');
this.validator = $step2_form.validate({
rules: {
title: {
required: true,
maxlength: 50,
trim: true,
course_title: true,
},
content: 'required',
},
});
initEditor($('[name="content"]'), this.validator);
}
_serializeArray($e) {
let o = {};
let a = $e.serializeArray();
$.each(a, function() {
if (o[this.name]) {
if (!o[this.name].push) {
o[this.name] = [o[this.name]];
}
o[this.name].push(this.value || '');
} else {
o[this.name] = this.value || '';
}
});
return o;
}
}
new Discuss();
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。