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.
34 lines
796 B
34 lines
796 B
const app = getApp();
|
|
Component({
|
|
properties: {
|
|
data:Object,
|
|
course_id:Number
|
|
},
|
|
data: {
|
|
eduImgDir: global.config.eduImgDir
|
|
},
|
|
methods: {
|
|
review_application({approval}){
|
|
let {application_id, user_id} = this.data.data;
|
|
let {course_id} = this.data;
|
|
app.api("courses.teacher_application_review")({course_id, approval, application_id, user_id})
|
|
.then(res=>{
|
|
this.triggerEvent("review",{},{bubbles:true});
|
|
;
|
|
res.message = approval==1?'已同意':approval==2?'已拒绝':res.message;
|
|
app.showMsg(res);
|
|
}).catch(e=>{
|
|
app.showError(e);
|
|
})
|
|
},
|
|
approval(e){
|
|
;
|
|
this.review_application({approval:1});
|
|
},
|
|
deny(e){
|
|
;
|
|
this.review_application({approval:2});
|
|
}
|
|
}
|
|
})
|