前端分页刷新(一行一行刷新,保留之前的数据)

阿里云国内75折 回扣 微信号:monov8
阿里云国际,腾讯云国际,低至75折。AWS 93折 免费开户实名账号 代冲值 优惠多多 微信号:monov8 飞机:@monov6


data() {
return {
date: new Date().format('yyyy-MM-dd hh:mm:ss'),
data1List: [],
data1Query: {
pageNum: 0,
pageSize: 7,//一行7个
total: 0,
},

}
},
methods: {
getData1() {
http.post(api.RTM1_GET_DATA9, {
workshop: this.workshop == '整厂' ? null : this.workshop,
adminId: uni.getStorageSync('user').id,
startIndex: this.data1Query.pageNum * 7,
pageSize: 28,//整个页面28个(一般要多7个)
}, data => {
this.data1List = data.data;
if (data.data.length <= 21) {
this.data1Query.pageNum = 0;
}
});
},

getData() {
this.getData1();
}
},
onLoad(param) {
this.getData();
var count = 0;
this.mTimer = setInterval(() => {
count++;
this.date = new Date().format('yyyy-MM-dd hh:mm:ss');
if (count % 5 == 0) {
this.getData();
if (count % 30 == 0) {
this.data1Query.pageNum++;
}
}
}, 1000);
},
@RequestMapping(value = "/getData9")
public BaseResult<?> getData9(Long adminId, String workshop, Integer startIndex, Integer pageSize) {
List<JSONObject> list = tbDeviceMapper.find22List(adminId, workshop, HiKariCloudUtils.getTodayDate(), startIndex, pageSize);
BaseResult<List> result = BaseResult.result(List.class);
result.setData(list);
return result;
}
LIMIT #{startIndex},#{pageSize}


阿里云国内75折 回扣 微信号:monov8
阿里云国际,腾讯云国际,低至75折。AWS 93折 免费开户实名账号 代冲值 优惠多多 微信号:monov8 飞机:@monov6