董佳音

修改管理员首页跳转页码和修改创建课堂开始终止时间

... ... @@ -61,6 +61,7 @@ class AdministratorApe extends Ape {
super();
this.classDateList = {};//课堂的所有数据
this.pageNo = 0;
this.presentInd = 0;
this.addEvent();
this.init();
}
... ... @@ -81,59 +82,60 @@ class AdministratorApe extends Ape {
}
//首页
_homePageHandler(){
this._pageNumBtnHandler(1);
this.presentInd = 1;
this._pageNumBtnHandler(this.presentInd);
}
//上页
_upPageHandler(){
if(this.presentInd >1){
this.presentInd--;
this._pageNumBtnHandler(this.presentInd);
}
}
//下页
_downPageHandler(){
if(this.presentInd < this.pageNo){
this.presentInd++;
this._pageNumBtnHandler(this.presentInd);
}
}
//尾页
_endPageHandler(){
this._pageNumBtnHandler(this.pageNo);
this.presentInd = this.pageNo;
this._pageNumBtnHandler(this.presentInd);
}
//指定页
_assignPageHandler(){
let inputVal = $('#classHandlerPageInfoInput').val();
if(parseInt){
if(parseInt(inputVal) <= this.pageNo || parseInt(inputVal) >= 1 ){
this._pageNumBtnHandler(parseInt(inputVal));
}
}
//点击翻页
_pageNumBtnHandler(ind){
let _url = ClassDataProxy.locationProtocol + ClassDataProxy.locationProt + '/meeting/getMeeting';
// let _ele = $(evt.target);
let that = this;
if(this.pageNo > 2 ){
// _ele.addClass('pageNumBtnCheck').siblings().removeClass('pageNumBtnCheck');
$.ajax({
type: "POST",
url: _url,
data:{siteId:'markettest'},
headers: {'page':ind,
'token':'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IlhXQnJlRU00T0swYTVqUUIyUTFicGtObHlxOUFWbXZkIiwibmFtZSI6ImFkbWluIiwiY29kZSI6MSwiaWF0IjoxNTAzNDUxODU0LCJleHAiOjIyODEwNTE4NTR9.3kTVzKd_jbP7l69nxOpNaFeSjVnnjZkagYMzRB8fjNo',
},
success:function(_data){
if(_data != 200 ){
// loger.warn(_data.data.msg)
return;
}
that.classDateList = _data.returnData.data;
that._gainClassData(_data.returnData.data);
loger.log(_data,'成功')
},
error:function(error){
console.log(error,'失败')
$.ajax({
type: "POST",
url: _url,
data:{siteId:'markettest'},
headers: {'page':ind,
type:8,
'token':'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IlhXQnJlRU00T0swYTVqUUIyUTFicGtObHlxOUFWbXZkIiwibmFtZSI6ImFkbWluIiwiY29kZSI6MSwiaWF0IjoxNTAzNDUxODU0LCJleHAiOjIyODEwNTE4NTR9.3kTVzKd_jbP7l69nxOpNaFeSjVnnjZkagYMzRB8fjNo',
},
success:function(_data){
if(_data.code != 200 ){
loger.warn(_data.returnData.data.msg)
}
})
}else{
return;
}
that.classDateList = _data.returnData.data;
that._gainClassData(_data.returnData.data);
},
error:function(error){
console.log(error,'失败')
}
})
}
detailPage(){
let _url = ClassDataProxy.locationProtocol + ClassDataProxy.locationProt + '/meeting/getMeeting';
... ...
... ... @@ -25,7 +25,7 @@ class CreateClassApe extends Ape {
//判断列表在右侧时取消边距
this._judgeListPlace();
$('#collectYes').hide();
//默认显示当前时间戳
this._showPresentTime();
$('#createClassBtn').on('click',this._createClassBtnHandler.bind(this));
... ... @@ -53,7 +53,10 @@ class CreateClassApe extends Ape {
let month = (newDate.getMonth()+1)<10?'0'+(newDate.getMonth()+1):(newDate.getMonth()+1);
let date = newDate.getDate()<10?'0'+newDate.getDate():newDate.getDate();
let timer = newDate.getFullYear() + '-'+ month +'-'+ date;
let hours = newDate.getHours();
$('.createClassTime1').text(timer);
$("#meeting_starthour").find("option[value = '"+hours+"']").attr("selected","selected");
$('#meeting_endhour').find("option[value = '"+ (hours + 2) +"']").attr("selected","selected");
}
_judgeListPlace(){
let i=(i%4);
... ...