Commit 4e6a81a6 authored by zhengke's avatar zhengke

xiugia

parent ab2e936b
......@@ -17,6 +17,8 @@
}
.coupons_page{
width:100%;
min-height:100%;
padding-bottom:3rem;
background-color:#F8F5F5;
}
.coupons_title{
......@@ -109,8 +111,8 @@
}
.coupons_Content{
width:100%;
height:87.2%;
overflow: scroll;
/* height:87.2%;
overflow: scroll; */
}
.coupons_List{
width:80%;
......@@ -311,7 +313,7 @@
<div class="coupons_page">
<div class="coupons_title">
<div class="coupons_Navone" onclick="showList()">
<span class="useType"></span>
<span class="useType">不限</span>
<div class="arrow_down"></div>
<i class="bd_right"></i>
</div>
......@@ -319,7 +321,7 @@
<div class="Coupons_active" onclick="getAllTicket(0,0,1)">全部</div>
<div onclick="getAllTicket(0,2,1)">折扣券</div>
<div onclick="getAllTicket(0,1,1)">抵扣券</div>
<div onclick="getAllTicket(0,0,4)">已过期</div>
<div onclick="getAllTicket(0,1,3)">已过期</div>
</div>
<div class="coupons_tyList">
<span class="activeClick" onclick="getAllTicket(0,'',1)">不限</span>
......@@ -401,8 +403,6 @@
$(".coupons_tyList").click(function(event){
event.stopPropagation();
});
let title='不限';
$('.useType').html(title);
$(".coupons_tyList span").click(function(){
$(this).addClass('activeClick').siblings().removeClass('activeClick');
$('.coupons_tyList').slideToggle(300);
......@@ -473,6 +473,10 @@
if(dataArr[i].couponsUseScope==4){
str+=` <img src="../images/login/jp.png" alt=""/>`
}
if(dataArr[i].couponEffectStatus==3){
str+=` <img src="../images/login/guoqi.png" alt=""/>`
}
str+=`<div class="dikouPrice">
<span>¥</span>${dataArr[i].denomination}
</div>
......
......@@ -339,7 +339,7 @@
window.location.href = 'http://activity.oytour.com/html/GT_activities.html';
}
}catch (e) {
// window.location.href = 'http://activity.oytour.com/html/login.html';
window.location.href = 'http://activity.oytour.com/html/login.html';
}
}
//跳转至激活
......@@ -401,7 +401,7 @@
localStorage.u = JSON.stringify(userInfo)
window.location.href = 'http://activity.oytour.com/html/GT_activities.html';
//window.location.href = 'http://127.0.0.1:5500/html/GT_activities.html';
//window.location.href='http://127.0.0.1:5500/html/GT_activities.html';
}else{
layer.msg(res.message);
}
......
......@@ -26,22 +26,7 @@
text-align: center;
font-size:2rem;
color:#999999;
margin:5rem 0 2rem 0;
}
.login_AgreeTitle{
width:100%;
height:8rem;
text-align: center;
font-size:2.3rem;
line-height: 8rem;
border:0;
box-shadow: 0px 0px 20px #d1d1d1;
}
.login_AgreeTitle img{
position: relative;
left:3rem;
top:3rem;
float:left;
padding:5rem 0 2rem 0;
}
.pay_time span{
margin-left:1rem;
......@@ -110,22 +95,23 @@
border:0;
border-radius: 1.5rem;
}
.layui-layer-content{
font-size:1.8rem!important;
padding:2rem 1rem!important;
}
</style>
<body>
<div class="pay_page">
<div class="price_Top">
<div class="login_AgreeTitle">
<img onclick="gobackList()" src="../images/login/login_arrowleft.png"/>支付订单
</div>
<div class="pay_time">
支付剩余时间<span>24:00</span>
支付剩余时间<span class="daojishi"></span>
</div>
<div class="pay_price">
<span>¥</span><span>9.9</span>
<span>¥</span> <span id="pay_money"></span>
</div>
<div class="pay_quan">
9.9元抵扣200元代金券
</div>
<div class="pay_zhifu">
<img class="pay_one" src="../images/login/wechat.png" alt=""/>
......@@ -143,38 +129,97 @@
</body>
<script type="text/javascript" src="../js/jquery-1.10.2.js"></script>
<script type="text/javascript" src="../js/layer/layer.js"></script>
<script>
var appId = urlparameter("appId");
var timeStamp = urlparameter("timeStamp");
var nonceStr = urlparameter("nonceStr");
var pg = urlparameter("pg");
var signType = urlparameter("signType");
var paySign = urlparameter("paySign");
function onBridgeReady(){
WeixinJSBridge.invoke(
'getBrandWCPayRequest', {
"appId" : appId, //公众号名称,由商户传入
"timeStamp": timeStamp, //时间戳,自1970年以来的秒数
"nonceStr" : nonceStr, //随机串
"package" : "prepay_id=" + pg,
"signType" : signType, //微信签名方式:
"paySign" : paySign //微信签名
},
<script type="text/javascript" src="../js/mian.js"></script>
<script src="../js/md5.js"></script>
function(res){
if(res.err_msg == "get_brand_wcpay_request:ok" ) {
alert("支付成功");
} // 使用以上方式判断前端返回,微信团队郑重提示:res.err_msg将在用户支付成功后返回 ok,但并不保证它绝对可靠。
}
);
<script>
$(function(){
if(sessionStorage.getItem("payInfo")){
let msgList = JSON.parse(sessionStorage.getItem("payInfo"));
$("#pay_money").html(msgList.dTotalPrice);
$(".pay_quan").html(msgList.sProductName);
}
countdown();
})
var second=180000;
var payBtn=true;
var changesecond='';
//倒计时
function countdown() {
if (second == 0) {
payBtn=false;
changesecond='00:00';
$(".daojishi").html(changesecond);
return;
}
var time = setTimeout(function() {
let str = formatSeconds(second);
second=second-1;
changesecond=str;
$(".daojishi").html(changesecond);
countdown();
}, 1000)
};
function formatSeconds(value) {
var theTime = parseInt(value); // 秒
var theTime1 = 0; // 分
if (theTime > 60) {
theTime1 = parseInt(theTime / 60);
theTime = parseInt(theTime % 60);
if (theTime1 > 60) {
theTime1 = parseInt(theTime1 % 60);
}
}
var result = "" + parseInt(theTime); //秒
if (10 > theTime > 0) {
result = "0" + parseInt(theTime); //秒
} else {
result = "" + parseInt(theTime); //秒
}
if (10 > theTime1 > 0) {
result = "0" + parseInt(theTime1) + ":" + result; //分,不足两位数,首位补充0,
} else {
result = "" + parseInt(theTime1) + ":" + result; //分
}
return result;
};
function pay(){
if(!localStorage.openid){
window.location.href = 'http://activity.oytour.com/html/GT_activities.html';
}
if(!payBtn){
layer.msg('您已经超出支付时间!');
}
var payMsg;
if(sessionStorage.getItem("payInfo")){
payMsg = JSON.parse(sessionStorage.getItem("payInfo"));
}
let msg={
sOrderNo:payMsg.sOrderNo, //订单号
dTotalPrice:payMsg.dTotalPrice, //总价
sProductName:payMsg.sProductName,
sCurOpenID:localStorage.openid
}
$.ajax({
type: "POST",
url: `https://reborn.oytour.com/api/WeChatNotify/WechatOpenId?sOrderNo=${payMsg.sOrderNo}&sCurOpenID=${localStorage.openid}&domainName=http://reborn.oytour.com/api/WeChatNotify/DoPay`,
contentType: "application/json",
async: false,
success: function (res) {
if (res.resultCode === 1) {
let d=JSON.parse(res.data);
onBridgeReady(d.appId,d.timeStamp,d.nonceStr,d.package,d.paySign);
}else{
layer.msg(res.message);
}
},
error: function (res) {
// layer.msg(res.message);
}
});
if (typeof WeixinJSBridge == "undefined"){
if( document.addEventListener ){
document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
......@@ -183,9 +228,26 @@
document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
}
}else{
onBridgeReady();
// onBridgeReady();
}
}
function onBridgeReady(id,ts,ns,pa,ps) {
WeixinJSBridge.invoke(
'getBrandWCPayRequest', {
"appId": id, //公众号名称,由商户传入
"timeStamp": ts, //时间戳,自1970年以来的秒数
"nonceStr": ns, //随机串
"package": pa,
"signType": "MD5", //微信签名方式:
"paySign": ps //微信签名
},
function (res) {
if (res.err_msg == "get_brand_wcpay_request:ok") {
// 使用以上方式判断前端返回,微信团队郑重提示:
//res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠。
alert("get_brand_wcpay_request:ok");
}
});
}
</script>
</html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="span/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="divport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, target-densitydpi=device-dpi" />
<meta name="screen-orientation" content="portrait">
</meta>
<meta name="x5-orientation" content="portrait">
</meta>
<title>支付订单</title>
</head>
<style>
body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, button, spanarea, p, blockquote, th, td {
margin: 0;
padding: 0;
}
.paySuccess{
width:100%;
height:100%;
position: relative;
text-align: center;
}
.paySuccess img{
width:12rem;
margin-top:15rem;
}
.payStatus{
color:#e95252;
font-size:3rem;
margin-top:4rem;
}
.pay_goLook{
border: 2px solid #e95252;
font-size: 2rem;
color: #e95252;
width: 15rem;
height: 5rem;
line-height: 5rem;
border-radius: 1rem;
margin:15rem auto;
}
.lookQuan{
position: absolute;
bottom:9rem;
font-size:2rem;
width:100%;
text-align: center;
color:#A1A1A1;
}
</style>
<body>
<div class="paySuccess">
<img src="../images/login/gou_big.png" alt=""/>
<div class="payStatus">支付成功</div>
<div class="pay_goLook" onclick="goDetail()">
前往查看
</div>
<div class="lookQuan">您也可以在[我的->我的优惠券]查看优惠券信息</div>
</div>
</body>
<script type="text/javascript" src="../js/jquery-1.10.2.js"></script>
<script>
function goDetail(){
//window.location.href = 'http://192.168.0.117:5500/html/coupons.html';
window.location.href = 'http://activity.oytour.com/html/coupons.html';
}
</script>
</html>
......@@ -281,6 +281,7 @@ $.fn.dataStatistics = function(options){
sessionStorage.setItem("payInfo", JSON.stringify(data));
//window.location.href = 'http://127.0.0.1:5500/html/pay.html';
//window.location.href = 'http://192.168.0.117:5500/html/pay.html';
window.location.href = 'http://http://activity.oytour.com/html/pay.html';
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment