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.
28 lines
729 B
28 lines
729 B
const app = getApp();
|
|
Page({
|
|
|
|
data: {
|
|
|
|
},
|
|
create_question: function({detail:{value}}){
|
|
console.log(value);
|
|
let data = {
|
|
question_title:value.question_title,
|
|
question_type:0,
|
|
question_score:5,
|
|
question_choices:[value.question_choices_0, value.question_choices_1, value.question_choices_2, value.question_choices_3],
|
|
standard_answers:value.standard_answers
|
|
}
|
|
let exercise_bank_id = this.exercise_id;
|
|
app.api("exercises.exercise_questions")({exercise_bank_id,...data})
|
|
.then(res=>{
|
|
console.log(res);
|
|
wx.navigateBack({
|
|
delta: 1
|
|
})
|
|
}).catch(app.showError)
|
|
},
|
|
onLoad: function (options) {
|
|
this.exercise_id = options.exercise_id;
|
|
}
|
|
}) |