|
|
|
@ -4,18 +4,24 @@ const { jsonify } = require('../../utils/leancloudutils');
|
|
|
|
|
|
|
|
|
|
Page({
|
|
|
|
|
/**
|
|
|
|
|
* 页面的初始数据
|
|
|
|
|
页面的初始数据
|
|
|
|
|
students: 该课程所有的学生
|
|
|
|
|
元素student
|
|
|
|
|
student.username 学生的用户名,是唯一,就像微信号一样
|
|
|
|
|
student.name 学生的姓名
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
presence: null,
|
|
|
|
|
students: [],
|
|
|
|
|
present_students: [],
|
|
|
|
|
class: null,
|
|
|
|
|
data: {
|
|
|
|
|
present_students: [],
|
|
|
|
|
students: [],
|
|
|
|
|
unpresent_students: [],
|
|
|
|
|
class_name: "",
|
|
|
|
|
class_id: "",
|
|
|
|
|
//以下数据的同步由该代码文件实现,数据的呈现由classroom.wxml实现
|
|
|
|
|
present_students: [], // 出席的学生的用户名即上文提及的student.username
|
|
|
|
|
students: [], // 该课程所有的学生
|
|
|
|
|
unpresent_students: [], //没有出席的学生的用户名,不建议使用该数据,考虑弃用
|
|
|
|
|
class_name: "",//课程名称
|
|
|
|
|
class_id: "",//该课程的主键(编号)
|
|
|
|
|
},
|
|
|
|
|
fetch_present: function(){
|
|
|
|
|
var query = new AV.Query("Presence");
|
|
|
|
|