代码修改后的版本,全部提交
This commit is contained in:
315
Mtxfw.VipSite/mobile/gmtb_log.html
Normal file
315
Mtxfw.VipSite/mobile/gmtb_log.html
Normal file
@@ -0,0 +1,315 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,initial-scale=1.0,width=device-width" />
|
||||
<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
|
||||
<title></title>
|
||||
<link rel="stylesheet" type="text/css" href="/css/api.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/css/content.css" />
|
||||
<script type="text/javascript" src="/scripts/jquery-3.4.1.min.js"></script>
|
||||
<script type="text/javascript" src="/scripts/jquery.cookie.min.js"></script>
|
||||
<!--<script type="text/javascript" src="/scripts/iscroll.js"></script>-->
|
||||
<script type="text/javascript" src="/script/main.js?t=0"></script>
|
||||
<script type="text/javascript" src="/layer/layer.js"></script>
|
||||
<script type="text/javascript" src="/Scripts/long.js"></script>
|
||||
<script type="text/javascript" src="/script/moment.js"></script>
|
||||
<script type="text/javascript" src="/script/area.js?t=0"></script>
|
||||
<script type="text/javascript" src="/script/api.js"></script>
|
||||
<style type="text/css">
|
||||
html, body {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#wrapper {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
.pullDown {
|
||||
position: absolute;
|
||||
top: -1.25rem;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
z-index: 100;
|
||||
text-align: center;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.pullUp {
|
||||
position: absolute;
|
||||
bottom: -1.25rem;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
z-index: 100;
|
||||
text-align: center;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.pullDown.loading, .pullUp.loading, .pullDown.refresh, .pullUp.refresh {
|
||||
display: block;
|
||||
}
|
||||
.uinput11 input, textarea {
|
||||
background-color: rgba(255, 255, 255, .2);
|
||||
border-radius: 0.5em;
|
||||
color: #fff;
|
||||
border: 0;
|
||||
}
|
||||
.dbtnbox {
|
||||
margin: 0 auto;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.dbtnbox input[type='button'] {
|
||||
height: 3.5em;
|
||||
line-height: 3.5em;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.uploadpic_btn {
|
||||
position: absolute;
|
||||
width: 5em;
|
||||
height: 5em;
|
||||
right: 0;
|
||||
top: 0;
|
||||
opacity: 0;
|
||||
filter: alpha(opacity=0);
|
||||
}
|
||||
|
||||
.layer {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 100;
|
||||
background: rgba(0, 0, 0, .5);
|
||||
display: none;
|
||||
}
|
||||
|
||||
.layer img {
|
||||
width: auto;
|
||||
max-width: 20em;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
var userId = null;
|
||||
var LoginId = null;
|
||||
var CartId = null;
|
||||
var opentimes = null;
|
||||
var sInterval0 = null;
|
||||
var t = 0;
|
||||
var title = "购买VIP记录";
|
||||
var myScroll = null;
|
||||
var pullDown = 1; // 下拉刷新避免多次执行
|
||||
var pullUp = 1; // 上拉加载避免多次执行
|
||||
var downHeight = 0;
|
||||
var upHeight = 0;
|
||||
var isload = true;//设置是否终止滚动加载
|
||||
var curScrollHeight = 0;//当前滚动位置
|
||||
var curCount = 1;//计数器,防止滚动时重复执行加载下一页
|
||||
|
||||
$(document).ready(function () {
|
||||
userId = getlocalStorage("userId");
|
||||
LoginId = getlocalStorage("LoginId");
|
||||
CartId = getlocalStorage("CartId");
|
||||
var tt = $.getUrlParam("t");
|
||||
if (tt != null) {
|
||||
t = tt;
|
||||
}
|
||||
if (t == 1) {
|
||||
title = "购买图标记录";
|
||||
}
|
||||
$("header h1").html(title);
|
||||
$(document).attr("title", title);
|
||||
$("title").html(title);
|
||||
|
||||
rdata(1);
|
||||
});
|
||||
|
||||
function rdata(ag) {
|
||||
userId = getlocalStorage("userId");
|
||||
LoginId = getlocalStorage("LoginId");
|
||||
var Start = $("#sysnew .databox").length;
|
||||
if (ag == 1) {
|
||||
Start = 0;
|
||||
}
|
||||
$(".ajaxLoader").removeClass("uhide");
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: "/apiajax.ashx",
|
||||
data: "&action=getgmtblist&ifweb=1&t="+t+"&Start=" + Start + "&userId=" + (userId != null ? userId : "") + "&LoginId=" + (LoginId != null ? LoginId : ""),
|
||||
dataType: "JSON",
|
||||
error: function (xhr, type) {
|
||||
tishi3("发生错误:" + JSON.stringify(xhr));
|
||||
},
|
||||
success: function (data) {
|
||||
|
||||
|
||||
if (data) {
|
||||
if (data.status == 1) {
|
||||
|
||||
var html = "";
|
||||
|
||||
if (data.data.length > 0) {
|
||||
var html = "";
|
||||
for (i = 0; i < data.data.length; i++) {
|
||||
var bifshow = 0;
|
||||
if (ag == 0) {
|
||||
if ($("#databox_" + data.data[i].id).length == 0) {
|
||||
bifshow = 1;
|
||||
}
|
||||
} else {
|
||||
bifshow = 1;
|
||||
}
|
||||
if (bifshow == 1) {
|
||||
|
||||
html += addMsg(data.data[i]);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
if (ag == 1 || ag == 2) {
|
||||
$("#sysnew").html(html);
|
||||
if (ag == 1) {
|
||||
onScroll0();
|
||||
}
|
||||
} else {
|
||||
$("#sysnew").append(html);
|
||||
}
|
||||
$(".more_box").html("");
|
||||
} else {
|
||||
if (Start > 0) {
|
||||
if (Start > 10) {
|
||||
$(".more_box").html("亲!找不到更多了");
|
||||
}
|
||||
} else {
|
||||
$('#sysnew').html("");
|
||||
$(".more_box").html("亲,暂无信息!");
|
||||
}
|
||||
}
|
||||
$(".ajaxLoader").addClass("uhide");
|
||||
} else {
|
||||
|
||||
tishi3(data.msg);
|
||||
$(".ajaxLoader").addClass("uhide");
|
||||
if (data.msg == "您未登录") {
|
||||
//$api.rmStorage("userId");
|
||||
//$api.rmStorage("LoginId");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
tishi3("网络错误!");
|
||||
$(".ajaxLoader").addClass("uhide");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
function addMsg(param) {
|
||||
|
||||
var html = '<div class="mybalance-item databox" id="databox_' + param.id + '">';
|
||||
html += '<div class="Total">';
|
||||
html += '<div><span>' + (param.Totalmoney == "0.00" ? "</span>购买VIP赠送" : "Ms:</span>" + param.Totalmoney) + '</div>';
|
||||
html += '<div class="right"><span>数量:</span>' + param.num + '张</div>';
|
||||
html += '</div>';
|
||||
html += '<div class="Total0">';
|
||||
html += '<div><span>类型:</span>' + param.type + '</div>';
|
||||
html += '<div class="right"><span>状态:</span>' + (param.seef == 1 ? "已失效" : "生效中") + '</div>';
|
||||
html += '</div>';
|
||||
html += '<div class="Total0">';
|
||||
html += '<div><span>时间:</span>' + judgetime(param.addtime) + '</div>';
|
||||
|
||||
html += '</div></div>';
|
||||
html += '<div class="clear"></div>';
|
||||
return html;
|
||||
}
|
||||
function onqlq(id) {
|
||||
onlink("yydd_lqcp.html?id=" + id);
|
||||
}
|
||||
function onScroll0() {
|
||||
isload = true;//设置是否终止滚动加载
|
||||
curScrollHeight = 0;//当前滚动位置
|
||||
curCount = 1;//计数器,防止滚动时重复执行加载下一页
|
||||
$("#wrapper").scroll(function () {
|
||||
var pageHeight = $("#sysnew").height();
|
||||
var showHeight = $("#wrapper").height();
|
||||
var scrollHeight = $("#wrapper").scrollTop();
|
||||
|
||||
if (curScrollHeight - scrollHeight < 10 && curScrollHeight > 0) {
|
||||
if (curCount == 1 && isload) {
|
||||
|
||||
rdata(0);
|
||||
}
|
||||
curCount++; //加载下一页后计数器+1
|
||||
}
|
||||
if (curScrollHeight < scrollHeight) {
|
||||
curScrollHeight = pageHeight - showHeight;//滚动到页面底部时,重设当前滚动位置
|
||||
curCount = 1;
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body class="wrap">
|
||||
<header>
|
||||
<div class="ub">
|
||||
<div class="nav-btn" id="nav-left" style=" margin:0; padding:0; padding-top:0.2em; min-width:3em" onclick="closeWin()">
|
||||
|
||||
<img src="../image/faifei.png" style="margin-left:0; margin-top:0em; height:1.2em;width:1.2em;" />
|
||||
|
||||
|
||||
</div>
|
||||
<h1 class="ub-f1">
|
||||
|
||||
</h1>
|
||||
<div class="nav-btn blue" id="nav-right" style="color:#fff; margin:0; padding:0; min-width:4em; padding-right:1em;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<section class="ub-f1" id="wrapper">
|
||||
|
||||
<div id="wrapper_content">
|
||||
|
||||
<p class="pullDown">下拉刷新...</p>
|
||||
<div class="clear"></div>
|
||||
<div class="mybalance-box" style="padding:0 0.8em;">
|
||||
<div id="sysnew" style="width:100%; padding-top:0.8em;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
<div class="more_box"></div>
|
||||
<div class="clear"></div>
|
||||
<p class="pullUp">上拉加载...</p>
|
||||
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
<div class="ajaxLoader ub ub-ac uhide" onclick="reload()">
|
||||
<div class="ub ub-ac ub-ver"><img src="image/load.gif" /><br>正在加载...</div>
|
||||
</div>
|
||||
<div class="layer" onclick='$(".layer").fadeOut();'>
|
||||
<img src="/images/jt.png" alt="">
|
||||
</div>
|
||||
</body>
|
||||
|
||||
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user