董佳音

动态创建管理员列表

... ... @@ -60,6 +60,7 @@ class AdministratorApe extends Ape {
constructor() {
super();
this.classDateList = {};//课堂的所有数据
this.pageNo = 0;
this.addEvent();
this.init();
}
... ... @@ -80,7 +81,7 @@ class AdministratorApe extends Ape {
}
//首页
_homePageHandler(){
this._pageNumBtnHandler(1);
}
//上页
_upPageHandler(){
... ... @@ -92,7 +93,7 @@ class AdministratorApe extends Ape {
}
//尾页
_endPageHandler(){
this._pageNumBtnHandler(this.pageNo);
}
//指定页
_assignPageHandler(){
... ... @@ -103,27 +104,27 @@ class AdministratorApe extends Ape {
}
//点击翻页
_pageNumBtnHandler(evt){
_pageNumBtnHandler(ind){
let _url = ClassDataProxy.locationProtocol + ClassDataProxy.locationProt + '/meeting/getMeeting';
let _ele = $(evt.target);
// let _ele = $(evt.target);
let that = this;
if(_ele.siblings().length > 1 ){
if(this.pageNo > 2 ){
// _ele.addClass('pageNumBtnCheck').siblings().removeClass('pageNumBtnCheck');
$.ajax({
type: "POST",
url: _url,
headers: {'page':_ele.text(),
siteId:'markettest',
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._classDateContent(that.classDateList);
that._gainClassData(_data.returnData.data);
loger.log(_data,'成功')
},
error:function(error){
... ... @@ -164,6 +165,7 @@ class AdministratorApe extends Ape {
let page = _data.page;
let pageno = _data.pageno;
let _dataList = _data.meetingInfo;
this.pageNo = pageno;
$('#classHandlerPageMsg').html('第'+page+'页/共'+pageno+'页,有'+count+'个记录');
courseContent.append(adminListTit);
if(_dataList){
... ...
... ... @@ -164,10 +164,11 @@ class CreateClassApe extends Ape {
let dateList = this.classDateList;
let _url = ClassDataProxy.locationProtocol + ClassDataProxy.locationProt + '/meeting/createMeeting';
let userName = window.localStorage.getItem('loginName');
let userType = window.localStorage.getItem('userType');
dateList.siteId = 'markettest';
dateList.userId = '123';
dateList.userName = userName;
dateList.userType = 1;
dateList.userType = userType;
let that = this;
$.ajax({
... ...
... ... @@ -232,6 +232,7 @@ class LoginOrRegister extends Ape {
that.successLogin(_data);
window.localStorage.setItem("loginName",_name.value);
window.localStorage.setItem("password", _passWord.value);
window.localStorage.setItem("userType", _data.returnData.data.userType);
window.localStorage.setItem("token",_data.returnData.data.token);
}
},
... ...