Commit 2a47f34e authored by 华国豪's avatar 华国豪 🙄
parents 44f17f59 6cbe87e1
......@@ -378,3 +378,41 @@ p{
height: 0.2rem;
margin-left: 0.15rem;
}
.Noticewarp{
overflow: hidden;
height: 0.3rem;
line-height: 0.3rem;
width: 100%;
position: absolute;
top:2.7rem;
z-index:999;
}
.Noticewarp .scroll {
width: 200%;
float: left;
position: relative;
}
.Noticewarp a {
color: #fff;
width: auto;
float: left;
padding:0 0.2rem 0 0.05rem;
height:0.3rem;
text-decoration: none;
margin-right:0.1rem;
border-radius:1rem;
background: rgba(0,0,0,0.5);
font-size:0.1rem;
display: inline-block;
}
.scroll a img{
width:0.25rem;
height:0.25rem;
vertical-align: middle;
position: relative;
top:-0.02rem;
border-radius:50%;
}
.Noticewarp a:last-child{
margin-right:0;
}
\ No newline at end of file
This diff is collapsed.
......@@ -65,23 +65,125 @@
<script type="text/javascript" src="../js/md5.js"></script>
<script type="text/javascript" src="../js/layer/layer.js"></script>
<script type="text/javascript" src="../js/mian.js"></script>
<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
<script>
let RushbuyTime = JSON.parse(localStorage.RushbuyTime)
$(
function(){
$('#RushbuyTime').html(`有效期截止:` + RushbuyTime)
$('#RushbuyTime').html(`有效期截止:` + RushbuyTime.RushbuyTime)
setTimeout(function(){
$('.box').addClass('move')
}, 500)
}
)
let buyIf = {}
// if (localStorage.buyInfo) {
// buyIf = localStorage.buyInfo
// }else {
// window.location.href = 'https://activity.oytour.com/html/GT_activities.html';
// }
if (localStorage.buyInfo) {
buyIf = JSON.parse(localStorage.buyInfo)
}else {
window.location.href = 'https://activity.oytour.com/html/GT_activities.html';
}
$('.anniu').click(function () {
var loadingFlag;
if (buyIf.platform == 'app') {
window.postMessage(JSON.stringify({'action': 'showHud', 'message': '抢购中...'}));
}
if (buyIf.platform == 'H5') {
loadingFlag = layer.msg('抢购中...', {icon: 16, shade: 0.01, shadeClose: false, time: 60000});
}
$.ajax({
type: "POST",
url: `${getApiUrl().urlJava}api/appActivity/PanicBuyingCoupon`,
contentType: "application/json",
data: getJavaData({
redemptionPrice: buyIf.redemptionPrice,
couponId: buyIf.couponId,
productName: '印象之旅-200元线路产品优惠券'
}),
async: false,
success: function (res) {
if (buyIf.platform == 'app') {
window.postMessage(JSON.stringify({'action': 'dismissHud'}));
}
if (buyIf.platform == 'H5') {
layer.close(loadingFlag);
}
if (res.resultCode === 1) {
let title = '印象之旅-200元线路产品优惠券';
let data = {
'action': 'jump', // showToast->一个提示信息 showHud->一个黑色的loading
'page': 'payment',
'pageData': {
'couponId': res.data.couponId,
'title': title,
'price': res.data.preferPrice,
'backType': 'reload',
'data': res.data,
'goBack':'1',
'cardInfo' : {
title : RushbuyTime.title,
date : RushbuyTime.RushbuyTime,
}
}
}
if (buyIf.platform == 'app') {
window.postMessage(JSON.stringify(data));
}
// 跳转到支付
else if (buyIf.platform == 'xcx') {
// window.postMessage(JSON.stringify(data));
let data = {};
data.sOrderNo = res.data.id;
data.sProductName = title;
data.productId = res.data.couponId;
data.dTotalPrice = res.data.preferPrice;
wx.miniProgram.getEnv(function (res) {
window.wx.miniProgram.navigateTo({
url: `/pages/Home/pay/pay?data=` + JSON.stringify(data),
});
});
} else if (buyIf.platform == 'H5') {
let userInfo = getLocalStorage()
let data = {};
data.sOrderNo = res.data.id;
data.sProductName = title;
data.productId = res.data.couponId;
data.dTotalPrice = res.data.preferPrice;
data.customerId = userInfo.customerId;
sessionStorage.setItem("payInfo", JSON.stringify(data));
//window.location.href = 'https://127.0.0.1:5500/html/pay.html';
//window.location.href = 'http://192.168.0.117:5500/html/pay.html';
window.location.href = 'https://activity.oytour.com/html/pay.html';
}
} else {
if (buyIf.platform == 'app') {
window.postMessage(JSON.stringify({'action': 'showToast', 'message': res.message}));
} else {
layer.msg(res.message)
}
layer.msg(res.message)
// window.location.reload()
}
},
error: function (res) {
console.log(buyIf.platform)
if (buyIf.platform == 'app') {
window.postMessage(JSON.stringify({'action': 'dismissHud'}));
} else if (buyIf.platform == 'H5') {
layer.close(loadingFlag);
}
}
});
})
</script>
</body>
</html>
......@@ -230,7 +230,9 @@
return result;
};
function goActive(){
window.location.href = 'https://activity.oytour.com/html/GT_activities.html';
window.location.href = 'https://activity.oytour.com/html/paySuccess.html';
// window.location.href = 'http://127.0.0.1:5500/html/paySuccess.html';
}
function pay() {
if (!localStorage.openid) {
......
......@@ -8,6 +8,8 @@
</meta>
<meta name="x5-orientation" content="portrait">
</meta>
<title>支付订单</title>
</head>
<style>
......@@ -15,56 +17,231 @@
margin: 0;
padding: 0;
}
html,body{
height:100%;
margin: 0;
padding: 0;
}
.paySuccess{
width:100%;
height:100%;
position: relative;
text-align: center;
background: url('../images/pay/bg.png') no-repeat;
background-size:100% 100%;
padding-top: 3.1rem;
box-sizing: border-box;
}
.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{
/* */
.img_bg_M .received_img{
position: absolute;
bottom:9rem;
font-size:2rem;
width:100%;
right: 0.14rem;
top: 0.67rem;
width: 0.81rem;
height: 0.65rem;
display: none;
}
.img_bg_M{
width: 100%;
height: 2.14rem;
background-image: url(../images/M_200.png);
background-size: 100% 100%;
background-repeat: no-repeat;
position: relative;
}
.img_bg_M .imgBtn{
margin-top: 0.08rem;
background: url('../images/pay/btn.png') no-repeat;
background-size:100% 100%;
padding: 0.09rem 0.12rem;
}
.img_bg_M .ylImg{
position: absolute;
right: 0;
bottom: 0;
width: 0.85rem;
}
.use_oupon{
width: 3.14rem;
height: 0.4rem;
margin-top: 0.16rem;
margin-left: 0.32rem;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
.use_news{
display: flex;
flex-direction: row;
align-items: center;
}
.use_news img{
width: 0.4rem;
height: 0.4rem;
overflow: hidden;
}
.use_news div{
height: 0.4rem;
margin-left: 0.1rem;
display: flex;
flex-direction: column;
justify-content: space-around;
}
.use_news div p:nth-child(1){
font-size: 0.12rem;
color: #111111;
text-align:left;
}
.use_news div p:nth-child(2){
font-size: 0.1rem;
color: #888888;
width: 1.8rem;
overflow: hidden;
text-align:left;
}
.click_use p {
font-size: 0.11rem;
color: #E03234;
text-align: center;
color:#A1A1A1;
line-height: 0.25rem;
}
.click_use {
width: 0.8rem;
height: 0.25rem;
border: solid 1px #E03234;
}
</style>
<body>
<div class="paySuccess">
<img src="../images/login/gou_big.png" alt=""/>
<div class="payStatus">支付成功</div>
<div class="pay_goLook" onclick="goDetail()">
前往查看
<div class="img_bg_M">
<div class="img_bg_text" style="position:relative;width: 53%; margin-left: 45%;height: 1.18rem;display: flex;flex-direction: column;align-items: center;padding-top: 0.1rem">
<p class="img_bg_p1" style="font-size: 0.26rem;color: #E03234;padding-top: 0.1rem;font-weight: bold">无敌抵用券</p>
<p class="img_bg_p2" style="font-size: 0.13rem;color: #E03234;padding-top: 0.07rem;">
有效截止日期:
</p>
<p class="imgBtn" style="font-size: 0.15rem;color: #E03234;">返回活动首页</p>
<img class="ylImg" src="../images/pay/yl.png" alt="">
</div>
<div class="use_oupon">
<div class="use_news">
<img src="../images/tx_bg.png" alt="">
<div>
<p class="use_o"></p>
<p class="use_t"></p>
</div>
</div>
<div class="click_use">
<p>我的优惠券</p>
</div>
</div>
</div>
<div class="lookQuan">您也可以在[我的->我的优惠券]查看优惠券信息</div>
</div>
</body>
<script type="text/javascript" src="../js/autosize2.js"></script>
<script type="text/javascript" src="../js/jquery-1.10.2.js"></script>
<script type="text/javascript" src="../js/layer/layer.js"></script>
<script type="text/javascript" src="../js/md5.js"></script>
<script type="text/javascript" src="../js/mian.js"></script>
<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
<script>
function goDetail(){
//window.location.href = 'http://192.168.0.117:5500/html/coupons.html';
window.location.href = 'https://activity.oytour.com/html/coupons.html';
let href = window.location.href;
// let href = 'https://127.0.0.1:5500/html/GT_activities.html';
// let href='https://127.0.0.1:5500/html/GT_activities.html?customerId=1549&accountId=1182&token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE1NzM0NjY2NjMuMCwiZXhwIjoxNTczNTUzMDYzLjAsInVzZXJJbmZvIjp7InVpZCI6IjExODIiLCJyZXF1ZXN0RnJvbSI6NH19.hX2b2MqSWYmWS0k3YsthxW-T6UxarIm5rdbqCVQtxdQ&secretKey=5d5e16254bd741c486fe2b83b42171d2&platform=xcx';
// console.log("href",href);
let userInfo = {};
let platform='';
// 判断是app和小程序跳转过来的
if (href.split('?')[1]) {
let param = href.split('?')[1].split("&") ? href.split('?')[1].split("&") : null;
userInfo = {
customerId: param[0].split('=')[1],
accountId: param[1].split('=')[1],
token: param[2].split('=')[1],
secretKey: param[3].split('=')[1]
}
platform = param[4].split('=')[1]
}else{
if (localStorage.u){
userInfo = JSON.parse(localStorage.u);
}
}
localStorage.userInfo = JSON.stringify(userInfo)
$.ajax({
type: "POST",
url: `${getApiUrl().urlJava}api/appActivity/getUserPurchaseTime`,
contentType: "application/json",
data: getJavaData({}),
async: false,
success: function(res) {
console.log("res",res);
if (res.resultCode === 1) {
// let activityEndDate = res.data.activityEndDate.replace('T', ' ').replace(/-/g, '/'); //活动结束时间
let data=res.data;
let activityEndDate = data.activityEndDate.split('T')[0].replace(/-/g, '.'); //活动结束时间
console.log("re",activityEndDate)
let str="";
str+=`
<div class="img_bg_text" style="position:relative;width: 53%; margin-left: 45%;height: 1.18rem;display: flex;flex-direction: column;align-items: center;padding-top: 0.1rem">
<p class="img_bg_p1" style="font-size: 0.26rem;color: #E03234;padding-top: 0.1rem;font-weight: bold">无敌抵用券</p>
<p class="img_bg_p2" style="font-size: 0.13rem;color: #E03234;padding-top: 0.07rem;">
有效截止日期:${activityEndDate}
</p>
<p class="imgBtn" style="font-size: 0.15rem;color: #E03234;">返回活动首页</p>
<img class="ylImg" src="../images/pay/yl.png" alt="">
</div>
<div class="use_oupon">
<div class="use_news">
<img src="../images/tx_bg.png" alt="">
<div>
<p class="use_o">${data.contact}</p>
<p class="use_t">${data.customerName}</p>
</div>
</div>
<div class="click_use">
<p>我的优惠券</p>
</div>
</div>
`;
$('.img_bg_M').html(str);
}
},
error: function(res) {
layer.msg(res.message)
}
})
$('.imgBtn').click(function() {
if(platform=="xcx"){
// window.location.href = `http://127.0.0.1:5500/html/GT_activities.html?customerId=${userInfo.customerId}&accountId=${userInfo.accountId}&token=${userInfo.token}&secretKey=${userInfo.secretKey}&platform=xcx`;
window.location.href = `https://activity.oytour.com/html/GT_activities.html?customerId=${userInfo.customerId}&accountId=${userInfo.accountId}&token=${userInfo.token}&secretKey=${userInfo.secretKey}&platform=xcx`;
}
else{
window.location.href="https://activity.oytour.com/html/GT_activities.html"
}
})
$('.click_use').click(function() {
if(platform=="xcx"){
wx.miniProgram.getEnv(function(res) {
window.wx.miniProgram.navigateTo({
url: `/pages/member/Coupon/Coupon`,
});
});
}else{
window.location.href="https://activity.oytour.com/html/coupons.html"
}
})
</script>
</html>
......@@ -198,7 +198,7 @@ $.fn.dataStatistics = function(options) {
if (activityStartDate >= nowDate) { //活动还没开始
clearInterval(timer2);
} else if (nowDate >= activityEndDate) { //活动结束
} else if (nowDate >= activityEndDate || res.data.activityIsEnding == 1) { //活动结束
// $(".received_img").attr("src", "");
$('.img_bg_M').css("background-image", "url(../images/MJ_200@3x.png)");
......@@ -257,126 +257,35 @@ $.fn.dataStatistics = function(options) {
});
}, (difference + 5) * 1000) //5s请求一次接口
$('.img_btn').click(function() {
if ($('.img_btn p').css('color') == 'rgb(224, 50, 52)') { //判断按钮是否可以点击
if(options.login == true){
if (options.count != 0) { //判断是可以抢购
var loadingFlag;
if (options.platform == 'app') {
window.postMessage(JSON.stringify({'action': 'showHud', 'message': '抢购中...'}));
}
if (options.platform == 'H5') {
loadingFlag = layer.msg('抢购中...', {icon: 16, shade: 0.01, shadeClose: false, time: 60000});
}
$.ajax({
type: "POST",
url: `${getApiUrl().urlJava}api/appActivity/PanicBuyingCoupon`,
contentType: "application/json",
data: getJavaData({
if (options.count != 0) { //判断是可以抢购
let buyInfo = {
redemptionPrice: options.price,
couponId: options.couponId,
productName: '印象之旅-200元线路产品优惠券'
}),
async: false,
success: function (res) {
if (options.platform == 'app') {
window.postMessage(JSON.stringify({'action': 'dismissHud'}));
}
if (options.platform == 'H5') {
layer.close(loadingFlag);
}
if (res.resultCode === 1) {
// var timer3 = setInterval(()=>{ //1,需要timer2的定时器走完了 才走timer3的定时器
//
// nownumber = nownumber -1;
// run(1)
// clearInterval(timer3) //2,执行动画之后清除timer3
// },difference*1000)
let title = '印象之旅-200元线路产品优惠券';
let data = {
'action': 'jump', // showToast->一个提示信息 showHud->一个黑色的loading
'page': 'payment',
'pageData': {
'couponId': res.data.couponId,
'title': title,
'price': res.data.preferPrice,
'backType': 'reload',
'data': res.data
}
}
if (options.platform == 'app') {
window.postMessage(JSON.stringify(data));
}
// 跳转到支付
else if (options.platform == 'xcx') {
// window.postMessage(JSON.stringify(data));
let data = {};
data.sOrderNo = res.data.id;
data.sProductName = title;
data.productId = res.data.couponId;
data.dTotalPrice = res.data.preferPrice;
wx.miniProgram.getEnv(function (res) {
window.wx.miniProgram.navigateTo({
url: `/pages/Home/pay/pay?data=` + JSON.stringify(data),
});
});
} else if (options.platform == 'H5') {
let userInfo = getLocalStorage()
let data = {};
data.sOrderNo = res.data.id;
data.sProductName = title;
data.productId = res.data.couponId;
data.dTotalPrice = res.data.preferPrice;
data.customerId = userInfo.customerId;
sessionStorage.setItem("payInfo", JSON.stringify(data));
//window.location.href = 'https://127.0.0.1:5500/html/pay.html';
//window.location.href = 'http://192.168.0.117:5500/html/pay.html';
window.location.href = 'https://activity.oytour.com/html/pay.html';
}
platform:options.platform,
} else {
if (options.platform == 'app') {
window.postMessage(JSON.stringify({'action': 'showToast', 'message': res.message}));
} else {
layer.msg(res.message)
}
layer.msg(res.message)
// window.location.reload()
}
localStorage.buyInfo = JSON.stringify(buyInfo)
window.location.href = 'https://activity.oytour.com/html/Rushbuy.html';
// window.location.href = './Rushbuy.html' ;
}
},
error: function (res) {
console.log(options.platform)
if (options.platform == 'app') {
window.postMessage(JSON.stringify({'action': 'dismissHud'}));
} else if (options.platform == 'H5') {
layer.close(loadingFlag);
} else {
let data = {
'action': 'jump', // showToast->一个提示信息 showHud->一个黑色的loading
'page': 'teamWalker_2',
'pageData': {
'backType': 'pop',
}
}
});
} else {
let data = {
'action': 'jump', // showToast->一个提示信息 showHud->一个黑色的loading
'page': 'teamWalker_2',
'pageData': {
'backType': 'pop',
if (options.platform == 'app') {
window.postMessage(JSON.stringify(data));
}
}
if (options.platform == 'app') {
window.postMessage(JSON.stringify(data));
}
}
}
}else {
window.location.href = 'https://activity.oytour.com/html/login.html'
}
......
let locationName = window.location.hostname;
let RushbuyTime = '2019-11-14';
function getApiUrl() {
let url = {
urlPost: "https://reborn.oytour.com/api/common/post",
......
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