首次推送
This commit is contained in:
484
Mtxfw.VipSite/mobile/Purchase_icon.html
Normal file
484
Mtxfw.VipSite/mobile/Purchase_icon.html
Normal file
@@ -0,0 +1,484 @@
|
||||
<!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;
|
||||
}
|
||||
|
||||
#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, .uinput11 textarea {
|
||||
background-color: rgba(0, 0, 0, 0.05);
|
||||
border-radius: 0.5em;
|
||||
color: #000;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
.vipbox_msg {
|
||||
width: 100%;
|
||||
padding: 0.8em;
|
||||
text-align: left;
|
||||
line-height: 1.8em;
|
||||
color: #848484;
|
||||
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;
|
||||
}
|
||||
select {
|
||||
height:2em;
|
||||
color:#000;
|
||||
}
|
||||
select option{
|
||||
color: #000;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
var userId = null;
|
||||
var LoginId = null;
|
||||
var CartId = null;
|
||||
var opentimes = null;
|
||||
var ttype = 1;
|
||||
var userdata = 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");
|
||||
|
||||
var userinfo = getlocalStorage("userinfo");
|
||||
userdata = JSON.parse(userinfo);
|
||||
$(".vipbox_msg").html(userdata.tbmsg);
|
||||
ontixiantype(ttype);
|
||||
});
|
||||
function ontixiantype(t) {
|
||||
ttype = t;
|
||||
var paytype = $("#paytype").val();
|
||||
var num = $("#txtnum").val();
|
||||
var gmjg = 0;
|
||||
if (t == 4) {
|
||||
$("#tixiantype0 .current").removeClass('on');
|
||||
$("#tixiantype1 .current").removeClass('on');
|
||||
$("#tixiantype2 .current").removeClass('on');
|
||||
$("#tixiantype3 .current").removeClass('on');
|
||||
$("#tixiantype4 .current").addClass('on');
|
||||
$(".vipbox_msg").html(userdata.tbmsg2);
|
||||
gmjg = userdata.tbjg2;
|
||||
if (paytype == 360) {
|
||||
gmjg = userdata.ntbjg2;
|
||||
}
|
||||
} else if (t == 3) {
|
||||
$("#tixiantype0 .current").removeClass('on');
|
||||
$("#tixiantype1 .current").removeClass('on');
|
||||
$("#tixiantype2 .current").removeClass('on');
|
||||
$("#tixiantype3 .current").addClass('on');
|
||||
$("#tixiantype4 .current").removeClass('on');
|
||||
$(".vipbox_msg").html(userdata.tbmsg1);
|
||||
gmjg = userdata.tbjg1;
|
||||
if (paytype == 360) {
|
||||
gmjg = userdata.ntbjg1;
|
||||
}
|
||||
} else if (t == 2) {
|
||||
$("#tixiantype0 .current").removeClass('on');
|
||||
$("#tixiantype1 .current").removeClass('on');
|
||||
$("#tixiantype2 .current").addClass('on');
|
||||
$("#tixiantype3 .current").removeClass('on');
|
||||
$("#tixiantype4 .current").removeClass('on');
|
||||
$(".vipbox_msg").html(userdata.tbmsg0);
|
||||
gmjg = userdata.tbjg0;
|
||||
if (paytype == 360) {
|
||||
gmjg = userdata.ntbjg0;
|
||||
}
|
||||
} else if (t == 1) {
|
||||
$("#tixiantype0 .current").removeClass('on');
|
||||
$("#tixiantype1 .current").addClass('on');
|
||||
$("#tixiantype2 .current").removeClass('on');
|
||||
$("#tixiantype3 .current").removeClass('on');
|
||||
$("#tixiantype4 .current").removeClass('on');
|
||||
$(".vipbox_msg").html(userdata.tbmsg);
|
||||
gmjg = userdata.tbjg;
|
||||
if (paytype == 360) {
|
||||
gmjg = userdata.ntbjg;
|
||||
}
|
||||
} else {
|
||||
$("#tixiantype0 .current").addClass('on');
|
||||
$("#tixiantype1 .current").removeClass('on');
|
||||
$("#tixiantype2 .current").removeClass('on');
|
||||
$("#tixiantype3 .current").removeClass('on');
|
||||
$("#tixiantype4 .current").removeClass('on');
|
||||
$(".vipbox_msg").html(userdata.vipmsg);
|
||||
gmjg = userdata.vipjg;
|
||||
if (paytype == 360) {
|
||||
gmjg = userdata.nvipjg;
|
||||
}
|
||||
}
|
||||
if (num != "") {
|
||||
$("#textje2").html(gmjg * num);
|
||||
}
|
||||
|
||||
}
|
||||
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;
|
||||
var num = fTrim($("#txtnum").val());
|
||||
if (num == "") {
|
||||
ifb = false;
|
||||
tishi3("购买数量不能为空");
|
||||
$("#txtnum").focus();
|
||||
}
|
||||
if (ifb) {
|
||||
if ($(".vipbox_button div").html() != "立即购买") {
|
||||
ifb = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (ifb) {
|
||||
var paytype = $("#paytype").val();
|
||||
|
||||
|
||||
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: ttype,
|
||||
paytype: paytype,
|
||||
num: num,
|
||||
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("立即购买");
|
||||
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 () {
|
||||
layer.closeAll();
|
||||
onlog(1);
|
||||
clearInterval(closeInterval);
|
||||
}, 300);
|
||||
} 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);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
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">
|
||||
图标购买
|
||||
</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">
|
||||
<div id="wrapper_content">
|
||||
<p class="pullDown">下拉刷新...</p>
|
||||
<div class="clear"></div>
|
||||
<div class="clear"></div>
|
||||
<div class="ub ub-ver" style="padding:0.8em; box-sizing:border-box;">
|
||||
<div class="tixin-item">
|
||||
<ul class="account">
|
||||
|
||||
<li class="flex-end" onclick="ontixiantype(1)" id="tixiantype1">
|
||||
<p>
|
||||
<i><img src="../image/jyztb.png" /></i>
|
||||
<span>活跃度图标</span>
|
||||
|
||||
</p>
|
||||
<i class="current on"></i>
|
||||
</li>
|
||||
<li class="flex-end" onclick="ontixiantype(2)" id="tixiantype2">
|
||||
<p>
|
||||
<i><img src="../image/jstb.png" /></i>
|
||||
<span>加速图标</span>
|
||||
|
||||
</p>
|
||||
<i class="current"></i>
|
||||
</li>
|
||||
<li class="flex-end" onclick="ontixiantype(3)" id="tixiantype3">
|
||||
<p>
|
||||
<i><img src="../image/jktb.png" /></i>
|
||||
<span>1.1倍出金卡图标</span>
|
||||
|
||||
</p>
|
||||
<i class="current"></i>
|
||||
</li>
|
||||
<li class="flex-end" onclick="ontixiantype(4)" id="tixiantype4">
|
||||
<p>
|
||||
<i><img src="../image/sxftb.png" /></i>
|
||||
<span>手续费图标</span>
|
||||
</p>
|
||||
<i class="current"></i>
|
||||
</li>
|
||||
<li class="flex-end" onclick="ontixiantype(0)" id="tixiantype0">
|
||||
<p>
|
||||
<i><img src="../image/viptb.png" /></i>
|
||||
<span>VIP</span>
|
||||
</p>
|
||||
<i class="current"></i>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="tixin-item" style="margin-top:0.8em;">
|
||||
<div class="ub ub-ac" style="margin-bottom: .08em;">
|
||||
<div class="ub ub-f1" style="padding:0.8em;width:4em;">
|
||||
选择类型
|
||||
</div>
|
||||
<div class="ub ub-ac ub-pc">
|
||||
<div class="select" style=" margin-right: 0.8em;width:10em;">
|
||||
<select id="paytype" onchange="ontixiantype(ttype);">
|
||||
<option value="30">月费(30天)</option>
|
||||
<option value="360">年费(360天)</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="ub ub-ac" style="margin-bottom: .08em;">
|
||||
<div class="ub ub-f1" style="padding:0.8em;width:4em;">
|
||||
购买数量
|
||||
</div>
|
||||
<div class="ub ub-ac ub-pc">
|
||||
<div class="ub ub-ac ub-pc uinput11" style="width:10em;padding-right: 1em;">
|
||||
<input type="number" id="txtnum" onblur="ontixiantype(ttype);" onkeydown="ontixiantype(ttype);" onkeyup="ontixiantype(ttype);" style=" width: 8em; text-align: center;" /> 张
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="ub ub-ac" style="margin-bottom: .08em;">
|
||||
<div class="ub ub-f1" style="padding:0.8em;width:4em;">
|
||||
卡费
|
||||
</div>
|
||||
<div class="ub ub-ac ub-pc">
|
||||
<div class="ub ub-ac ub-pc" style="width:10em;padding-right: 1.6em">
|
||||
<span class="text" id="textje2" style=" color: red;">0</span> 积分
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div class="vipbox_button" onclick="save()">
|
||||
<div>立即购买</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div class="vipbox_msg">
|
||||
</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>
|
||||
|
||||
</body>
|
||||
|
||||
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user