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.
31 lines
554 B
31 lines
554 B
5 years ago
|
const app = getApp();
|
||
|
Component({
|
||
|
properties: {
|
||
|
course_id: {
|
||
|
type: Number
|
||
|
},
|
||
|
id_: {
|
||
|
type: Number
|
||
|
},
|
||
|
refresh: {
|
||
|
type: Boolean,
|
||
|
observer: function (v) {
|
||
|
if (v) {
|
||
|
this.refresh({refresh:1});
|
||
|
this.setData({ refresh: false });
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
data: {
|
||
|
|
||
|
},
|
||
|
methods: {
|
||
|
async refresh({refresh=1}){
|
||
|
let {course_id} = this.data;
|
||
|
let data = await app.api("weapps.courses.attendances.student_attendances")({course_id});
|
||
|
this.setData(data);
|
||
|
}
|
||
|
}
|
||
|
})
|