Files
g.hnyhua.cn/Mtxfw.VipSite/mobile/ggjf.html
2026-02-07 15:48:27 +08:00

447 lines
17 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!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-2.0.2.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/api.js"></script>
<style type="text/css">
html, body {
overflow: hidden;
background-color: #051E54;
}
input::-webkit-input-placeholder, textarea::-webkit-input-placeholder {
color: #ccc;
}
.mybalance-item {
float: none;
}
.mybalance-item div {
float: none;
}
#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;
}
.mydata_box0 {
display: flex;
flex-direction: row;
align-items: center;
width: 100%;
height: 5em;
background-color: #fff;
}
.mydata_box0 div {
margin-top: 0.5em;
width: 50%;
height: 3em;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
color: #000;
box-sizing: border-box;
}
.mydata_box0.ktxtime div {
margin-top: 0.5em;
width: 25%;
height: 3em;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
color: #000;
box-sizing: border-box;
}
/*.button_box div#czbutton {
width: 97%;
margin-right: 0;
}*/
.jhdyb_box {
border-top: 1px solid #20A7A3;
}
.datatable {
border-top: 0;
}
.datatable ul li {
border-bottom: 1px solid #20A7A3;
color: #fff;
}
.datatable ul.tit li {
color: #fff;
}
.tab {
border-top: 0;
border-bottom: 1px solid #20A7A3;
}
.tab a {
display: block;
color: #E1FFFF;
}
.tab a.on {
color: #23B6B2;
}
</style>
<script type="text/javascript">
var userId = null;
var LoginId = null;
var CartId = null;
var t = 0;
var opentimes = null;
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");
$(".tab a").on("click", function () {
var num = $(this).index();
$(this).addClass("on").siblings().removeClass("on");
t = num;
if (num == 1) {
$(".datatable").addClass("uhide");
$("#sysnew0").removeClass("uhide");
} else {
$(".datatable").removeClass("uhide");
$("#sysnew0").addClass("uhide");
}
rdata(1);
$("#wrapper").animate({ scrollTop: 0 }, 500);
});
rdata(1);
});
function onScroll0() {
isload = true;//设置是否终止滚动加载
curScrollHeight = 0;//当前滚动位置
curCount = 1;//计数器,防止滚动时重复执行加载下一页
$("#wrapper").scroll(function () {
var pageHeight = $("body").height();
var showHeight = $("#wrapper").height();
var scrollHeight = $("#wrapper").scrollTop();
if (curScrollHeight - scrollHeight < 30 && curScrollHeight > 0) {
if (curCount == 1 && isload) {
rdata(0);
}
curCount++; //加载下一页后计数器+1
}
if (curScrollHeight < scrollHeight) {
curScrollHeight = pageHeight - showHeight;//滚动到页面底部时,重设当前滚动位置
curCount = 1;
}
});
}
function rdata(ag) {
userId = getlocalStorage("userId");
LoginId = getlocalStorage("LoginId");
var userinfo = getlocalStorage("userinfo");
var userdata = JSON.parse(userinfo);
var TXEnable = userdata.YJCSEnable;
if (TXEnable == 1) {
$(".jhdyb_box").addClass("uhide");
} else {
$(".jhdyb_box").removeClass("uhide");
}
var Start = $("#sysnew .databox").length;
$(".more_box").html("");
if (ag == 1) {
Start = 0;
}
$(".ajaxLoader").removeClass("uhide");
$.ajax({
type: 'GET',
url: "/apiajax.ashx",
data: "&action=" + (t == 1 ? "getbilllist&t=6" :"getjhtyblist")+"&ifweb=1&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 ($("#sysnew" + (t == 1 ? "0" : "") + " #databox_" + data.data[i].id).length == 0) {
bifshow = 1;
}
} else {
bifshow = 1;
}
if (bifshow == 1) {
if (t == 1) {
html += addMsg0(data.data[i]);
} else {
html += addMsg(data.data[i]);
}
}
}
if (ag == 1 || ag == 2) {
$("#sysnew"+(t == 1 ? "0":"")).html(html);
if (ag == 1) {
onScroll0();
}
} else {
$("#sysnew" + (t == 1 ? "0" : "")).append(html);
}
} else {
if (Start > 0) {
if (Start > 10) {
$(".more_box").html("亲!找不到更多了");
isload = false;
}
} else {
$("#sysnew" + (t == 1 ? "0" : "")).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 = '<li class="databox" id="databox_' + param.id + '">';
html += '<span>' + param.name + '</span>';
html += '<span>' + param.tel + '</span>';
html += '<span>' + judgetime(param.date) + '</span>';
html += '</li>';
html += '<div class="clear"></div>';
return html;
}
function addMsg0(param) {
var html = '<div class="mybalance-item databox" id="databox_' + param.id + '">';
html += '<div class="Total">';
html += '<div><span>' + param.Addmoney + '</span></div>';
html += '<div class="right">' + judgetime(param.addtime) + '</div>';
html += '</div>';
html += '<div class="Total0">';
html += '<div>' + param.BZContent + '</div>';
html += '</div>';
html += '</div>';
html += '<div class="clear"></div>';
return html;
}
function onjhtyb() {
var czuserid = fTrim($('#txtuserid').val());
var ifb = true;
if (ifb) {
if (czuserid == "") {
tishi3("KDS账户不能为空");
$("#txtuserid").focus();
ifb = false;
}
}
if (ifb) {
var _index = layer.prompt({ title: '请输入安全密码,并确定下单', formType: 1 }, function (pass) {
if (pass == "") {
tishi3("请输入您的安全密码");
return false;
}
layer.close(_index);
if (ifb) {
if ($("#jhbutton").html() != "激活体验包") {
ifb = false;
}
}
if (ifb) {
$("#jhbutton").html("激活中...");
try {
var datas = {
action: "jhtyb",
userId: userId,
LoginId: LoginId,
czuserid: czuserid,
pwd: pass
};
$.ajax({
type: 'POST',
url: "/apiajax.ashx?ifweb=1",
data: datas,
dataType: "json",
error: function (xhr) {
tishi3("发生错误:" + JSON.stringify(xhr));
},
success: function (data) {
$("#jhbutton").html("激活体验包");
if (data) {
if (data.status == 1) {
tishi3(data.msg);
$('#txtuserid').val("");
setlocalStorage("userinfo", JSON.stringify(data.userInfo));
rdata(1);
setlocalStorage("myrefresh", 1);
setlocalStorage("indexrefresh", 1);
} if (data.status == 0) {
tishi3(data.msg);
if (data.msg == "请先修改安全密码!") {
var closeInterval = setInterval(function () {
onlink("editpwd.html?t=1");
layer.closeAll();
clearInterval(closeInterval);
}, 500);
}
if (data.msg == "请先实名认证!") {
var closeInterval = setInterval(function () {
onlink("mydata.html");
layer.closeAll();
clearInterval(closeInterval);
}, 500);
}
}
} else {
tishi3('网络异常,请稍后重试');
}
}
});
} catch (err) {
tishi3(err);
}
}
});
}
}
</script>
</head>
<body class="wrap">
<header class="renwuheader">
<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=" margin:0; padding:0; min-width:3em; padding-right:1em;">
</div>
</div>
</header>
<section class="ub-f1" id="wrapper">
<div class="clear"></div>
<div class="button_box">
<div id="zzbutton" class="mybtn0" onclick="onloginlink('dhggb.html')">兑换任务包</div>
<div id="zhbutton" class="mybtn0" onclick="onloginlink('zhuanhuan.html?t=2')">划转KSD</div>
</div>
<div class="clear"></div>
<div class="jhdyb_box">
<div class="cztext"><input id="txtuserid" type="text" placeholder="请输入会员账号" style="width:100%" /></div>
<div id="jhbutton" class="mybtn" onclick="onjhtyb();">激活体验包</div>
</div>
<div class="clear"></div>
<div class="tab flex-around">
<a class="on">激活列表</a>
<a>积分明细</a>
</div>
<div class="ub ub-ver datatable" style="box-sizing:border-box;"><ul class="tit"><li><span>姓名</span><span class="zhanghao">账号</span><span>日期</span></li></ul><ul id="sysnew"></ul></div>
<div class="ub uhide ub-ver" style="padding:0.8em;box-sizing:border-box;" id="sysnew0"> </div>
<div class="clear"></div>
<div class="more_box"></div>
<div class="clear"></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>
</body>
</html>