mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-06-12 10:00:56 +08:00
优化代码
This commit is contained in:
parent
9b188b57be
commit
92e7f38d28
@ -72,7 +72,7 @@
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
_loadFloors:function(){
|
_loadFloors:function(){
|
||||||
var param = {
|
let param = {
|
||||||
params: {
|
params: {
|
||||||
page:1,
|
page:1,
|
||||||
row:100,
|
row:100,
|
||||||
@ -84,17 +84,14 @@
|
|||||||
vc.http.apiGet('/floor.queryFloors',
|
vc.http.apiGet('/floor.queryFloors',
|
||||||
param,
|
param,
|
||||||
function(json, res) {
|
function(json, res) {
|
||||||
var listFloorData = JSON.parse(json);
|
let listFloorData = JSON.parse(json);
|
||||||
|
|
||||||
vc.component.listFloorInfo.total = listFloorData.total;
|
let _floors = listFloorData.apiFloorDataVoList;
|
||||||
vc.component.listFloorInfo.records = listFloorData.records;
|
let _floorIds = [];
|
||||||
vc.component.listFloorInfo.floors = listFloorData.apiFloorDataVoList;
|
for(let _floorIndex = 0; _floorIndex < _floors.length;_floorIndex ++){
|
||||||
|
_floorIds.push(_floors[_floorIndex].floorId);
|
||||||
|
}
|
||||||
|
|
||||||
vc.emit('pagination', 'init', {
|
|
||||||
total: vc.component.listFloorInfo.records,
|
|
||||||
dataCount: vc.component.listFloorInfo.total,
|
|
||||||
currentPage: _page
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
function(errInfo, error) {
|
function(errInfo, error) {
|
||||||
console.log('请求失败处理');
|
console.log('请求失败处理');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user