You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

204 lines
12 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

export const query = {randomcode:null, client_key:null};
export const config = {method:"POST"};
//undefined: optional, null: required, other values: default
//we use
const apiConfig = {
accounts:{
login:{query, form:{autologin:1,login:null, password:null}, config},
logout:{query},
get_verification_code:{query, form:{login:null, type:null, smscode:null},data:{type:["1|注册","2|重置密码","3|更换手机","4|更换邮箱"]}},
register: { query,form: {login: null, password: null, code: null }, config},
reset_password: {query,form: {login: null, new_password: null, new_password_confirmation: null, code:null }, config },
valid_email_and_phone: { query,form: {login: null, type: 1 } },
},
add_department_applies:{config, query, form:{school_id:null, name:null, remarks:void 0},disp:"新增子单位"},
attachments:{url:{_:1,DELETE:'*/{attachment_id}',uploadFile:"*"},query,form:{_:1,uploadFile:{file:null},DELETE:{}},config:{method:"uploadFile", name:"file"}},
collections:{config, query, form:{container_id: null, container_type: null},
cancel:{query, config:{method:"DELETE", form:{container_id: null, container_type: null}}},
},
courses:{ url:{_:"*", DELETE:"*/{course_id}",PUT:"*/{course_id}"},query, form:{_:1,GET:{search:"",limit:20, page:1, order:"all"}, POST:{course_list_name:null,name:null,school: null,end_date: null,class_period:null,credit:null,course_module_types:["shixun_homework","common_homework","group_homework","exercise","attachment","course_group"],authentication:null,professional_certification:null},PUT:{course_list_name:null,name:null,school: null,end_date: null,class_period:null,credit:null,course_module_types:["shixun_homework","common_homework","group_homework","exercise","attachment","course_group"],authentication:null,professional_certification:null}},
act_score:{url:"{course_id}/*", query},
all_course_groups:{url:"{course_id}/*", query},
apply_teachers:{url:"{course_id}/*",query,disp:"获取正在申请教师的列表"},
apply_to_join_course:{query,form:{invite_code:null, professor:void 0,assistant_professor:void 0,student:void 0}, config},
attendances:{url:"{course_id}/*",query, form:{page:1, limit:10, history:void 0}},
calculate_all_shixun_scores:{url:"{course_id}/*", query},
delete_course_teacher:{url:"{course_id}/*",query,config,form:{course_member_id:null}},
delete_from_course:{url:"{course_id}/*", query, config, form:{students:null},data:{students:{course_member_id:121}}, disp:"删除学生"},
exercises:{url:"{course_id}/*", query, form:{_:1, GET:{page:1,limit:15},POST:{exercise_name:null, exercise_description:""}},
publish:{url:"../{course_id}/exercises/*",query,form:{check_ids: null, end_time:null},config},
},
exit_course:{url:"{course_id}/*",query,config},
export_member_scores_excel:{url:"{course_id}/*", query, config:{method:"downloadFile"}},
homework_commons:{url:"{course_id}/*",query, form:{type:null, page:1, order:""}, disp:"普通作业|实训作业", data:{order:"无:全部,0:未发布,1:提交中,2:补交中, 3:匿评4申诉5已截止"}},
left_banner:{url:"{course_id}/*",query},
top_banner:{url:"{course_id}/*", query},
set_invite_code_halt:{url:"{course_id}/*", query, config, disp:"停用或启用邀请码"},
students:{url:"{course_id}/*",query, form:{order:1,sort:"asc",page:1, limit:20, course_group_id:""}},
search_slim:{query, form:{page:1, limit:10}},
switch_to_assistant: { url: "{course_id}/*", query ,config},
switch_to_student:{url:"{course_id}/*",query, config},
switch_to_teacher:{url:"{course_id}/*",query, config},
teacher_application_review:{url:"{course_id}/*",config, query, form:{application_id:null, approval:null,user_id:null},data:{approval:{2:"拒绝",1:"同意"}},disp:"审批教师申请"},
work_score:{url:"{course_id}/*",query, form:{limit:20, page:1, sort:"desc"}},
},
course_modules:{
sticky_module:{url:"{module_id}/*", query}
},
exercises:{url:"{exercise_id}",query,form:{exercise_name:null, exercise_description:""},config:{method:"PUT"},
common_header:{url:"{exercise_id}/*", query},
commit_exercise:{url:"{exercise_id}/*",query,form:{commit_method:1},config},
begin_commit:{url:"{exercise_id}/*",query},
edit:{url:"{exercise_id}/*", query},
exercise_setting:{url:"{exercise_id}/*", query},
exercise_lists:{url:"{exercise_id}/*",query, form:{order:"end_at", search:""}},
exercise_result:{url:"{exercise_id}/*", query, form:{sort:"asc", page:1, limit:50}},
exercise_questions: { url: "{exercise_bank_id}/*", query, form: { exercise_bank_id: null, question_title: null, question_type: null, question_score: null, question_choices: null, standard_answers:null},config,disp:"新建题目"},
publish_groups:{url:"{exercise_id}/*", query, disp:"??"},
start_answer:{url:"{exercise_id}/*", query},
},
exercise_questions: {
url: "{question_id}", query, form: { exercise_bank_id: null, question_title: null, question_type: null, question_score: null, question_choices: null, standard_answers: null},config:{method:"PUT"},disp:"更改题目",
exercise_answers: { url: "{question_id}/*", query, form: { exercise_choice_id: void 0, answer_text: void 0}, config, disp: "答题"}
},
disciplines:{
query, form:{source:null}
},
files:{query, form:{course_id:null, page_size:15, page:1,search:"",sort:0, sort_type:"created_on"},
upload:{query, form:{course_id:null,course_second_category_id:null,attachment_ids:null,is_public:false,delay_publish:0} ,config},
},
helps:{
aboud:{query},
},
home:{
index:{query},
},
homework_commons:{
student_works:{url:"{homework_id}/*",query,form:{description:null,attachment_ids:null},config,disp:"POST:提交普通作业",
new:{query, disp:"??提交作业的信息详情??"}
},
works_list:{url:"{homework_id}/*",query,form:{page:1, search:"",work_status:[],course_group:[],teacher_comment:"",order:"update_time",limit:20,b_order:"desc",group_id:[]}, config}
},
main:{
first_stamp:{}
},
myshixuns:{
challenges:{},
repository: {url:"{identifier}/*",query,form:{path:null},config},
update_file:{url:"{identifier}/*",query,form:{path:null, content: null, evaluate:null, game_id:null},config}
},
paths:{url:"*/{subject_id}",query,
choose_course:{url:"{subject_id}/*", query},
right_banner:{url:"{subject_id}/*",query},
send_to_course:{url:"{subject_id}/*", query, config, form:{course_id:null, shixun_ids:null}},
},
schools:{
school_list:{query, form:{search:null}},
for_option:{query,form:{keyword:void 0}},
departments:{
for_option:{url:"../{school_id}/departments/*",query}
}
},
search:{query,form:{type:null, keyword:null, page:1, per_page:20}, data:{type:"subject, course, shixun, memo"}},
shixun_lists: { query, form:{type:"all", status:"published",keyword:"",diff:0,order:"desc",page:1,limit:10,sort:"wechat_myshixuns_count", no_jupyter:1}},
shixuns:{url:"*/{identifier}", query, res:{tpm_modified:"代码库是否有更新"},
batch_send_to_course:{query, config, form:{course_id:null, shixun_ids:null}},
challenges:{url:"{identifier}/*", query},
show_right:{url:""},
shixun_exec:{url:"{identifier}/*", query},
},
stages:{form:{subject_id:null},query},
student_works:{url:"*/{work_id}", query, form:{_:1, PUT:{description:null,attachment_ids:null},GET:{}},config:{method:"PUT"},disp:"提交作业",
comment_list:{url:"{work_id}/*",query},
supply_attachments:{url:"{work_id}/*",query},
edit:{url:"{work_id}/*", query, disp:"编辑已提交作业"},
},
tasks:{url:"*/{identifier}",query,
game_build:{url:"{identifier}/*",query,form:{first:1, resubmit:"", content_modified:null,sec_key:null}},
game_status:{url:"{identifier}/*",query,form:{port:-1, resubmit:"", time_out:false, sec_key:null}},
rep_content:{url:"{identifier}/*",query, form:{path:null, status:0, retry:0}},
reset_original_code:{url:"{identifier}/*", query, form:{path:null}, disp:"恢复初始代码", res:"{content}"},
sync_codes:{url:"{identifier}/*",query, res:{path:"newpath"}},
},
users:{
accounts: { url: "*/{user_id}", query, form:{_:1, GET:{school:1},PUT:{department_id:void 0, gender:void 0, identity:void 0, location:void 0, location_city:void 0, name: void 0, nickname: void 0, school_id:void 0, show_realname:void 0,student_id:void 0,technical_title:void 0},DELETE:{}},
avatar:{url:"{login}/*",query, form:{image:null} ,config:{method:"PUT"}},
authentication_apply:{url:"{user_id}/*",query,form:{name: null, gender: null,id_number: null, show_realname: null, attachment_ids: null},config},
email: { url: "{login}/*", query, config, form: { email: null, code: null } },
password: { url: "{login}/*", query, form:{old_password:null, password:null} ,config:{method:"PUT"}},
phone_bind:{url:"{login}/*", query,config, form:{phone:null, code:null}},
professional_auth_apply:{url:"{user_id}/*",query, form:{school_id:null, department_id:null,identity:null, extra:null, attachment_ids: null},config}
},
attendance: {query, config},
courses:{url:"{login}/*", query, form:{page:1, sort_by:"updated_at",sort_direction:"desc", per_page:10, category:void 0, status:void 0},category:["study","manage"],status:["processing","end"]},
get_user_info:{query,form:{school:1}},
homepage_info:{url:"{login}/*",query},
shixuns: { url: "{login}/*", query, form: {sort_by:"updated_at",category:void 0, page:1, sort_direction:"desc",per_page:16}},
subjects:{url:"{login}/*", query, form:{sort_by:"update_at", category:void 0, page:1, sort_direction:"desc"}},
system_update:{query:query},
/*{"system_update":true,"system_score":"为了给大家提供更优质的体验平台将于2020年3月24日13:20开始对系统进行升级。升级期间系统响应会有一定的延迟。系统拟于2020年3月24日13:30恢复正常。\r\n请大家知悉并提前做好教学安排。带来不便敬请谅解。","subject":" educoder升级服务通知","start_time":"2020-03-24T13:20:00.000+08:00","end_time":"2020-03-24T13:30:00.000+08:00"}*/
tidings: {query, form:{type:void 0,page:1,per_page:10}, data:"type:course,project,interaction,apply,notice"},
unread_message_info:{url:"{login}/*", query},
watch:{url:"{user_id}/*",query,config,disp:"关注用户,delete取消关注"}
},
weapps:{
attendances:{url:"*/{attendance_id}",query, disp:"获取单个签到信息"},
check_account: { query,form: {login: null, type: "login" }, config, data: { type: ["login"] } },
courses:{
attendances:{url:"{course_id}/*",query,form:{_:1, POST:{attendance_date:null,end_time:null,group_ids:void 0,mode:null, name:null, start_time:null},GET:{}},data:{POST:{mode:["QUICK","NUMBER","QRCODE"]}},
student_attendances: {url:"../{course_id}/attendances/*",form:{page:1, limit:10},query, disp:"获取学生的课堂签到列表"}
},
basic_info:{url:"{course_id}/*",query,disp:"课堂基本信息"},
course_activities:{url:"{course_id}/*",query,form:{page:1, limit:20}},
delete_course_teachers:{url:"{course_id}/*",query, form:{course_member_ids:null},config:{method:"DELETE"}},
students: {url:"{course_id}/*", query, form:{page:1, limit: void 0}},
teachers: {url:"{course_id}/*", query, form:{page:1, limit: void 0}},
},
course_member_attendances:{query, form:{_:1, GET:{page:1, limit: 10},POST:{attendance_id:null, attendance_mode:null, code:void 0}}, config, disp:"课堂成员签到",
update_status:{query, config, form:{attendance_id:null, attendance_status:null, course_id:null, user_id:null}}
},
challenges: {
is_play: {}
},
code_session: { query, form: {code: null, encrypted_data: null, iv: null }, config },
home: { query,form: { page: 1, limit: 15, category: "study"} },
paths:{query, form:{order:"myshixuns_count", sort:"desc", page:1, limit:10, discipline_id: void 0,sub_discipline_id: void 0}},
register:{query,form:{login:null,password:null, code:null}, config},
session: {query,form:{login:null, password:null},config},
course_stickies:{query, form:{course_id:null, category:null},config,
cancel_sticky: { query,form:{course_id:null,category:null}, config}
},
unbind_accounts: {query,config: { mothod: "GET"}},
verification_code:{query,form:{login:null, type:null, smscode:null},config},
},
}
export default apiConfig;
global.apiConfig = apiConfig;