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

366 lines
14 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>VIP</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;
}
#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;
}
.vipbox_jg {
width: 100%;
padding: 0.8em;
padding-bottom:0;
text-align: left;
line-height: 1.8em;
color: #bbb;
box-sizing: border-box;
}
.vipbox_jg span {
color: #ff8c04;
}
.vipbox_msg {
width: 100%;
padding: 0.8em;
text-align: left;
line-height: 1.8em;
color: #bbb;
box-sizing: border-box;
}
.vipbox_button {
width: 100%;
padding: 0.8em;
text-align: center;
box-sizing:border-box;
}
.vipbox_button div {
width: 100%;
padding: 0.4em 0.8em;
text-align: center;
background: linear-gradient(to right, #2EAE0C,#557E14);
color: #fff;
line-height: 2em;
border-radius: 0.5em;
box-sizing: border-box;
}
</style>
<script type="text/javascript">
var userId = null;
var LoginId = null;
var CartId = null;
var opentimes = null;
var t = 0;
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 userinfo = getlocalStorage("userinfo");
var userdata = JSON.parse(userinfo);
$(".vipbox_msg").html(userdata.vipmsg);
$("#vipjg").html("¥"+userdata.vipjg);
});
function onScroll() {
if (myScroll != null) {
myScroll.destroy();
myScroll = null;
}
myScroll = new IScroll('#wrapper', {
probeType: 2,
fadeScrollbars: false
});
myScroll.on('scroll', function () {
var y = myScroll.y;
downHeight = $(".pullDown").height();
upHeight = $(".pullUp").height();
// 下拉加载
if (y >= downHeight && pullDown) {
$(".pullDown").addClass("refresh").html("松开刷新...");
myScroll.minScrollY = downHeight;
pullDown = 0;
}
if (y <= downHeight && y >= 0 && !pullDown) {
$(".pullDown").removeClass("refresh").html("下拉刷新...");
pullDown = 1;
myScroll.minScrollY = 0;
}
// 上拉刷新
var maxHeight = myScroll.maxScrollY;
if (y < (maxHeight - upHeight) && pullUp) {
$(".pullUp").addClass("loading").html("松开加载...");
myScroll.maxScrollY = maxHeight - upHeight;
pullUp = 0;
}
if (y > maxHeight && y < (maxHeight + upHeight) && !pullUp) {
$(".pullUp").removeClass("loading").html("上拉加载...");
myScroll.maxScrollY = maxHeight + upHeight;
pullUp = 1;
}
});
myScroll.on('scrollEnd', function () {
if ($(".pullDown").hasClass("refresh")) {
$(".pullDown").text("正在刷新...");
opentimes = setTimeout(function () {
clearInterval(opentimes);
rdata(1);
$(".pullDown").removeClass("refresh").html("下拉刷新...");
pullDown = 1;
myScroll.refresh();
}, 2000);
}
if ($(".pullUp").hasClass("loading")) {
$(".pullUp").text("正在加载...");
opentimes = setTimeout(function () {
clearInterval(opentimes);
rdata(0);
myScroll.refresh();
}, 1000);
}
});
myScroll.on('refresh', function () {
$(".pullUp").removeClass("loading").html("上拉加载...");
pullUp = 1;
});
}
function save() {
var ifb = true;
if (ifb) {
if ($(".vipbox_button div").html() != "购买VIP") {
ifb = false;
}
}
if (ifb) {
var _index = layer.prompt({ title: '请输入安全密码,并确定购买', formType: 1 }, function (pass) {
if (pass == "") {
tishi3("请输入您的安全密码");
return false;
}
$(".vipbox_button div").html("请稍候...");
try {
var datas = {
action: "gmtb",
userId: userId,
LoginId: LoginId,
t: 0,
pwd: pass
};
$.ajax({
type: 'POST',
url: "/apiajax.ashx?ifweb=1",
data: datas,
dataType: "json",
error: function (xhr) {
tishi3("发生错误:" + JSON.stringify(xhr));
},
success: function (data) {
$(".vipbox_button div").html("购买VIP");
if (data) {
if (data.status == 1) {
tishi3(data.msg);
setlocalStorage("userinfo", JSON.stringify(data.userInfo));
setlocalStorage("myrefresh", 1);
setlocalStorage("mylogrefresh", 1);
var closeInterval = setInterval(function () {
onlog(0);
clearInterval(closeInterval);
}, 300);
} if (data.status == 0) {
tishi3(data.msg);
if (data.msg == "请先修改安全密码!") {
var closeInterval = setInterval(function () {
onlink("editpwd.html?t=1");
layer.close();
clearInterval(closeInterval);
}, 500);
}
if (data.msg == "请先实名认证!") {
var closeInterval = setInterval(function () {
onlink("mydata.html");
layer.close();
clearInterval(closeInterval);
}, 500);
}
}
} else {
tishi3('网络异常,请稍后重试');
}
}
});
} catch (err) {
tishi3(err);
}
}
);
}
}
function onlog(t) {
onlink("gmtb_log.html?t=" + t);
}
</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">
VIP
</h1>
<div class="nav-btn blue" id="nav-right" onclick="onlog(0)" style="color:#fff; margin:0; padding:0; min-width:4em; padding-right:1em;">
购买记录
</div>
</div>
</header>
<section class="ub-f1" id="wrapper" style="background:url(/image/vip_bg.png) no-repeat center 16em;background-size:19em 19em;">
<div id="wrapper_content">
<p class="pullDown">下拉刷新...</p>
<div class="clear"></div>
<div class="vipbox_jg">VIP优惠价<span id="vipjg">¥2000.00</span></div>
<div class="clear"></div>
<div class="vipbox_msg">
VIP获得的福利
<br>★每月可以补签3次有效期30天
<br>★赠送经验X5有效期30天
<br>★赠送出金卡X1有效期30天
<br>★免除每日视频签到流量
</div>
<div class="vipbox_button" onclick="save()">
<div>购买VIP</div>
</div>
<div class="clear"></div>
<div class="more_box"></div>
<div class="clear"></div>
<p class="pullUp">上拉加载...</p>
</div>
</section>
<footer style="">
<!--overflow:hidden;box-sizing:border-box;-->
<div class="ub">
<div class="pos_re ub ub-f1 footer-box">
<div id="index_0" class="ub-f1 ub ub-ver" onclick='onlink("/mobile/")'>
<div class="ub-img5 icon"></div>
<div class="uinn-a13 tx-c">
首页
</div>
</div>
</div>
<div class="pos_re ub ub-f1 footer-box">
<div id="index_1" class="ub-f1 ub ub-ver" onclick='onloginlink("news.html")'>
<div class="ub-img5 icon"></div>
<div class="uinn-a13 tx-c">
资讯
</div>
</div>
</div>
<div class="pos_re ub ub-f1 footer-box" onclick='onlink("vip.html")'>
<div class="footer-center-box">
<img src="/image/center0.png?t=2">
</div>
</div>
<div class="pos_re ub ub-f1 footer-box">
<div id="index_2" class="ub-f1 ub ub-ver" onclick='onlink("Purchase_icon.html")'>
<div class="ub-img5 icon"></div>
<div class="uinn-a13 tx-c">
图标
</div>
</div>
</div>
<div class="pos_re ub ub-f1 footer-box">
<div id="index_3" class="ub-f1 ub ub-ver " onclick='onlink("my.html")'>
<div class="ub-img5 icon"></div>
<div class="uinn-a13 tx-c">
我的
</div>
</div>
</div>
</div>
</footer>
<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>