You've already forked qlg.frontend
添加助购预获详情页面
This commit is contained in:
59
js/helpGet.js
Normal file
59
js/helpGet.js
Normal file
@ -0,0 +1,59 @@
|
||||
var pageSize = 10;
|
||||
var count = 1;
|
||||
var isLoading = false;
|
||||
mui.plusReady(function() {
|
||||
|
||||
var self = plus.webview.currentWebview();
|
||||
|
||||
getvoucherList(count, pageSize);
|
||||
|
||||
function getvoucherList(count, pageSize) {
|
||||
if (true == isLoading) return;
|
||||
isLoading = true;
|
||||
JZL.ajax(qlgUrl('app/Uservouchers/getHelpGet'), {
|
||||
page: count,
|
||||
perPage: pageSize,
|
||||
}, function(data) { //服务器返回响应,根据响应结果,分析是否登录成功;
|
||||
// console.log(data);
|
||||
var data = toJson(data);
|
||||
if (data.status == 1) {
|
||||
data = data.data;
|
||||
if (data.Rows == '') {
|
||||
$('.con').append(
|
||||
'<p style="float: left;width: 100%;text-align: center;padding-bottom: 9px;">没有更多数据</p>');
|
||||
return;
|
||||
}
|
||||
var html = ''
|
||||
$.each(data.Rows, function() {
|
||||
html += '<div class="row shadown_wai"><div class="num">' + this.helpGet +
|
||||
'</div><div class="info"><div class="info_">' + this.remark + '</div><div class="time">' + this.createTime +
|
||||
'</div><div class="valid"></div></div></div>';
|
||||
})
|
||||
if (count == 1) {
|
||||
$('.con').html(html);
|
||||
} else {
|
||||
$('.con').append(html);
|
||||
}
|
||||
} else {
|
||||
mui.alert(data.msg)
|
||||
}
|
||||
isLoading = false;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
document.querySelector('.mui-scroll-wrapper').addEventListener('scroll', function(e) {
|
||||
if (e.cancelable) {
|
||||
// 判断默认行为是否已经被禁用
|
||||
if (!e.defaultPrevented) {
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
if (scroll.y == scroll.maxScrollY) {
|
||||
if (isLoading == false) {
|
||||
count++;
|
||||
getvoucherList(count, pageSize)
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
@ -28,6 +28,9 @@ mui.plusReady(function(){
|
||||
data_expect: '1'
|
||||
})
|
||||
})
|
||||
$(".ZGYH").on("tap",function(){
|
||||
JZL.openWindow("helpGet.html", "helpGet.html")
|
||||
})
|
||||
$("#myHelpSaleOrder").on("tap", function(){
|
||||
mui.openWindow({
|
||||
url: 'indent.html',
|
||||
|
Reference in New Issue
Block a user