添加助购预获详情页面

This commit is contained in:
Jerry Yan 2019-10-23 21:29:32 +08:00
parent 8baf66a8b6
commit 72737d8376
4 changed files with 117 additions and 2 deletions

59
js/helpGet.js Normal file
View 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)
}
}
})
})

View File

@ -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',

53
templete/helpGet.html Normal file
View File

@ -0,0 +1,53 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
<title></title>
<link rel="stylesheet" type="text/css" href="../css/mui.min.css" />
</head>
<body style="visibility:hidden;">
<div class="header">
<div class="header_con">
<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
<p class="title">助购明细</p>
</div>
</div>
<div class="mui-scroll-wrapper scroll_out_t" id="pullrefresh">
<div class="mui-scroll clearfix">
<div class="sx" id="pullrefresh">
<!-- 刷新 -->
</div>
<div class="con" style="transform: translateY(20px);">
</div>
</div>
</div>
</body>
<script src="../js/mui.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../js/jquery-3.2.1.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
mui.plusReady(function() {
var element;
var parent = document.body;
element = document.createElement('script');
element.src = localStorage.getItem("jsUrl") + 'common.js?ver=' + localStorage.getItem('version');
parent.appendChild(element);
element.onload = function() {
var style = [JZL.getCssUrl('global.css'), JZL.getCssUrl('header.css'), JZL.getCssUrl('vouchers.css')];
JZL.css_init(style);
var script = [JZL.getJsUrl("helpGet.js")];
JZL.js_init(script);
setTimeout(function() {
parent.style.visibility = "visible";
}, 100);
};
})
</script>
</html>

View File

@ -22,9 +22,9 @@
class="r2">我家全部订单</span><img class="youjiantou" src="../img/youjiantou.png" /></div>
<div class="row shadown_wai" id="preGetCoupon" style="margin-top: 6px;"><img class="img" src="../img/setting_user1.png" /><span class="r1" id="userName"></span><span
class="r2" id="preGetCouponCount" style="font-size: 90%;"></span><img class="youjiantou" src="../img/youjiantou.png" /></div>
class="r2" id="preGetCouponCount" style="color: #000000;"></span><img class="youjiantou" src="../img/youjiantou.png" /></div>
<div id="helpSaleTable">
<div class="row helpSaleTableRow shadown_wai"><span class="c1">助购户</span><span class="c2">助购预获</span>
<div class="row helpSaleTableRow shadown_wai"><span class="c1">助购户</span><span class="c2 ZGYH">助购预获</span>
<span class="c3 btn" id="toHelpSale">助购去</span></div>
</div>
</div>