You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
214 lines
6.9 KiB
214 lines
6.9 KiB
<?php
|
|
if(!defined('InEmpireCMS'))
|
|
{
|
|
exit();
|
|
}
|
|
?>
|
|
<?php
|
|
$public_diyr['pagetitle']='在线充值';
|
|
$url="<a href='../../../'>首页</a> > <a href='../cp/'>会员中心</a> > 在线充值";
|
|
require(ECMS_PATH.'e/template/incfile/header.php');
|
|
$id=$_GET[id];
|
|
if (!$id){
|
|
$id=4;
|
|
}
|
|
$nr=$empire->fetch1("select * from {$dbtbpre}enewsbuygroup where id='".$id."' limit 1");
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta content="telephone=no" name="format-detection">
|
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
<meta content="True" name="HandheldFriendly">
|
|
<meta name="full-screen" content="true">
|
|
<meta name="screen-orientation" content="portrait">
|
|
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
|
|
<meta name="applicable-device" content="mobile">
|
|
<link rel="canonical" href=""/>
|
|
<title><?=$thispagetitle?>-<?=$public_r[sitename]?></title>
|
|
<link href="/Mobile/Public/css/mc.css?v=20181128" rel="stylesheet" type="text/css">
|
|
<link href="/Mobile/Public/css/index.css?v=20181128" rel="stylesheet" type="text/css">
|
|
|
|
<script type="text/javascript" src="http://statics.888ppt.com/Mobile/Public/js/rem.js?v=20181128"></script>
|
|
</head>
|
|
|
|
<body>
|
|
<script>
|
|
var now=new Date();
|
|
var beginTime=now.getTime();
|
|
var searchType = "1";
|
|
var mainHost = "http://<?=$public_r['add_m']?>/";
|
|
var apiHost = "http://<?=$public_r['add_www']?>/";
|
|
var user = "<?=$username?>";
|
|
var uid = "<?=$userid?>";
|
|
var isvip = <?if ($vip){?><?=$vip?><?}else{?>0<?}?>; </script>
|
|
<div id="top">
|
|
<div id="top-content">
|
|
<a href="/" class="referer" ></a>
|
|
<div class="pagename margin-center center">支付中心</div>
|
|
|
|
<div class="menu center"></div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="topSearchBar">
|
|
<div class="cancelIcon"></div>
|
|
<div class="searchInput">
|
|
<input type="text" id="searchWord" class="fn14" value="" />
|
|
<div class="clearInput"></div>
|
|
</div>
|
|
<a class="searchBtn color-miz-violet center" href="javascript:;">搜索</a>
|
|
</div>
|
|
|
|
<div id="mask"></div>
|
|
|
|
<div id="rightSlide">
|
|
<div class="face center">
|
|
<div class="face-img">
|
|
<a href="/e/member/cp/"><img src="<?=$userpic?>" /></a>
|
|
</div>
|
|
<div class="click-login"><a href="/e/member/cp/"><?=$username?></a></div>
|
|
</div>
|
|
|
|
<div class="plate-list center color-888">
|
|
<ul>
|
|
<a href="/" class="color-miz-violet"><li>首页</li></a>
|
|
<a href="/list/1-0-0-0-0.html" class="color-888"><li>PPT模板</li></a>
|
|
<a href="/list/40-0-0-0-0.html" class="color-888"><li>PPT图表</li></a>
|
|
<a href="/list/16-0-0-0-0.html" class="color-888"><li>Word文档</li></a>
|
|
<a href="/list/31-0-0-0-0.html" class="color-888"><li>Excel表格</li></a>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div id="main" >
|
|
<link href="/tpl/Mobile/Public/css/pay.css?v=20181128" rel="stylesheet" type="text/css">
|
|
<div id="main-content">
|
|
|
|
<div class="vip-banner"><img width="100%" src="/tpl/Mobile/Public/images/vip-ticket.png"></div>
|
|
|
|
<ul class="pay-list">
|
|
|
|
<?
|
|
$i=0;
|
|
$newsclass=$empire->query("select id,gname,gmoney,gdate,gsay,ggroupid from {$dbtbpre}enewsbuygroup where ggroupid<>0 order by ggroupid desc limit 4");
|
|
while($bqr=$empire->fetch($newsclass))
|
|
{
|
|
$i=$i+1;
|
|
$cr=$empire->fetch1("select groupname from {$dbtbpre}enewsmembergroup where groupid='".$bqr[ggroupid]."' limit 1");
|
|
?>
|
|
<a href="?id=<?=$bqr[id]?>"><li<?if ($id==$bqr[id]){?> class="on"<?}?> taocan="<?=$bqr[id]?>" money="<?=$bqr['gmoney']?>">
|
|
<div class="money center">
|
|
<div class="right-line">
|
|
<span class="money-num">¥<?=$bqr['gmoney']?></span>
|
|
<span class="time fn14 color-888" style="display:block;"><?=$cr[groupname]?></span>
|
|
</div>
|
|
</div>
|
|
<div class="vip-info color-444"><?=$bqr['gsay']?></div>
|
|
</li></a>
|
|
<?}?>
|
|
|
|
</ul>
|
|
|
|
<div class="clear"></div>
|
|
|
|
<div class="current-money">应付金额:<span class="money-num fn18">¥<span class="num"><?=$nr['gmoney']?></span>.00</span></div>
|
|
|
|
<div class="pay-btn-box">
|
|
<img class="weixin_qr_code center" src="">
|
|
<div class="pay-btn weixin-btn center">微信扫码支付</div>
|
|
</div>
|
|
|
|
<input type="hidden" name="money" id="money" value="<?=$nr['gmoney']?>">
|
|
</div>
|
|
</div>
|
|
<?php
|
|
require(ECMS_PATH.'e/template/incfile/footer.php');
|
|
?>
|
|
<script type="text/javascript" src="/Mobile/Public/js/common.js?v=20181128"></script>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
$(".pay-list li").on("click",function(){
|
|
$(".pay-list li").removeClass("on");$(this).addClass("on");
|
|
$(".num").text($(this).attr("money"));
|
|
$("#money").val(parseInt($(this).attr("money")));
|
|
});
|
|
|
|
var zs = 0,
|
|
aflag = 0,
|
|
orderids = "";
|
|
|
|
function initPay() {
|
|
|
|
|
|
var money = $("#money").val();
|
|
|
|
$.ajaxPost("/e/payapi/wx.php", {"pay-money": money,"type":5,"taocan":<?=$id?>,"phome":"BuyGroupPay"}, function(res) {
|
|
clearInterval(zs);
|
|
if(res.status == "1") {
|
|
if(res.code_img_url) {
|
|
$(".weixin_qr_code").attr("src", res.code_img_url);
|
|
orderids += res.orderid + ",";
|
|
|
|
}
|
|
|
|
if (orderids) {
|
|
if (aflag < 300) {
|
|
zs = setInterval(function() {
|
|
CheckOrder(orderids);
|
|
aflag = aflag + 2;
|
|
}, 3000);
|
|
|
|
} else if (aflag >= 300 && aflag < 600) {
|
|
|
|
zs = setInterval(function() {
|
|
CheckOrder(orderids);
|
|
aflag = aflag + 2;
|
|
}, 10000);
|
|
|
|
} else if(aflag > 600) {
|
|
|
|
}
|
|
}
|
|
} else if(res.status == -1) {
|
|
showReg();
|
|
} else {
|
|
alert(res.msg);
|
|
}
|
|
}, function(err) {
|
|
|
|
});
|
|
}
|
|
|
|
/**
|
|
* 校验订单状态
|
|
* @param {[type]} orderid [description]
|
|
*/
|
|
function CheckOrder(orderids) {
|
|
$.ajaxPost("/e/payapi/pcweixin/ajax.php", {
|
|
'tradeno': orderids,
|
|
"taocan":<?=$id?>
|
|
}, function(res) {
|
|
if (res.status == 1) {
|
|
clearInterval(zs);
|
|
window.location.href = res.backurl;
|
|
}
|
|
}, function(err) {
|
|
|
|
});
|
|
}
|
|
initPay();
|
|
</script>
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|