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