var vouchersType = '', isExpected = ''; var data_href = ''; var pageSize = 10; var count = 1; var isLoading = false; mui.plusReady(function() { var self = plus.webview.currentWebview(); vouchersType = self.data_type; isExpected = self.data_expect; data_href = self.data_href; getvoucherList(count, pageSize); switch (data_href) { case "expectedProduct": $('.title').html('预获产品券'); break; case "expectedCoupons": $('.title').text('预获优惠券'); break; case "expectedWang": $('.title').text('预获旺旺券'); break case "coupons": $('.title').text('已获优惠券'); break case "product": $('.title').text('已获产品券'); break case "wang": $('.title').text('已获旺旺券'); break } function getvoucherList(count, pageSize) { if (true == isLoading) return; isLoading = true; JZL.ajax(qlgUrl('app/Uservouchers/getVouchers'), { page: count, perPage: pageSize, vouchersType: vouchersType, isExpected: isExpected, }, function(data) { //服务器返回响应,根据响应结果,分析是否登录成功; // console.log(data); var data = toJson(data); if (data.status == 1) { data = data.data; if (data.Rows == '') { $('.con').append( '
没有更多数据
'); return; } var html = '' $.each(data.Rows, function() { html += '