From 72737d8376617178d463d594f355b140ac580664 Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Wed, 23 Oct 2019 21:29:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=A9=E8=B4=AD=E9=A2=84?= =?UTF-8?q?=E8=8E=B7=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/helpGet.js | 59 ++++++++++++++++++++++++++++++++++++++ js/my_help_sale.js | 3 ++ templete/helpGet.html | 53 ++++++++++++++++++++++++++++++++++ templete/my_help_sale.html | 4 +-- 4 files changed, 117 insertions(+), 2 deletions(-) create mode 100644 js/helpGet.js create mode 100644 templete/helpGet.html diff --git a/js/helpGet.js b/js/helpGet.js new file mode 100644 index 0000000..1e1c0fd --- /dev/null +++ b/js/helpGet.js @@ -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( + '

没有更多数据

'); + return; + } + var html = '' + $.each(data.Rows, function() { + html += '
' + this.helpGet + + '
' + this.remark + '
' + this.createTime + + '
'; + }) + 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) + } + } + }) +}) diff --git a/js/my_help_sale.js b/js/my_help_sale.js index b349683..9a14fa1 100644 --- a/js/my_help_sale.js +++ b/js/my_help_sale.js @@ -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', diff --git a/templete/helpGet.html b/templete/helpGet.html new file mode 100644 index 0000000..9163dda --- /dev/null +++ b/templete/helpGet.html @@ -0,0 +1,53 @@ + + + + + + + + + + + + +
+
+ +

助购明细

+
+ +
+
+
+
+ +
+
+
+
+
+ + + + + + + diff --git a/templete/my_help_sale.html b/templete/my_help_sale.html index b1d852a..f180841 100644 --- a/templete/my_help_sale.html +++ b/templete/my_help_sale.html @@ -22,9 +22,9 @@ class="r2">我家全部订单
+ class="r2" id="preGetCouponCount" style="color: #000000;">
-
助购户助购预获 +
助购户助购预获 助购去