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.
26 lines
695 B
26 lines
695 B
const app = getApp();
|
|
Component({
|
|
properties: {
|
|
|
|
},
|
|
data: {
|
|
|
|
},
|
|
methods: {
|
|
answer_null_question: function ({ detail: { value }, currentTarget: { dataset } }) {
|
|
console.log("answer_main_question");
|
|
console.log(value);
|
|
console.log(dataset);
|
|
app.api("exercise_questions.exercise_answers")({ question_id: dataset.question_id, exercise_choice_id: dataset.exercise_choice_id, answer_text: value })
|
|
.then(res => { console.log("answer_main_question"); console.log(res); })
|
|
.catch(error => {
|
|
console.error(error);
|
|
wx.showToast({
|
|
title: error.toString(),
|
|
icon: "none"
|
|
})
|
|
});
|
|
},
|
|
}
|
|
})
|