初始加载上拉正常,表单中增加选择条件提交需要重新加载页面,上拉无反应,贴代码
function pullupRefresh() {
if (first) {
alert('第一次');
if ('请选择日期' == pb1.innerText && '请选择日期' == pb2.innerText && pb3.options[4].selected) {
//首页显示本日的预警信息
sendStr = "IPAddress=" + IP + "&TradeCode=1607&PageCount=" + entry + "&PageIndex=1&Opt=S";
loadXMLDoc(sendStr, 3);
first = false;
} else {
sendStr = "IPAddress=" + IP + "&TradeCode=1607&PageCount=" + entry + "&PageIndex=1&Round=" + pb3.value + "&Start=" + clTime(pb1.innerText) + "&End=" + clTime(pb2.innerText) + "&Opt=ST";
loadXMLDoc(sendStr, 3);
first = false;
}
} else {
pageIndex1 = pageIndex1 + 1;
alert('第' + pageIndex1 + '次');
if ('请选择日期' == pb1.innerText && '请选择日期' == pb2.innerText && pb3.options[4].selected) {
sendStr = "IPAddress=" + IP + "&TradeCode=1607&PageCount=" + entry + "&PageIndex=" + pageIndex1 + "&Opt=S";
//alert("1" + sendStr);
loadXMLDoc(sendStr, 1);
} else {
sendStr = "IPAddress=" + IP + "&TradeCode=1607&PageCount=" + entry + "&PageIndex=1&Round=" + pb3.value + "&Start=" + clTime(pb1.innerText) + "&End=" + clTime(pb2.innerText) + "&Opt=ST";
//alert(2 + sendStr);
loadXMLDoc(sendStr, 1);
}
}
}
if ('请选择日期' == pb1.innerText && '请选择日期' == pb2.innerText && pb3.options[4].selected) {
//sendStr = "IPAddress=" + IP + "&TradeCode=1607&PageCount=" + entry + "&PageIndex=" + pageIndex1 + "&Opt=S";
//alert('默认' + sendStr);
mui('#topPopover').popover('toggle');
plus.nativeUI.showWaiting();
first = true;
setTimeout(function() {
mui('#pullrefresh').pullRefresh().pullupLoading();
}, 300);
}
1 个回复
DCloud_UNI_CHB
下面第2段代码在什么情况下执行?