|
|
@ -32,7 +32,7 @@ Page({
|
|
|
|
},
|
|
|
|
},
|
|
|
|
enter_setting: function(event){
|
|
|
|
enter_setting: function(event){
|
|
|
|
wx.navigateTo({
|
|
|
|
wx.navigateTo({
|
|
|
|
url: '../classsetting/classsetting?class_id='+this.data.class_id+"&teacher_id="+this.data.teacher.objectId,
|
|
|
|
url: '../classsetting/classsetting?class_id='+this.data.class_id+"&teacher_id="+this.data.teacher.objectId+"&classname="+this.data.class_name,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
@ -130,7 +130,7 @@ Page({
|
|
|
|
return presences;
|
|
|
|
return presences;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
fetch_class: function(class_id){
|
|
|
|
pull_class: function(class_id){
|
|
|
|
query = new AV.Query("Class_");
|
|
|
|
query = new AV.Query("Class_");
|
|
|
|
query.equalTo("objectId", class_id);
|
|
|
|
query.equalTo("objectId", class_id);
|
|
|
|
query.include("teacher");
|
|
|
|
query.include("teacher");
|
|
|
@ -138,7 +138,7 @@ Page({
|
|
|
|
//console.log(this.class);
|
|
|
|
//console.log(this.class);
|
|
|
|
this.class = classes[0];
|
|
|
|
this.class = classes[0];
|
|
|
|
teacher = this.class.get("teacher");
|
|
|
|
teacher = this.class.get("teacher");
|
|
|
|
console.log("fetch_class");
|
|
|
|
console.log("pull_class");
|
|
|
|
console.log(teacher);
|
|
|
|
console.log(teacher);
|
|
|
|
teacher = teacher.toJSON();
|
|
|
|
teacher = teacher.toJSON();
|
|
|
|
// if(typeof teacher.toJson == "function"){
|
|
|
|
// if(typeof teacher.toJson == "function"){
|
|
|
@ -164,7 +164,7 @@ Page({
|
|
|
|
})
|
|
|
|
})
|
|
|
|
this.setData({current_user: AV.User.current().toJSON()});
|
|
|
|
this.setData({current_user: AV.User.current().toJSON()});
|
|
|
|
this.class_id = options.class_id;
|
|
|
|
this.class_id = options.class_id;
|
|
|
|
this.fetch_class.bind(this)(this.class_id)
|
|
|
|
this.pull_class.bind(this)(this.class_id)
|
|
|
|
.then(()=>{
|
|
|
|
.then(()=>{
|
|
|
|
wx.setNavigationBarTitle({
|
|
|
|
wx.setNavigationBarTitle({
|
|
|
|
title: this.data.class_name,
|
|
|
|
title: this.data.class_name,
|
|
|
@ -219,6 +219,13 @@ Page({
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
onPullDownRefresh: function () {
|
|
|
|
onPullDownRefresh: function () {
|
|
|
|
this.pull_presence.bind(this)();
|
|
|
|
this.pull_presence.bind(this)();
|
|
|
|
|
|
|
|
this.pull_class.bind(this)(this.class_id)
|
|
|
|
|
|
|
|
.then(() => {
|
|
|
|
|
|
|
|
wx.setNavigationBarTitle({
|
|
|
|
|
|
|
|
title: this.data.class_name,
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|