Commit 58f09285 authored by 华国豪's avatar 华国豪 🙄
parents 00a27c96 ce094de2
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
<meta name="description" content="印象之旅 11·18 无敌优惠券正在放送中,赶紧打开抢购,数量有限,先到先得。"> <meta name="description" content="印象之旅 11·18 无敌优惠券正在放送中,赶紧打开抢购,数量有限,先到先得。">
<meta name="x5-orientation" content="portrait"> <meta name="x5-orientation" content="portrait">
</meta> </meta>
<!-- <link rel="shortcut icon" href="../images/favicon.ico" type="image/x-icon" />-->
<link rel="stylesheet" href="../css/GT_activities.css?r=2341654165"> <link rel="stylesheet" href="../css/GT_activities.css?r=2341654165">
<link rel="stylesheet" href="../css/GT_activities2.css" media="screen" type="text/css" /> <link rel="stylesheet" href="../css/GT_activities2.css" media="screen" type="text/css" />
<div id='wx_pic' style='margin:0 auto;display:none;'> <div id='wx_pic' style='margin:0 auto;display:none;'>
...@@ -170,7 +169,7 @@ ...@@ -170,7 +169,7 @@
<!--<script type="text/javascript" src="js/countdown.js"></script>--> <!--<script type="text/javascript" src="js/countdown.js"></script>-->
<script type="text/javascript" src="../js/md5.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="../js/mian.js"></script>
<script src="../js/jquery.dataStatistics.js?r=1354341"></script> <script src="../js/jquery.dataStatistics.js?r=ypi677342"></script>
<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script> <script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
<script type="text/javascript" src="../js/layer/layer.js"></script> <script type="text/javascript" src="../js/layer/layer.js"></script>
<script type="text/javascript" src="../js/yql.js"></script> <script type="text/javascript" src="../js/yql.js"></script>
...@@ -367,7 +366,7 @@ ...@@ -367,7 +366,7 @@
let nowDate = new Date(res.data.currentTime.replace('T', ' ').replace(/-/g, '/')).getTime(); //服务器时间 let nowDate = new Date(res.data.currentTime.replace('T', ' ').replace(/-/g, '/')).getTime(); //服务器时间
let nextActivity = res.data.nextActivity; let nextActivity = res.data.nextActivity;
let nextAc = false; let nextAc = false;
if(nextActivity != null){ if (nextActivity != null) {
nextAc = true nextAc = true
} }
...@@ -383,7 +382,7 @@ ...@@ -383,7 +382,7 @@
count: res.data.count, //判断是否可以抢购 0为不可以 count: res.data.count, //判断是否可以抢购 0为不可以
activityStartDate: activityStartDate, activityStartDate: activityStartDate,
activityEndDate: activityEndDate, activityEndDate: activityEndDate,
nextAc:nextAc nextAc: nextAc
}); //刚进入页面不执行动画 }); //刚进入页面不执行动画
...@@ -702,192 +701,7 @@ ...@@ -702,192 +701,7 @@
window.postMessage(JSON.stringify(data)); window.postMessage(JSON.stringify(data));
}) })
setInterval(() => {
$('.digit_set').empty()
$.ajax({
type: "POST",
url: `${getApiUrl().urlJava}api/appActivity/getUserPurchaseTime`,
contentType: "application/json",
data: getJavaData({}),
async: false,
success: function(res) {
if (res.resultCode === 1) {
getTicketList(res.data.couponId);
let num = res.data.repertory; //优惠券总共数量
// let num = 5000; //优惠券总共数量
$('.box_title_2 p').html(res.data.redemptionPrice + '元抢购');
$('.box_title h5').html(res.data.remark);
$('.explain p').html('活动规则' + '<br/>' + res.data.instructions);
if (login == false) {
$('.use_o').html('暂无登录');
} else {
$('.use_o').html(res.data.contact);
$('.use_t').html(res.data.customerName);
}
let activityStartDate = new Date(res.data.activityStartDate.replace('T', ' ').replace(/-/g, '/')).getTime(); //活动开始时间
let activityEndDate = new Date(res.data.activityEndDate.replace('T', ' ').replace(/-/g, '/')).getTime(); //活动结束时间
let nowDate = new Date(res.data.currentTime.replace('T', ' ').replace(/-/g, '/')).getTime(); //服务器时间
let nextActivity = res.data.nextActivity;
let nextAc = false;
if(nextActivity != null){
nextAc = true
}
$('.dataStatistics').dataStatistics({
max: num,
min: num,
len: 4,
add: true,
price: res.data.redemptionPrice,
couponId: res.data.couponId,
platform: platform,
login: login,
count: res.data.count, //判断是否可以抢购 0为不可以
activityStartDate: activityStartDate,
activityEndDate: activityEndDate,
nextAc:nextAc
}); //刚进入页面不执行动画
// let activityStartDate = new Date('2019/11/08 17:43:50').getTime();
// let activityEndDate = new Date('2019/11/14 11:23:00').getTime(); //活动结束时间
if (nextActivity != null) {
let nexttime = nextActivity.activityStartDate;
let year = nexttime.split('T')[0].split('-')[0];
let month = nexttime.split('T')[0].split('-')[1];
let day = nexttime.split('T')[0].split('-')[2];
let hour = nexttime.split('T')[1].split(':')[0];
$('.notice_content').html('下期活动将于' + year + '年' + month + '月' + day + '日' + hour + '点开始。');
$('.notice_content2').html('届时会有' + nextActivity.couponCount + '张价值' + nextActivity.denomination + '的折扣券等待您的抢 购(抢购价' + nextActivity.redemptionPrice + '元),请准时参加。');
// var time2 = setInterval(setTimer3, 1000); //计时器
let beforeDawn = new Date(year + '/' + month + '/' + day + ' 00:00:00').getTime()
let time = ((beforeDawn - nowDate) / 1000).toFixed(0);
runtime(time)
}
//判断当前时间是否到了抢购时间
if (activityStartDate >= nowDate) { //没到抢购时间 显示抢购的具体时间
$('#t1').html('抢购时间:');
$('#t2').html('');
let startDate = res.data.activityStartDate;
let month = startDate.split('T')[0].split('-')[1];
let day = startDate.split('T')[0].split('-')[2];
let hour = startDate.split('T')[1].split(':')[0];
$('#p1').html(month);
$('#p2').html(day);
$('#p3').html(hour);
$('#t3').html('月');
$('#t4').html('日');
$('#t5').html('点整');
$('.img_btn p').html('立即抢购');
$('.img_btn').css("background-image", "url(../images/nobuy_btn.png)");
$('.img_btn p').css("color", "#FFFFFF");
// $(".received_img").attr("src", "");
let time = ((activityStartDate - nowDate) / 1000).toFixed(0);
runtime(time)
} else if (nowDate > activityEndDate || res.data.activityIsEnding == 1) { // 活动时间已过
// $(".received_img").attr("src", "");
$('.img_bg_M').css("background-image", "url(../images/MJ_200@3x.png)");
$('.img_bg_p1').css("color", "#CCCCCC");
$('.img_bg_p2').css("color", "#CCCCCC");
$('.img_btn p').css("color", "#FFFFFF");
$('.img_btn p').html('活动结束')
$('.box_content_t').hide()
$('.img_btn').css("background-image", "url(../images/nobuy_btn.png)");
$('.dataStatistics').css('display', "none");
$('.deta_replace').css('display', "flex");
$('#notice').css('display', "block");
$('.notice_img').css('display', "block");
} else { // 到了抢购的时间显示距离结束时间的倒计时
currentTime = res.data.currentTime.replace('T', ' ').replace(/-/g, '/');
end = res.data.activityEndDate.replace('T', ' ').replace(/-/g, '/');
if (num > 0) {
$('#t1').html('结束倒计时:')
if (res.data.count != 0) {
// $(".received_img").attr("src", "");
$('.img_btn p').html('立即抢购');
} else {
$('.img_btn p').html('去使用');
$(".received_img").css('display', "block");
$('.img_btn').css("background-image", "url(../images/buy_btn.png)");
}
} else {
// $(".received_img").attr("src", "");
$('.img_bg_M').css("background-image", "url(../images/MJ_200@3x.png)");
$('.img_bg_p1').css("color", "#CCCCCC");
$('.img_bg_p2').css("color", "#CCCCCC");
$('.img_btn p').css("color", "#FFFFFF");
$('.img_btn p').html('活动结束')
$('.box_content_t').hide()
$('.img_btn').css("background-image", "url(../images/nobuy_btn.png)");
$('.dataStatistics').css('display', "none");
$('.deta_replace').css('display', "flex");
$('#notice').css('display', "block");
$('.notice_img').css('display', "block");
}
}
//优惠券的有限时间
let expirationDate = (res.data.expirationDate).split('T')[0].replace(/-/g, '.');
let title = $('.img_bg_p1').text()
let RushbuyTime = {
RushbuyTime: expirationDate,
title: title,
userName: res.data.contact,
shopName: res.data.customerName,
}
localStorage.RushbuyTime = JSON.stringify(RushbuyTime)
$('.img_bg_p2').html('有效期截止:' + expirationDate)
} else {
$('.dataStatistics').dataStatistics({
max: 0,
min: 0,
len: 4,
add: true
}); //刚进入页面不执行动画
}
// clearInterval(xhtime)
},
error: function(res) {
layer.msg(res.message)
$('.dataStatistics').dataStatistics({
max: 0,
min: 0,
len: 4,
add: true
}); //刚进入页面不执行动画
}
});
}, 300000) //5分钟请求一次接口
</script> </script>
</body> </body>
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
.main { .main {
width: 100%; width: 100%;
height: 100%; height: 100%;
background: url(../images/gongxi4.png) no-repeat; background: url(../images/gongxi4.jpg) no-repeat;
background-size: 100%; background-size: 100%;
background-color: #8d54cc; background-color: #8d54cc;
position: relative; position: relative;
...@@ -238,7 +238,7 @@ ...@@ -238,7 +238,7 @@
<script type="text/javascript" src="../js/jquery-1.10.2.js"></script> <script type="text/javascript" src="../js/jquery-1.10.2.js"></script>
<script type="text/javascript" src="../js/md5.js"></script> <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/layer/layer.js"></script>
<script type="text/javascript" src="../js/mian.js?r=12312312312"></script> <script type="text/javascript" src="../js/mian.js?r=123123123192"></script>
<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script> <script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
<script> <script>
...@@ -408,7 +408,6 @@ ...@@ -408,7 +408,6 @@
} else { } else {
layer.msg(res.message) layer.msg(res.message)
} }
layer.msg(res.message)
// window.location.reload() // window.location.reload()
......
<html lang="en"> <html lang="en">
<head> <head>
<meta http-equiv="Content-Type" content="span/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="span/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="divport" <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" />
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 name="screen-orientation" content="portrait">
</meta> </meta>
<meta name="x5-orientation" content="portrait"> <meta name="x5-orientation" content="portrait">
...@@ -11,161 +11,209 @@ ...@@ -11,161 +11,209 @@
<title>我的优惠券</title> <title>我的优惠券</title>
</head> </head>
<style> <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 { 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; margin: 0;
padding: 0; padding: 0;
} }
.coupons_page{
width:100%; .coupons_page {
min-height:100%; width: 100%;
padding-bottom:3rem; min-height: 100%;
background-color:#F8F5F5; padding-bottom: 3rem;
background-color: #F8F5F5;
} }
.coupons_title{
width:100%; .coupons_title {
width: 100%;
display: flex; display: flex;
font-size:2rem; font-size: 2rem;
position: relative; position: relative;
height:6rem; height: 6rem;
color:#000000; color: #000000;
align-items: center; align-items: center;
border:0; border: 0;
background-color: #fff; background-color: #fff;
box-shadow: 0 7px 16px -7px #d1d1d1; box-shadow: 0 7px 16px -7px #d1d1d1;
} }
.coupons_Top{
width:100%; .coupons_Top {
height:8rem; width: 100%;
height: 8rem;
text-align: center; text-align: center;
font-size:2.3rem; font-size: 2.3rem;
line-height: 8rem; line-height: 8rem;
color:#000000; color: #000000;
background-color: #fff; background-color: #fff;
} }
.coupons_Top img{
.coupons_Top img {
position: relative; position: relative;
left:3rem; left: 3rem;
top:3rem; top: 3rem;
float:left; float: left;
} }
.coupons_Navone{
width:20%; .coupons_Navone {
width: 20%;
position: relative; position: relative;
text-align: left; text-align: left;
padding-left:3rem; padding-left: 3rem;
line-height: 6rem; line-height: 6rem;
} }
.arrow_down { .arrow_down {
width:0; width: 0;
height:0; height: 0;
position:absolute; position: absolute;
right:2rem; right: 2rem;
top:3rem; top: 3rem;
border-left:0.6rem solid transparent; border-left: 0.6rem solid transparent;
border-right:0.6rem solid transparent; border-right: 0.6rem solid transparent;
border-top:0.6rem solid #666666; border-top: 0.6rem solid #666666;
} }
.coupons_NavTwo{
width:80%; .coupons_NavTwo {
width: 80%;
display: flex; display: flex;
align-items: center; align-items: center;
} }
.coupons_NavTwo>div{
.coupons_NavTwo>div {
flex-grow: 1; flex-grow: 1;
text-align: center; text-align: center;
line-height: 6rem; line-height: 6rem;
} }
.coupons_tyList{
.coupons_tyList {
position: absolute; position: absolute;
width:100%; width: 100%;
padding-bottom:2rem; padding-bottom: 2rem;
background-color: #fff; background-color: #fff;
box-shadow: 0 7px 16px -7px #d1d1d1; box-shadow: 0 7px 16px -7px #d1d1d1;
top:6.1rem; top: 6.1rem;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
display: none; display: none;
z-index:999; z-index: 999;
} }
.coupons_tyList span{
.coupons_tyList span {
display: inline-block; display: inline-block;
background-color: #EEEEEE; background-color: #EEEEEE;
color:#000000; color: #000000;
width:11rem; width: 11rem;
height:5rem; height: 5rem;
text-align: center; text-align: center;
line-height: 5rem; line-height: 5rem;
border-radius: 1rem; border-radius: 1rem;
margin:2rem 1.9rem 0; margin: 2rem 1.9rem 0;
} }
.coupons_tyList span:nth-child(4n+4){
margin-right:0; .coupons_tyList span:nth-child(4n+4) {
margin-right: 0;
} }
.bd_right{
.bd_right {
position: absolute; position: absolute;
width:1px; width: 1px;
height:2.5rem; height: 2.5rem;
right:0; right: 0;
top:2rem; top: 2rem;
background-color: #CFCFCF; background-color: #CFCFCF;
} }
.coupons_Content{
width:100%; .coupons_Content {
width: 100%;
/* height:87.2%; /* height:87.2%;
overflow: scroll; */ overflow: scroll; */
} }
.coupons_List{
width:80%; .coupons_List {
height:16rem; width: 80%;
height: 16rem;
background-color: #fff; background-color: #fff;
border-radius: 3rem; border-radius: 3rem;
margin:3rem auto; margin: 3rem auto;
display: flex; display: flex;
padding:0 3rem; padding: 0 3rem;
align-items: center; align-items: center;
position: relative; position: relative;
} }
.Coupon_leftImg{
.Coupon_leftImg {
position: relative; position: relative;
color:#fff; color: #fff;
}
.Coupon_leftImg img{
width:12rem;
}
.dikouPrice{
position:absolute;
top:1.5rem;
left:3.5rem;
font-size:4rem;
} }
.dikouPrice span{
font-size:2rem; .Coupon_leftImg img {
width: 12rem;
} }
.dikouName{
.dikouPrice {
position: absolute; position: absolute;
bottom:2rem; top: 1.5rem;
left:3rem; left: 3.5rem;
font-size:2rem; font-size: 4rem;
} }
.Coupon_right{
height:12rem; .dikouPrice span {
margin-left:2rem; font-size: 2rem;
} }
.Coupon_rightOne{
font-size:2rem; .dikouName {
color:#000000; position: absolute;
} bottom: 2rem;
.Coupon_gty{ left: 3rem;
font-size: 2rem;
}
.Coupon_right {
height: 12rem;
margin-left: 2rem;
}
.Coupon_rightOne {
font-size: 2rem;
color: #000000;
}
.Coupon_gty {
display: inline-block; display: inline-block;
padding:0.2rem 0.8rem; padding: 0.2rem 0.8rem;
margin-left:1rem; margin-left: 1rem;
} }
.Coupon_xianlu{
width:26rem; .Coupon_xianlu {
font-size:1.8rem; width: 26rem;
margin-top:1rem; font-size: 1.8rem;
height:5rem; margin-top: 1rem;
color:#666666; height: 5rem;
color: #666666;
text-overflow: -o-ellipsis-lastline; text-overflow: -o-ellipsis-lastline;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
...@@ -174,138 +222,175 @@ ...@@ -174,138 +222,175 @@
line-clamp: 2; line-clamp: 2;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
} }
.Coupon_Time{
font-size:1.8rem; .Coupon_Time {
color:#C2C2C2; font-size: 1.8rem;
margin-top:1rem; color: #C2C2C2;
margin-top: 1rem;
} }
.goToUse{
.goToUse {
position: absolute; position: absolute;
width:9rem; width: 9rem;
outline: none; outline: none;
border-radius:1rem; border-radius: 1rem;
border:0; border: 0;
font-size:2rem; font-size: 2rem;
font:2rem; font: 2rem;
right:2rem; right: 2rem;
color:#fff; color: #fff;
} }
.gtyTitle{
.gtyTitle {
background-color: #61DCD4; background-color: #61DCD4;
color:#1D9890; color: #1D9890;
} }
.zyxTitle{
.zyxTitle {
background-color: #FD7F56; background-color: #FD7F56;
color:#D4542A; color: #D4542A;
} }
.mpTitle{
.mpTitle {
background-color: #6AA8F9; background-color: #6AA8F9;
color:#3C67A0; color: #3C67A0;
} }
.ddyTitle{
.ddyTitle {
background-color: #F36C9B; background-color: #F36C9B;
color:#CC3C6E; color: #CC3C6E;
} }
.dzyTitle{
.dzyTitle {
background-color: #18B8ED; background-color: #18B8ED;
color:#2884A3; color: #2884A3;
} }
.qzTitle{
.qzTitle {
background-color: #E9EB33; background-color: #E9EB33;
color:#B8A313; color: #B8A313;
} }
.jpTitle{
.jpTitle {
background-color: #FF9600; background-color: #FF9600;
color:#BA6E01; color: #BA6E01;
} }
.meishiTitle{
.meishiTitle {
background-color: #1FC13E; background-color: #1FC13E;
color:#378F47; color: #378F47;
} }
.ygqTitle{
.ygqTitle {
background-color: #E0E0E0; background-color: #E0E0E0;
color:#9E9E9E; color: #9E9E9E;
} }
.gtyUse{ .gtyUse {
background-color: #26C6A5; /* 不支持线性的时候显示 */ background-color: #26C6A5;
background-image: linear-gradient(to right, #26C6A5 , #61DCD4); /* 不支持线性的时候显示 */
background-image: linear-gradient(to right, #26C6A5, #61DCD4);
} }
.zyxUse{
background-color: #FD7F56; /* 不支持线性的时候显示 */ .zyxUse {
background-image: linear-gradient(to right, #FD7F56 , #FFC291); background-color: #FD7F56;
/* 不支持线性的时候显示 */
background-image: linear-gradient(to right, #FD7F56, #FFC291);
} }
.mpUse{
background-color: #3C67A0; /* 不支持线性的时候显示 */ .mpUse {
background-image: linear-gradient(to right, #3C67A0 , #88ADDD); background-color: #3C67A0;
/* 不支持线性的时候显示 */
background-image: linear-gradient(to right, #3C67A0, #88ADDD);
} }
.ddyUse{
background-color: #F36C9B; /* 不支持线性的时候显示 */ .ddyUse {
background-image: linear-gradient(to right, #F36C9B , #FEA7C6); background-color: #F36C9B;
/* 不支持线性的时候显示 */
background-image: linear-gradient(to right, #F36C9B, #FEA7C6);
} }
.dzyUse{
background-color: #18B8ED; /* 不支持线性的时候显示 */ .dzyUse {
background-image: linear-gradient(to right, #18B8ED , #89D6EF); background-color: #18B8ED;
/* 不支持线性的时候显示 */
background-image: linear-gradient(to right, #18B8ED, #89D6EF);
} }
.qzUse{
background-color: #EBD333; /* 不支持线性的时候显示 */ .qzUse {
background-image: linear-gradient(to right, #EBD333 , #EBF38C); background-color: #EBD333;
/* 不支持线性的时候显示 */
background-image: linear-gradient(to right, #EBD333, #EBF38C);
} }
.jpUse{
background-color: #FF9600; /* 不支持线性的时候显示 */ .jpUse {
background-image: linear-gradient(to right, #FF9600 , #FFC600); background-color: #FF9600;
/* 不支持线性的时候显示 */
background-image: linear-gradient(to right, #FF9600, #FFC600);
} }
.meishiUse{
background-color: #1FC13E; /* 不支持线性的时候显示 */ .meishiUse {
background-image: linear-gradient(to right, #1FC13E , #5AE19A); background-color: #1FC13E;
/* 不支持线性的时候显示 */
background-image: linear-gradient(to right, #1FC13E, #5AE19A);
} }
.ygqUse{
background-color: #C9C9C9; /* 不支持线性的时候显示 */ .ygqUse {
background-image: linear-gradient(to right, #C9C9C9 , #E1E1E1); background-color: #C9C9C9;
/* 不支持线性的时候显示 */
background-image: linear-gradient(to right, #C9C9C9, #E1E1E1);
} }
.goToDownLoad{ .goToDownLoad {
position: fixed; position: fixed;
right:0; right: 0;
bottom:20rem; bottom: 20rem;
} }
.goToDownLoad div{
.goToDownLoad div {
position: relative; position: relative;
} }
.goToDownLoad span{
.goToDownLoad span {
position: absolute; position: absolute;
font-size:2rem; font-size: 2rem;
top:2.5rem; top: 2.5rem;
left:8rem; left: 8rem;
color:#fff; color: #fff;
} }
.goToDownLoad span img{
margin-left:1rem; .goToDownLoad span img {
} margin-left: 1rem;
.downloadImg{ }
width:27rem;
} .downloadImg {
.Coupons_active{ width: 27rem;
color:#EE4454; }
}
.layui-layer-content{ .Coupons_active {
font-size:1.8rem!important; color: #EE4454;
padding:2rem 1rem!important; }
}
.activeClick{ .layui-layer-content {
font-size: 1.8rem!important;
padding: 2rem 1rem!important;
}
.activeClick {
background-color: #FCDADD!important; background-color: #FCDADD!important;
color:#EE4454!important; color: #EE4454!important;
} }
.zanwu{
width:100%; .zanwu {
text-align:center; width: 100%;
margin-top:2rem; text-align: center;
margin-top: 2rem;
} }
.zanwurenhe{
width:100%; .zanwurenhe {
text-align:center; width: 100%;
margin-top:1rem; text-align: center;
font-size:2rem; margin-top: 1rem;
font-size: 2rem;
} }
</style> </style>
...@@ -313,7 +398,7 @@ ...@@ -313,7 +398,7 @@
<div class="coupons_page"> <div class="coupons_page">
<div class="coupons_title"> <div class="coupons_title">
<div class="coupons_Navone" onclick="showList()"> <div class="coupons_Navone" onclick="showList()">
<span class="useType">不限</span> <span class="useType">不限</span>
<div class="arrow_down"></div> <div class="arrow_down"></div>
<i class="bd_right"></i> <i class="bd_right"></i>
</div> </div>
...@@ -380,9 +465,9 @@ ...@@ -380,9 +465,9 @@
</div> </div>
<div class="goToDownLoad"> <div class="goToDownLoad">
<div> <div>
<img class="downloadImg" src="../images/login/godownload.png" alt=""/> <img class="downloadImg" src="../images/godownload.png" alt="" />
<span onclick="goDownLoad()"> <span onclick="goDownLoad()">
下载同业App使用<img src="../images/login/arrowR.png" alt=""/> 下载同业App使用<img src="../images/arrowR.png" alt=""/>
</span> </span>
</div> </div>
</div> </div>
...@@ -394,102 +479,102 @@ ...@@ -394,102 +479,102 @@
<script src="../js/md5.js"></script> <script src="../js/md5.js"></script>
<script> <script>
$(function(){ $(function() {
pushHistory(); pushHistory();    
    window.addEventListener("popstate", function(e) { window.addEventListener("popstate", function(e) {     //根据自己的需求实现自己的功能
    //根据自己的需求实现自己的功能 window.location.href = 'https://activity.oytour.com/html/GT_activities.html';  
window.location.href = 'https://activity.oytour.com/html/GT_activities.html'; }, false);  
  }, false); function pushHistory() {    
  function pushHistory() { var state = {    
    var state = { title: "title",
    title: "title",     url: "#"  
    url: "#" };    
  }; window.history.pushState(state, "title", "#");  
    window.history.pushState(state, "title", "#"); }
  } $(document).click(function(e) {
$(document).click(function(e){
var target = $(e.target); var target = $(e.target);
if(target.closest(".coupons_Navone").length != 0) return; if (target.closest(".coupons_Navone").length != 0) return;
$(".coupons_tyList").slideUp(); $(".coupons_tyList").slideUp();
}); });
$(".coupons_tyList").click(function(event){ $(".coupons_tyList").click(function(event) {
event.stopPropagation(); event.stopPropagation();
}); });
$(".coupons_tyList span").click(function(){ $(".coupons_tyList span").click(function() {
$(this).addClass('activeClick').siblings().removeClass('activeClick'); $(this).addClass('activeClick').siblings().removeClass('activeClick');
$('.coupons_tyList').slideToggle(300); $('.coupons_tyList').slideToggle(300);
$('.useType').html($(this).html()); $('.useType').html($(this).html());
$('.coupons_NavTwo div:first-child').addClass('Coupons_active').siblings().removeClass('Coupons_active'); $('.coupons_NavTwo div:first-child').addClass('Coupons_active').siblings().removeClass('Coupons_active');
}) })
$('.coupons_NavTwo div').click(function(){ $('.coupons_NavTwo div').click(function() {
$(this).addClass('Coupons_active').siblings().removeClass('Coupons_active'); $(this).addClass('Coupons_active').siblings().removeClass('Coupons_active');
}) })
getAllTicket(0,'',1); getAllTicket(0, '', 1);
}) })
function showList(){
function showList() {
$('.coupons_tyList').slideToggle(300); $('.coupons_tyList').slideToggle(300);
} }
//获取所有优惠券 //获取所有优惠券
function getAllTicket(couponsUseScope,couponsType,couponEffectStatus){ function getAllTicket(couponsUseScope, couponsType, couponEffectStatus) {
let msg={ let msg = {
pageIndex: 1, pageIndex: 1,
pageSize: 1000, pageSize: 1000,
useState: 1, useState: 1,
lineId: 0, lineId: 0,
lineteamId: 0, lineteamId: 0,
couponsName: "", couponsName: "",
couponsType: couponsType, couponsType: couponsType,
couponStatus: 1, couponStatus: 1,
couponEffectStatus: couponEffectStatus, couponEffectStatus: couponEffectStatus,
couponsUseScope: couponsUseScope couponsUseScope: couponsUseScope
} }
// coupon 优惠券使用范围 1:全场通用,2:团队,3:签证,4:机票,5:门票,6:车辆,7:自由行,8:当地游,9:定制游,10:酒店,11:餐厅 // coupon 优惠券使用范围 1:全场通用,2:团队,3:签证,4:机票,5:门票,6:车辆,7:自由行,8:当地游,9:定制游,10:酒店,11:餐厅
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: `${getApiUrl().urlJava}api/b2b/user/getUserCouponAllotList`, url: `${getApiUrl().urlJava}api/b2b/user/getUserCouponAllotList`,
contentType: "application/json", contentType: "application/json",
data: getAjaxData('getUserCouponAllotList', msg), data: getAjaxData('getUserCouponAllotList', msg),
async: false, async: false,
success: function (res) { success: function(res) {
if (res.resultCode === 1) { if (res.resultCode === 1) {
let dataArr=res.data.pageData; let dataArr = res.data.pageData;
let str=''; let str = '';
if(dataArr.length>0){ if (dataArr.length > 0) {
for(var i=0;i<dataArr.length;i++){ for (var i = 0; i < dataArr.length; i++) {
str+=`<div class="coupons_List"> str += `<div class="coupons_List">
<div class="Coupon_leftImg">` <div class="Coupon_leftImg">`
if(dataArr[i].couponsUseScope==1){ if (dataArr[i].couponsUseScope == 1) {
str+=` <img src="../images/login/gty.png" alt=""/>` str += ` <img src="../images/login/gty.png" alt=""/>`
} }
if(dataArr[i].couponsUseScope==2){ if (dataArr[i].couponsUseScope == 2) {
str+=` <img src="../images/login/gty.png" alt=""/>` str += ` <img src="../images/login/gty.png" alt=""/>`
} }
if(dataArr[i].couponsUseScope==7){ if (dataArr[i].couponsUseScope == 7) {
str+=` <img src="../images/login/zyx.png" alt=""/>` str += ` <img src="../images/login/zyx.png" alt=""/>`
} }
if(dataArr[i].couponsUseScope==8){ if (dataArr[i].couponsUseScope == 8) {
str+=` <img src="../images/login/ddy.png" alt=""/>` str += ` <img src="../images/login/ddy.png" alt=""/>`
} }
if(dataArr[i].couponsUseScope==5){ if (dataArr[i].couponsUseScope == 5) {
str+=` <img src="../images/login/mp.png" alt=""/>` str += ` <img src="../images/login/mp.png" alt=""/>`
} }
if(dataArr[i].couponsUseScope==11){ if (dataArr[i].couponsUseScope == 11) {
str+=` <img src="../images/login/dzy.png" alt=""/>` str += ` <img src="../images/login/dzy.png" alt=""/>`
} }
if(dataArr[i].couponsUseScope==10){ if (dataArr[i].couponsUseScope == 10) {
str+=` <img src="../images/login/meishi.png" alt=""/>` str += ` <img src="../images/login/meishi.png" alt=""/>`
} }
if(dataArr[i].couponsUseScope==3){ if (dataArr[i].couponsUseScope == 3) {
str+=` <img src="../images/login/qz.png" alt=""/>` str += ` <img src="../images/login/qz.png" alt=""/>`
} }
if(dataArr[i].couponsUseScope==4){ if (dataArr[i].couponsUseScope == 4) {
str+=` <img src="../images/login/jp.png" alt=""/>` str += ` <img src="../images/login/jp.png" alt=""/>`
} }
if(dataArr[i].couponEffectStatus==3){ if (dataArr[i].couponEffectStatus == 3) {
str+=` <img src="../images/login/guoqi.png" alt=""/>` str += ` <img src="../images/login/guoqi.png" alt=""/>`
} }
str+=`<div class="dikouPrice"> str += `<div class="dikouPrice">
<span>¥</span>${dataArr[i].denomination} <span>¥</span>${dataArr[i].denomination}
</div> </div>
<div class="dikouName">折扣券</div> <div class="dikouName">折扣券</div>
...@@ -505,48 +590,49 @@ ...@@ -505,48 +590,49 @@
<div class="Coupon_Time"> <div class="Coupon_Time">
${getDate(dataArr[i].effectDate)} - ${getDate(dataArr[i].expirationDate)} ${getDate(dataArr[i].effectDate)} - ${getDate(dataArr[i].expirationDate)}
</div>` </div>`
str+=`</div>` str += `</div>`
if(dataArr[i].fromPlatform==0){ if (dataArr[i].fromPlatform == 0) {
str+=`<img class="goToUse" src="../images/login/all.png"/>` str += `<img class="goToUse" src="../images/login/all.png"/>`
} }
if(dataArr[i].fromPlatform==1){ if (dataArr[i].fromPlatform == 1) {
str+=`<img class="goToUse" src='../images/login/app.png'/>` str += `<img class="goToUse" src='../images/login/app.png'/>`
} }
if(dataArr[i].fromPlatform==2){ if (dataArr[i].fromPlatform == 2) {
str+=`<img class="goToUse" src='../images/login/xcx.png'/>` str += `<img class="goToUse" src='../images/login/xcx.png'/>`
} }
if(dataArr[i].fromPlatform==3){ if (dataArr[i].fromPlatform == 3) {
str+=`<img class="goToUse" src='../images/login/pc.png'/>` str += `<img class="goToUse" src='../images/login/pc.png'/>`
} }
str+=`</div>` str += `</div>`
} }
}else{ } else {
str+=`<div class="zanwu"> str += `<div class="zanwu">
<img src="../images/login/zanwu.png" alt=""/> <img src="../images/login/zanwu.png" alt=""/>
<div class="zanwurenhe">暂无任何优惠券</div> <div class="zanwurenhe">暂无任何优惠券</div>
</div>` </div>`
} }
$('.coupons_Content').html(str); $('.coupons_Content').html(str);
}else{ } else {
layer.msg('登录已过期,请重新登录'); layer.msg('登录已过期,请重新登录');
setTimeout(function(){ setTimeout(function() {
localStorage.removeItem("u"); localStorage.removeItem("u");
window.location.href = 'https://activity.oytour.com/html/login.html'; window.location.href = 'https://activity.oytour.com/html/login.html';
},2000) }, 2000)
} }
}, },
error: function (res) { error: function(res) {
layer.msg(res.message); layer.msg(res.message);
} }
}); });
} }
//格式化日期 //格式化日期
function getDate(date){ function getDate(date) {
return date.split(' ')[0]; return date.split(' ')[0];
} }
//跳转至下载 //跳转至下载
function goDownLoad(){ function goDownLoad() {
window.location.href = 'https://activity.oytour.com/html/downloadApp.html'; window.location.href = 'https://activity.oytour.com/html/downloadApp.html';
} }
</script> </script>
</html>
</html>
\ No newline at end of file
<html lang="en"> <html lang="en">
<head> <head>
<meta http-equiv="Content-Type" content="span/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="span/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="divport" <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" />
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 name="screen-orientation" content="portrait">
</meta> </meta>
<meta name="x5-orientation" content="portrait"> <meta name="x5-orientation" content="portrait">
...@@ -11,74 +11,104 @@ ...@@ -11,74 +11,104 @@
<title>登录</title> <title>登录</title>
</head> </head>
<style> <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 { 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; margin: 0;
padding: 0; padding: 0;
} }
.login_page{
.login_page {
position: relative; position: relative;
height: 100%; height: 100%;
background-color: #FFFFFF; background-color: #FFFFFF;
background-image: url('../images/login/login_bg.png'); background-image: url('../images/login_bg.jpg');
background-size:cover; background-size: cover;
} }
.login_page .page__bd{
.login_page .page__bd {
position: relative; position: relative;
z-index: 2; z-index: 2;
padding-top: 33rem; padding-top: 33rem;
} }
.login_page .header{ .login_page .header {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
width: 100%; width: 100%;
} }
.login_page .header_span{
font-size:3rem; .login_page .header_span {
color:#EE4454; font-size: 3rem;
margin-top:0.5rem; color: #EE4454;
margin-top: 0.5rem;
} }
.login_page .header_image{
.login_page .header_image {
width: 10rem; width: 10rem;
height: 10rem; height: 10rem;
} }
.login_page .headBg{ .login_page .headBg {
position: relative; position: relative;
width: 54rem; width: 54rem;
height: 50rem; height: 50rem;
margin: 0 auto; margin: 0 auto;
} }
.login_page .headBgImg{
.login_page .headBgImg {
position: absolute; position: absolute;
width: 100%; width: 100%;
height: 100%; height: 100%;
z-index: -1; z-index: -1;
} }
.login_page .form{
.login_page .form {
margin: 6rem 0 0 0; margin: 6rem 0 0 0;
padding: 0 6rem; padding: 0 6rem;
} }
.login_page .form_item1{ .login_page .form_item1 {
width: 100%; width: 100%;
height: 6rem; height: 6rem;
display: flex; display: flex;
align-items: center; align-items: center;
} }
.login_page .form_item2{ .login_page .form_item2 {
margin: 3rem 0 0 0; margin: 3rem 0 0 0;
width: 100%; width: 100%;
height: 6rem; height: 6rem;
display: flex; display: flex;
align-items: center; align-items: center;
} }
.login_page .form_item_icoBox{ .login_page .form_item_icoBox {
flex-shrink: 0; flex-shrink: 0;
display: flex; display: flex;
justify-content: center; justify-content: center;
...@@ -88,13 +118,13 @@ ...@@ -88,13 +118,13 @@
border: 1px solid #257BF1; border: 1px solid #257BF1;
border-radius: 50%; border-radius: 50%;
} }
.login_page .form_item_ico{ .login_page .form_item_ico {
width:2.5rem; width: 2.5rem;
height:2.5rem height: 2.5rem
} }
.login_page .form_item_inBox{ .login_page .form_item_inBox {
margin: 0 0 0 10px; margin: 0 0 0 10px;
flex-grow: 1; flex-grow: 1;
display: flex; display: flex;
...@@ -102,125 +132,143 @@ ...@@ -102,125 +132,143 @@
height: 6rem; height: 6rem;
border-bottom: 1px solid #666666; border-bottom: 1px solid #666666;
} }
.login_page .form_item_input{ .login_page .form_item_input {
flex-grow: 1; flex-grow: 1;
font-size: 14px; font-size: 14px;
color: #333333; color: #333333;
text-align: left; text-align: left;
padding-left: 5rem; padding-left: 5rem;
height: 4rem; height: 4rem;
border:0; border: 0;
outline: 0; outline: 0;
font-size:2rem; font-size: 2rem;
margin-top:1rem; margin-top: 1rem;
} }
.login_page .login_Zh{
font-size:2rem; .login_page .login_Zh {
margin:0.5rem 0 0 0.8rem; font-size: 2rem;
color:#111111; margin: 0.5rem 0 0 0.8rem;
color: #111111;
} }
input::-webkit-input-placeholder { /* WebKit browsers */
color:#CCCCCC; input::-webkit-input-placeholder {
/* WebKit browsers */
color: #CCCCCC;
} }
.login_page .login_btn{ .login_page .login_btn {
margin:0 auto; margin: 0 auto;
font-size: 2rem; font-size: 2rem;
color: #FFFFFF; color: #FFFFFF;
background-color: #C2D6F2; background-color: #C2D6F2;
width:17rem; width: 17rem;
height:6rem; height: 6rem;
line-height:6rem; line-height: 6rem;
outline: none; outline: none;
border:0; border: 0;
border-radius: 4rem; border-radius: 4rem;
position: absolute; position: absolute;
bottom:-1rem; bottom: -1rem;
left:50%; left: 50%;
margin-left:-8.5rem; margin-left: -8.5rem;
background:rgba(238,68,84,1); background: rgba(238, 68, 84, 1);
box-shadow:0px 6px 6px 0px rgba(139,139,139,0.25); box-shadow: 0px 6px 6px 0px rgba(139, 139, 139, 0.25);
} }
.login_page .jihuoDiv{
margin-top:6rem; .login_page .jihuoDiv {
text-align:center; margin-top: 6rem;
font-size:2rem; text-align: center;
color:#999; font-size: 2rem;
} color: #999;
.login_page .jilijihuo{ }
color:#EE4454;
} .login_page .jilijihuo {
.login_page .login_xieyi{ color: #EE4454;
}
.login_page .login_xieyi {
position: absolute; position: absolute;
bottom:3rem; bottom: 3rem;
font-size:2rem; font-size: 2rem;
width:100%; width: 100%;
z-index:99; z-index: 99;
text-align: center; text-align: center;
color:#111111; color: #111111;
} }
.login_page .login_xieyi span:last-child{
color:#EE4454; .login_page .login_xieyi span:last-child {
color: #EE4454;
text-decoration: underline; text-decoration: underline;
} }
.form_validate_input{
.form_validate_input {
color: #333333; color: #333333;
text-align: left; text-align: left;
padding-left: 3rem; padding-left: 3rem;
height: 4rem; height: 4rem;
width:16rem; width: 16rem;
border: 0; border: 0;
outline: 0; outline: 0;
font-size: 2rem; font-size: 2rem;
margin-top: 1rem; margin-top: 1rem;
} }
.login_yzm{
font-size:2rem; .login_yzm {
color:#EE4454; font-size: 2rem;
display:inline-block; color: #EE4454;
padding:0 2rem; display: inline-block;
border-left:1px solid #666666; padding: 0 2rem;
border-left: 1px solid #666666;
} }
.login_jihuo,.login_Agreement{
.login_jihuo,
.login_Agreement {
display: none; display: none;
} }
.login_Agreement{
width:100%; .login_Agreement {
height:100%; width: 100%;
height: 100%;
} }
.boxcenter{
padding:0 2rem; .boxcenter {
padding: 0 2rem;
} }
.login_Agreement .boxcenter h1 { .login_Agreement .boxcenter h1 {
font-size: 2.3rem; font-size: 2.3rem;
margin-top: 3rem; margin-top: 3rem;
line-height: 4rem; line-height: 4rem;
} }
.login_Agreement .boxcenter span { .login_Agreement .boxcenter span {
font-size: 2rem; font-size: 2rem;
display: inline-block; display: inline-block;
margin-top: 1rem; margin-top: 1rem;
line-height: 4rem; line-height: 4rem;
} }
.login_AgreeTitle{
width:100%; .login_AgreeTitle {
height:8rem; width: 100%;
height: 8rem;
text-align: center; text-align: center;
font-size:2.3rem; font-size: 2.3rem;
line-height: 8rem; line-height: 8rem;
border:0; border: 0;
box-shadow: 0px 0px 20px #d1d1d1; box-shadow: 0px 0px 20px #d1d1d1;
} }
.login_AgreeTitle img{
.login_AgreeTitle img {
position: relative; position: relative;
left:3rem; left: 3rem;
top:3rem; top: 3rem;
float:left; float: left;
} }
.layui-layer-content{
font-size:1.8rem!important; .layui-layer-content {
padding:2rem 1rem!important; font-size: 1.8rem!important;
padding: 2rem 1rem!important;
} }
</style> </style>
...@@ -229,28 +277,28 @@ ...@@ -229,28 +277,28 @@
<div class="login_denglu"> <div class="login_denglu">
<div class='page__bd'> <div class='page__bd'>
<div class="headBg"> <div class="headBg">
<img class="headBgImg" src="../images/login/login_content.png"/> <img class="headBgImg" src="../images/login_content.png" />
<div class='header'> <div class='header'>
<img class='header_image' src='../images/login/login_elp.png'> <img class='header_image' src='../images/login_elp.png'>
<span class='header_span'>Welcome</span> <span class='header_span'>Welcome</span>
</div>
<div class='form'>
<div class='form_item1'>
<div class='form_item_inBox'>
<img class='form_item_ico' src='../images/login/ico_lock1.png'/>
<span class="login_Zh">账号</span>
<input class='form_item_input' id="UserAccount" type='number' placeholder="请输入手机号"></input>
</div>
</div>
<div class='form_item2'>
<div class='form_item_inBox'>
<img class='form_item_ico' src='../images/login/ico_lock2.png'/>
<span class="login_Zh">密码</span>
<input class='form_item_input' id="passWord" type="password" placeholder="请输入密码"></input>
</div> </div>
<div class='form'>
<div class='form_item1'>
<div class='form_item_inBox'>
<img class='form_item_ico' src='../images/ico_lock1.png' />
<span class="login_Zh">账号</span>
<input class='form_item_input' id="UserAccount" type='number' placeholder="请输入手机号"></input>
</div>
</div>
<div class='form_item2'>
<div class='form_item_inBox'>
<img class='form_item_ico' src='../images/ico_lock2.png' />
<span class="login_Zh">密码</span>
<input class='form_item_input' id="passWord" type="password" placeholder="请输入密码"></input>
</div>
</div>
</div> </div>
</div> <button class="login_btn" onclick="user_login()">登录</button>
<button class="login_btn" onclick="user_login()">登录</button>
</div> </div>
<div class="jihuoDiv" onclick="goJihuo()"> <div class="jihuoDiv" onclick="goJihuo()">
<span class='login_wx_span'>账号未激活?</span> <span class='login_wx_span'>账号未激活?</span>
...@@ -265,29 +313,29 @@ ...@@ -265,29 +313,29 @@
<div class="login_jihuo"> <div class="login_jihuo">
<div class='page__bd'> <div class='page__bd'>
<div class="headBg" style="height:60rem;"> <div class="headBg" style="height:60rem;">
<img class="headBgImg" src="../images/login/login_content.png"/> <img class="headBgImg" src="../images/login_content.png" />
<div class='header'> <div class='header'>
<img class='header_image' src='../images/login/login_elp.png'> <img class='header_image' src='../images/login_elp.png'>
<span class='header_span'>Welcome</span> <span class='header_span'>Welcome</span>
</div> </div>
<div class='form'> <div class='form'>
<div class='form_item1'> <div class='form_item1'>
<div class='form_item_inBox'> <div class='form_item_inBox'>
<img class='form_item_ico' src='../images/login/ico_lock1.png'/> <img class='form_item_ico' src='../images/ico_lock1.png' />
<span class="login_Zh">账号</span> <span class="login_Zh">账号</span>
<input class='form_item_input' type='number' id="Activation_Account" placeholder="请输入手机号"></input> <input class='form_item_input' type='number' id="Activation_Account" placeholder="请输入手机号"></input>
</div> </div>
</div> </div>
<div class='form_item2'> <div class='form_item2'>
<div class='form_item_inBox'> <div class='form_item_inBox'>
<img class='form_item_ico' src='../images/login/ico_lock2.png'/> <img class='form_item_ico' src='../images/ico_lock2.png' />
<span class="login_Zh">密码</span> <span class="login_Zh">密码</span>
<input class='form_item_input' type="password" id="Activation_password" placeholder="请输入密码"></input> <input class='form_item_input' type="password" id="Activation_password" placeholder="请输入密码"></input>
</div> </div>
</div> </div>
<div class='form_item2'> <div class='form_item2'>
<div class='form_item_inBox'> <div class='form_item_inBox'>
<img class='form_item_ico' src='../images/login/ico_yzm.png' style="margin-top:1rem;"/> <img class='form_item_ico' src='../images/ico_yzm.png' style="margin-top:1rem;" />
<span class="login_Zh">验证码</span> <span class="login_Zh">验证码</span>
<input class='form_validate_input' id="Activation_valicode" placeholder="请输入验证码"></input> <input class='form_validate_input' id="Activation_valicode" placeholder="请输入验证码"></input>
<span class="login_yzm" onclick="getCode()">发送验证码</span> <span class="login_yzm" onclick="getCode()">发送验证码</span>
...@@ -304,7 +352,7 @@ ...@@ -304,7 +352,7 @@
</div> </div>
<div class="login_Agreement"> <div class="login_Agreement">
<div class="login_AgreeTitle"> <div class="login_AgreeTitle">
<img onclick="gobackLogin()" src="../images/login/login_arrowleft.png"/> 用户协议 <img onclick="gobackLogin()" src="../images/login_arrowleft.jpg" /> 用户协议
</div> </div>
<div class="boxcenter"> <div class="boxcenter">
<h1>《用户协议和法律协议》 本协议为您与本APP管理者之间所订立的契约,具有合同的法律效力,请您仔细阅读。</h1> <h1>《用户协议和法律协议》 本协议为您与本APP管理者之间所订立的契约,具有合同的法律效力,请您仔细阅读。</h1>
...@@ -331,46 +379,62 @@ ...@@ -331,46 +379,62 @@
<script type="text/javascript" src="../js/mian.js"></script> <script type="text/javascript" src="../js/mian.js"></script>
<script src="../js/md5.js"></script> <script src="../js/md5.js"></script>
<script> <script>
if(localStorage.u){ if (localStorage.u) {
let userInfo = {} let userInfo = {}
try{ try {
userInfo=JSON.parse(localStorage.u); userInfo = JSON.parse(localStorage.u);
if(userInfo.customerId){ if (userInfo.customerId) {
window.location.href = 'https://activity.oytour.com/html/GT_activities.html'; window.location.href = 'https://activity.oytour.com/html/GT_activities.html';
} }
}catch (e) { } catch (e) {
window.location.href = 'https://activity.oytour.com/html/login.html'; window.location.href = 'https://activity.oytour.com/html/login.html';
} }
} }
//跳转至激活 //跳转至激活
function goJihuo(){ function goJihuo() {
$(".login_denglu").css({'display':'none'}); $(".login_denglu").css({
$(".login_jihuo").css({'display':'block'}); 'display': 'none'
});
$(".login_jihuo").css({
'display': 'block'
});
} }
//跳转回登录 //跳转回登录
function backToLogin(){ function backToLogin() {
$(".login_denglu").css({'display':'block'}); $(".login_denglu").css({
$(".login_jihuo").css({'display':'none'}); 'display': 'block'
});
$(".login_jihuo").css({
'display': 'none'
});
} }
//登录到服务条款 //登录到服务条款
function goFuwutiaokuan(){ function goFuwutiaokuan() {
$(".login_page").css({'display':'none'}); $(".login_page").css({
$(".login_Agreement").css({'display':'block'}); 'display': 'none'
});
$(".login_Agreement").css({
'display': 'block'
});
} }
//条款返回登录 //条款返回登录
function gobackLogin(){ function gobackLogin() {
$(".login_page").css({'display':'block'}); $(".login_page").css({
$(".login_Agreement").css({'display':'none'}); 'display': 'block'
});
$(".login_Agreement").css({
'display': 'none'
});
} }
//点击登录 //点击登录
function user_login(){ function user_login() {
let UserAccount = $("#UserAccount").val(); let UserAccount = $("#UserAccount").val();
let passWord = $("#passWord").val(); let passWord = $("#passWord").val();
if(UserAccount==''){ if (UserAccount == '') {
layer.msg('请输入账号'); layer.msg('请输入账号');
return; return;
} }
if(passWord==''){ if (passWord == '') {
layer.msg('请输入密码'); layer.msg('请输入密码');
return; return;
} }
...@@ -381,18 +445,18 @@ ...@@ -381,18 +445,18 @@
Login(msg) Login(msg)
} }
//登录 //登录
function Login(msg){ function Login(msg) {
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: `${getApiUrl().urlPost}`, url: `${getApiUrl().urlPost}`,
contentType: "application/json", contentType: "application/json",
data: getAjaxData('b2b_post_Login', msg), data: getAjaxData('b2b_post_Login', msg),
async: false, async: false,
success: function (res) { success: function(res) {
if (res.resultCode === 1) { if (res.resultCode === 1) {
layer.msg(res.message); layer.msg(res.message);
//存localstorage //存localstorage
let userInfo ={ let userInfo = {
customerId: res.data.customerId, customerId: res.data.customerId,
accountId: res.data.accountId, accountId: res.data.accountId,
token: res.data.token, token: res.data.token,
...@@ -401,80 +465,80 @@ ...@@ -401,80 +465,80 @@
localStorage.u = JSON.stringify(userInfo) localStorage.u = JSON.stringify(userInfo)
window.location.href = 'https://activity.oytour.com/html/GT_activities.html'; window.location.href = 'https://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{ } else {
layer.msg(res.message); layer.msg(res.message);
} }
}, },
error: function (res) { error: function(res) {
layer.msg(res.message); layer.msg(res.message);
} }
}); });
} }
//发送验证码 //发送验证码
function getCode(){ function getCode() {
var phoneReg = /(^1[3|4|5|7|8]\d{9}$)|(^09\d{8}$)/; var phoneReg = /(^1[3|4|5|7|8]\d{9}$)|(^09\d{8}$)/;
//电话 //电话
let phone=$('#Activation_Account').val(); let phone = $('#Activation_Account').val();
if (!phoneReg.test(phone)) { if (!phoneReg.test(phone)) {
layer.msg("请输入有效的手机号码!"); layer.msg("请输入有效的手机号码!");
return false; return false;
} }
const TIME_COUNT = 60; const TIME_COUNT = 60;
let isSend=false; let isSend = false;
$('.login_yzm').html=''; $('.login_yzm').html = '';
if (!this.timer) { if (!this.timer) {
this.count = TIME_COUNT; this.count = TIME_COUNT;
$('.login_yzm').html(TIME_COUNT); $('.login_yzm').html(TIME_COUNT);
isSend = true; isSend = true;
this.timer = setInterval(() => { this.timer = setInterval(() => {
if (this.count > 0 && this.count <= TIME_COUNT) { if (this.count > 0 && this.count <= TIME_COUNT) {
this.count--; this.count--;
$('.login_yzm').html(count+'s重新发送'); $('.login_yzm').html(count + 's重新发送');
isSend=false; isSend = false;
} else { } else {
clearInterval(this.timer); clearInterval(this.timer);
$('.login_yzm').html('发送验证码'); $('.login_yzm').html('发送验证码');
this.timer = null; this.timer = null;
} }
}, 1000); }, 1000);
} }
let msg = { let msg = {
mobileNumber: $('#Activation_Account').val(), mobileNumber: $('#Activation_Account').val(),
mobileCodeType:1 mobileCodeType: 1
}; };
if(isSend){ if (isSend) {
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: `${getApiUrl().urlPost}`, url: `${getApiUrl().urlPost}`,
contentType: "application/json", contentType: "application/json",
data: getAjaxData('user_get_moblieNumber_code', msg), data: getAjaxData('user_get_moblieNumber_code', msg),
async: false, async: false,
success: function (res) { success: function(res) {
if (res.resultCode === 1) { if (res.resultCode === 1) {
layer.msg(res.message);
}
},
error: function(res) {
layer.msg(res.message); layer.msg(res.message);
} }
}, });
error: function (res) { }
layer.msg(res.message);
}
});
}
} }
//点击激活 //点击激活
function Activation(){ function Activation() {
if ($('#Activation_Account').val() == ""){ if ($('#Activation_Account').val() == "") {
layer.msg('请输入账号!'); layer.msg('请输入账号!');
return return
} }
if ($('#Activation_password').val() == ""){ if ($('#Activation_password').val() == "") {
layer.msg('请输入密码!'); layer.msg('请输入密码!');
return return
} }
if ($('#Activation_valicode').val() == ""){ if ($('#Activation_valicode').val() == "") {
layer.msg('请输入验证码!'); layer.msg('请输入验证码!');
return return
} }
let activeMsg= { let activeMsg = {
account: $('#Activation_Account').val(), account: $('#Activation_Account').val(),
mobileNumber: $('#Activation_Account').val(), mobileNumber: $('#Activation_Account').val(),
password: $('#Activation_password').val(), password: $('#Activation_password').val(),
...@@ -486,7 +550,7 @@ ...@@ -486,7 +550,7 @@
contentType: "application/json", contentType: "application/json",
data: getAjaxData('b2b_post_AccountActivation', activeMsg), data: getAjaxData('b2b_post_AccountActivation', activeMsg),
async: false, async: false,
success: function (res) { success: function(res) {
if (res.resultCode === 1) { if (res.resultCode === 1) {
layer.msg(res.message); layer.msg(res.message);
let msg = { let msg = {
...@@ -494,15 +558,15 @@ ...@@ -494,15 +558,15 @@
password: $('#Activation_password').val() password: $('#Activation_password').val()
}; };
Login(msg) Login(msg)
}else{ } else {
layer.msg(res.message); layer.msg(res.message);
} }
}, },
error: function (res) { error: function(res) {
layer.msg(res.message); layer.msg(res.message);
} }
}); });
} }
</script> </script>
</html>
</html>
\ No newline at end of file
...@@ -155,11 +155,11 @@ ...@@ -155,11 +155,11 @@
</div> </div>
<div class="pay_zhifu"> <div class="pay_zhifu">
<img class="pay_one" src="../images/login/wechat.png" alt="" /> <img class="pay_one" src="../images/wechat.png" alt="" />
<span class="pay_two">微信支付</span> <span class="pay_two">微信支付</span>
<div class="pay_three"> <div class="pay_three">
<!-- <div class="pay_circle"></div> --> <!-- <div class="pay_circle"></div> -->
<img src="../images/login/checkbox.png" aly="" /> <img src="../images/checkbox.png" aly="" />
</div> </div>
</div> </div>
</div> </div>
...@@ -191,7 +191,9 @@ ...@@ -191,7 +191,9 @@
payBtn = false; payBtn = false;
changesecond = '00:00'; changesecond = '00:00';
$(".daojishi").html(changesecond); $(".daojishi").html(changesecond);
$('.pay_btn').css({'background-color':'gray'}); $('.pay_btn').css({
'background-color': 'gray'
});
$(".pay_btn").attr("disabled", true); $(".pay_btn").attr("disabled", true);
setTimeout("goActive()", 2000); setTimeout("goActive()", 2000);
return; return;
...@@ -229,11 +231,13 @@ ...@@ -229,11 +231,13 @@
} }
return result; return result;
}; };
function goActive(){
function goActive() {
window.location.href = 'https://activity.oytour.com/html/GT_activities.html'; window.location.href = 'https://activity.oytour.com/html/GT_activities.html';
// window.location.href = 'http://127.0.0.1:5500/html/paySuccess.html'; // window.location.href = 'http://127.0.0.1:5500/html/paySuccess.html';
} }
function pay() { function pay() {
if (!localStorage.openid) { if (!localStorage.openid) {
window.location.href = 'https://activity.oytour.com/html/GT_activities.html'; window.location.href = 'https://activity.oytour.com/html/GT_activities.html';
......
<html lang="en"> <html lang="en">
<head> <head>
<meta http-equiv="Content-Type" content="span/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="span/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="divport" <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" />
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 name="screen-orientation" content="portrait">
</meta> </meta>
<meta name="x5-orientation" content="portrait"> <meta name="x5-orientation" content="portrait">
</meta> </meta>
<title>支付订单</title> <title>支付订单</title>
</head> </head>
<style> <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 { 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; margin: 0;
padding: 0; padding: 0;
} }
html,body{
height:100%; html,
body {
height: 100%;
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
.paySuccess{
width:100%; .paySuccess {
height:100%; width: 100%;
height: 100%;
position: relative; position: relative;
text-align: center; text-align: center;
background: url('../images/pay/bg.png') no-repeat; background: url('../images/bg.jpg') no-repeat;
background-size:100% 100%; background-size: 100% 100%;
padding-top: 3.1rem; padding-top: 3.1rem;
box-sizing: border-box; box-sizing: border-box;
} }
/* */ /* */
.img_bg_M .received_img{
.img_bg_M .received_img {
position: absolute; position: absolute;
right: 0.14rem; right: 0.14rem;
top: 0.67rem; top: 0.67rem;
...@@ -43,7 +70,8 @@ ...@@ -43,7 +70,8 @@
height: 0.65rem; height: 0.65rem;
display: none; display: none;
} }
.img_bg_M{
.img_bg_M {
width: 100%; width: 100%;
height: 2.14rem; height: 2.14rem;
background-image: url(../images/M_200.png); background-image: url(../images/M_200.png);
...@@ -51,21 +79,22 @@ ...@@ -51,21 +79,22 @@
background-repeat: no-repeat; background-repeat: no-repeat;
position: relative; position: relative;
} }
.img_bg_M .imgBtn{
.img_bg_M .imgBtn {
margin-top: 0.08rem; margin-top: 0.08rem;
background: url('../images/pay/btn.png') no-repeat; background: url('../images/buy_btn.png') no-repeat;
background-size:100% 100%; background-size: 100% 100%;
padding: 0.09rem 0.12rem; padding: 0.09rem 0.12rem;
} }
.img_bg_M .ylImg{
.img_bg_M .ylImg {
position: absolute; position: absolute;
right: 0; right: 0;
bottom: 0; bottom: 0;
width: 0.85rem; width: 0.85rem;
} }
.use_oupon{
.use_oupon {
width: 3.14rem; width: 3.14rem;
height: 0.4rem; height: 0.4rem;
margin-top: 0.16rem; margin-top: 0.16rem;
...@@ -75,42 +104,48 @@ ...@@ -75,42 +104,48 @@
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
} }
.use_news{
.use_news {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
} }
.use_news img{
.use_news img {
width: 0.4rem; width: 0.4rem;
height: 0.4rem; height: 0.4rem;
overflow: hidden; overflow: hidden;
} }
.use_news div{
.use_news div {
height: 0.4rem; height: 0.4rem;
margin-left: 0.1rem; margin-left: 0.1rem;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-around; justify-content: space-around;
} }
.use_news div p:nth-child(1){
.use_news div p:nth-child(1) {
font-size: 0.12rem; font-size: 0.12rem;
color: #111111; color: #111111;
text-align:left; text-align: left;
} }
.use_news div p:nth-child(2){
.use_news div p:nth-child(2) {
font-size: 0.1rem; font-size: 0.1rem;
color: #888888; color: #888888;
width: 1.8rem; width: 1.8rem;
overflow: hidden; overflow: hidden;
text-align:left; text-align: left;
} }
.click_use p { .click_use p {
font-size: 0.11rem; font-size: 0.11rem;
color: #E03234; color: #E03234;
text-align: center; text-align: center;
line-height: 0.25rem; line-height: 0.25rem;
} }
.click_use { .click_use {
width: 0.8rem; width: 0.8rem;
height: 0.25rem; height: 0.25rem;
...@@ -127,7 +162,7 @@ ...@@ -127,7 +162,7 @@
有效截止日期: 有效截止日期:
</p> </p>
<p class="imgBtn" style="font-size: 0.15rem;color: #E03234;">返回活动首页</p> <p class="imgBtn" style="font-size: 0.15rem;color: #E03234;">返回活动首页</p>
<img class="ylImg" src="../images/pay/yl.png" alt=""> <img class="ylImg" src="../images/received@3x.png" alt="">
</div> </div>
<div class="use_oupon"> <div class="use_oupon">
...@@ -153,27 +188,26 @@ ...@@ -153,27 +188,26 @@
<script type="text/javascript" src="../js/mian.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 type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
<script> <script>
$(function(){ $(function() {  
  pushHistory(); pushHistory();    
    window.addEventListener("popstate", function(e) { window.addEventListener("popstate", function(e) {     //根据自己的需求实现自己的功能
    //根据自己的需求实现自己的功能 window.location.href = 'https://activity.oytour.com/html/GT_activities.html';  
window.location.href = 'https://activity.oytour.com/html/GT_activities.html'; }, false);  
  }, false); function pushHistory() {    
  function pushHistory() { var state = {    
    var state = { title: "title",
    title: "title",     url: "#"  
    url: "#" };    
  }; window.history.pushState(state, "title", "#");  
    window.history.pushState(state, "title", "#"); }
  }
}); });
let href = window.location.href; 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';
// 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'; // 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 userInfo = {};
let platform=''; let platform = '';
// 判断是app和小程序跳转过来的 // 判断是app和小程序跳转过来的
if (href.split('?')[1]) { if (href.split('?')[1]) {
let param = href.split('?')[1].split("&") ? href.split('?')[1].split("&") : null; let param = href.split('?')[1].split("&") ? href.split('?')[1].split("&") : null;
...@@ -183,29 +217,28 @@ ...@@ -183,29 +217,28 @@
token: param[2].split('=')[1], token: param[2].split('=')[1],
secretKey: param[3].split('=')[1] secretKey: param[3].split('=')[1]
} }
platform = param[4].split('=')[1] platform = param[4].split('=')[1]
}else{ } else {
if (localStorage.u){ if (localStorage.u) {
userInfo = JSON.parse(localStorage.u); userInfo = JSON.parse(localStorage.u);
} }
} }
localStorage.userInfo = JSON.stringify(userInfo) localStorage.userInfo = JSON.stringify(userInfo)
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: `${getApiUrl().urlJava}api/appActivity/getUserPurchaseTime`, url: `${getApiUrl().urlJava}api/appActivity/getUserPurchaseTime`,
contentType: "application/json", contentType: "application/json",
data: getJavaData({}), data: getJavaData({}),
async: false, async: false,
success: function(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, '.'); //活动结束时间
success: function(res) { let str = "";
console.log("res",res); str += `
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"> <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_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 class="img_bg_p2" style="font-size: 0.13rem;color: #E03234;padding-top: 0.07rem;">
...@@ -227,35 +260,35 @@ ...@@ -227,35 +260,35 @@
</div> </div>
</div> </div>
`; `;
$('.img_bg_M').html(str); $('.img_bg_M').html(str);
}
},
error: function(res) {
layer.msg(res.message)
} }
}) },
error: function(res) {
layer.msg(res.message)
}
})
$('.imgBtn').click(function() { $('.imgBtn').click(function() {
if(platform=="xcx"){ 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 = `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`; 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 {
else{ window.location.href = "https://activity.oytour.com/html/GT_activities.html"
window.location.href="https://activity.oytour.com/html/GT_activities.html"
} }
}) })
$('.click_use').click(function() { $('.click_use').click(function() {
if(platform=="xcx"){ if (platform == "xcx") {
wx.miniProgram.getEnv(function(res) { wx.miniProgram.getEnv(function(res) {
window.wx.miniProgram.navigateTo({ window.wx.miniProgram.navigateTo({
url: `/pages/member/Coupon/Coupon`, url: `/pages/member/Coupon/Coupon`,
}); });
}); });
}else{ } else {
window.location.href="https://activity.oytour.com/html/coupons.html" window.location.href = "https://activity.oytour.com/html/coupons.html"
} }
}) })
</script> </script>
</html>
</html>
\ No newline at end of file
...@@ -12,7 +12,7 @@ $.fn.dataStatistics = function(options) { ...@@ -12,7 +12,7 @@ $.fn.dataStatistics = function(options) {
activityStartDate: 0, activityStartDate: 0,
activityEndDate: 0, activityEndDate: 0,
nowDate: 0, nowDate: 0,
nextAc:false, nextAc: false,
}, options || {}); }, options || {});
var ths = this; //解决this指向问题 var ths = this; //解决this指向问题
...@@ -85,7 +85,7 @@ $.fn.dataStatistics = function(options) { ...@@ -85,7 +85,7 @@ $.fn.dataStatistics = function(options) {
$('.img_btn p').html('活动结束') $('.img_btn p').html('活动结束')
$('.box_content_t').hide() $('.box_content_t').hide()
$('.img_btn').css("background-image", "url(../images/nobuy_btn.png)"); $('.img_btn').css("background-image", "url(../images/nobuy_btn.png)");
if (options.nextAc == true) { //显示活动预告 if (options.nextAc == true && $('notice_img').css("display") == "none") { //显示活动预告
$('.dataStatistics').css('display', "none"); $('.dataStatistics').css('display', "none");
$('.deta_replace').css('display', "flex"); $('.deta_replace').css('display', "flex");
$('#notice').css('display', "block"); $('#notice').css('display', "block");
...@@ -219,7 +219,7 @@ $.fn.dataStatistics = function(options) { ...@@ -219,7 +219,7 @@ $.fn.dataStatistics = function(options) {
$('.img_btn').css("background-image", "url(../images/nobuy_btn.png)"); $('.img_btn').css("background-image", "url(../images/nobuy_btn.png)");
$('.img_btn p').html('活动结束') $('.img_btn p').html('活动结束')
$('.box_content_t').hide() $('.box_content_t').hide()
if (options.nextAc == true) { //显示活动预告 if (options.nextAc == true && $('notice_img').css("display") == "none") { //显示活动预告
$('.dataStatistics').css('display', "none"); $('.dataStatistics').css('display', "none");
$('.deta_replace').css('display', "flex"); $('.deta_replace').css('display', "flex");
$('#notice').css('display', "block"); $('#notice').css('display', "block");
...@@ -246,7 +246,7 @@ $.fn.dataStatistics = function(options) { ...@@ -246,7 +246,7 @@ $.fn.dataStatistics = function(options) {
$('.img_btn p').html('活动结束') $('.img_btn p').html('活动结束')
$('.box_content_t').hide() $('.box_content_t').hide()
$('.img_btn').css("background-image", "url(../images/nobuy_btn.png)"); $('.img_btn').css("background-image", "url(../images/nobuy_btn.png)");
if (options.nextAc == true) { //显示活动预告 if (options.nextAc == true && $('notice_img').css("display") == "none") { //显示活动预告
$('.dataStatistics').css('display', "none"); $('.dataStatistics').css('display', "none");
$('.deta_replace').css('display', "flex"); $('.deta_replace').css('display', "flex");
$('#notice').css('display', "block"); $('#notice').css('display', "block");
...@@ -273,75 +273,264 @@ $.fn.dataStatistics = function(options) { ...@@ -273,75 +273,264 @@ $.fn.dataStatistics = function(options) {
$('.img_btn').click(function() { $('.img_btn').click(function() {
let userInfo = JSON.parse(localStorage.userInfo) // let userInfo = JSON.parse(localStorage.userInfo)
if(userInfo.accountId && userInfo.accountId == '1182'){ //如果为唐杰的号直接跳转 // if(userInfo.accountId && userInfo.accountId == '1182'){ //如果为唐杰的号直接跳转
if (options.count != 0) { //判断是可以抢购 // if (options.count != 0) { //判断是可以抢购
window.location.href = `https://activity.oytour.com/html/Rushbuy.html?redemptionPrice=${options.price}&couponId=${options.couponId}&platform=${options.platform}`; // window.location.href = `https://activity.oytour.com/html/Rushbuy.html?redemptionPrice=${options.price}&couponId=${options.couponId}&platform=${options.platform}`;
} else { // } else {
let data = { // let data = {
'action': 'jump', // showToast->一个提示信息 showHud->一个黑色的loading // 'action': 'jump', // showToast->一个提示信息 showHud->一个黑色的loading
'page': 'teamWalker_2', // 'page': 'teamWalker_2',
'pageData': { // 'pageData': {
'backType': 'pop', // 'backType': 'pop',
// }
// }
// if (options.platform == 'app') {
// window.postMessage(JSON.stringify(data));
// } else if (options.platform == 'H5') {
// window.location.href = 'https://activity.oytour.com/html/downloadApp.html'
// }
//
// }
//
// }else {
if ($('.img_btn p').css('color') == 'rgb(224, 50, 52)') { //判断按钮是否可以点击
if (options.login == true) {
if (options.count != 0) { //判断是可以抢购
// let buyInfo = {
// redemptionPrice: options.price,
// couponId: options.couponId,
// platform: options.platform,
// }
// localStorage.buyInfo = JSON.stringify(buyInfo)
window.location.href = `https://activity.oytour.com/html/Rushbuy.html?redemptionPrice=${options.price}&couponId=${options.couponId}&platform=${options.platform}`;
//window.location.href = `./Rushbuy.html?redemptionPrice=${options.price}&couponId=${options.couponId}&platform=${options.platform}`;
} else {
let data = {
'action': 'jump', // showToast->一个提示信息 showHud->一个黑色的loading
'page': 'teamWalker_2',
'pageData': {
'backType': 'pop',
}
} }
if (options.platform == 'app') {
window.postMessage(JSON.stringify(data));
} else if (options.platform == 'H5') {
window.location.href = 'https://activity.oytour.com/html/downloadApp.html'
}
} }
} else {
window.location.href = 'https://activity.oytour.com/html/login.html'
}
} else {
if ($('.img_btn p').text() == '活动结束') {
if (options.platform == 'app') { if (options.platform == 'app') {
window.postMessage(JSON.stringify(data)); window.postMessage(JSON.stringify({ 'action': 'showToast', 'message': '活动已结束' }));
} else if (options.platform == 'H5') { } else {
window.location.href = 'https://activity.oytour.com/html/downloadApp.html' layer.msg('活动已结束')
} }
} else {
if (options.platform == 'app') {
window.postMessage(JSON.stringify({ 'action': 'showToast', 'message': '活动还未开始' }));
} else {
layer.msg('活动还未开始')
}
} }
}
}else { // }
if ($('.img_btn p').css('color') == 'rgb(224, 50, 52)') { //判断按钮是否可以点击 })
if (options.login == true) {
if (options.count != 0) { //判断是可以抢购
// let buyInfo = {
// redemptionPrice: options.price,
// couponId: options.couponId,
// platform: options.platform,
// } //页面所有数据请求一次 5分钟来一次
// localStorage.buyInfo = JSON.stringify(buyInfo) var timer3 = setInterval(() => {
window.location.href = `https://activity.oytour.com/html/Rushbuy.html?redemptionPrice=${options.price}&couponId=${options.couponId}&platform=${options.platform}`; clearInterval(timer2);
clearInterval(timer3);
$('.digit_set').empty()
$.ajax({
type: "POST",
url: `${getApiUrl().urlJava}api/appActivity/getUserPurchaseTime`,
contentType: "application/json",
data: getJavaData({}),
async: false,
success: function(res) {
if (res.resultCode === 1) {
getTicketList(res.data.couponId);
let num = res.data.repertory; //优惠券总共数量
// let num = 5000; //优惠券总共数量
$('.box_title_2 p').html(res.data.redemptionPrice + '元抢购');
$('.box_title h5').html(res.data.remark);
$('.explain p').html('活动规则' + '<br/>' + res.data.instructions);
if (login == false) {
$('.use_o').html('暂无登录');
} else { } else {
let data = { $('.use_o').html(res.data.contact);
'action': 'jump', // showToast->一个提示信息 showHud->一个黑色的loading $('.use_t').html(res.data.customerName);
'page': 'teamWalker_2', }
'pageData': {
'backType': 'pop', let activityStartDate = new Date(res.data.activityStartDate.replace('T', ' ').replace(/-/g, '/')).getTime(); //活动开始时间
let activityEndDate = new Date(res.data.activityEndDate.replace('T', ' ').replace(/-/g, '/')).getTime(); //活动结束时间
let nowDate = new Date(res.data.currentTime.replace('T', ' ').replace(/-/g, '/')).getTime(); //服务器时间
let nextActivity = res.data.nextActivity;
let nextAc = false;
if (nextActivity != null) {
nextAc = true
}
$('.dataStatistics').dataStatistics({
max: num,
min: num,
len: 4,
add: true,
price: res.data.redemptionPrice,
couponId: res.data.couponId,
platform: platform,
login: login,
count: res.data.count, //判断是否可以抢购 0为不可以
activityStartDate: activityStartDate,
activityEndDate: activityEndDate,
nextAc: nextAc
}); //刚进入页面不执行动画
// let activityStartDate = new Date('2019/11/08 17:43:50').getTime();
// let activityEndDate = new Date('2019/11/14 11:23:00').getTime(); //活动结束时间
if (nextActivity != null) {
let nexttime = nextActivity.activityStartDate;
let year = nexttime.split('T')[0].split('-')[0];
let month = nexttime.split('T')[0].split('-')[1];
let day = nexttime.split('T')[0].split('-')[2];
let hour = nexttime.split('T')[1].split(':')[0];
$('.notice_content').html('下期活动将于' + year + '年' + month + '月' + day + '日' + hour + '点开始。');
$('.notice_content2').html('届时会有' + nextActivity.couponCount + '张价值' + nextActivity.denomination + '的折扣券等待您的抢 购(抢购价' + nextActivity.redemptionPrice + '元),请准时参加。');
// var time2 = setInterval(setTimer3, 1000); //计时器
let beforeDawn = new Date(year + '/' + month + '/' + day + ' 00:00:00').getTime()
let time = ((beforeDawn - nowDate) / 1000).toFixed(0);
runtime(time)
}
//判断当前时间是否到了抢购时间
if (activityStartDate >= nowDate) { //没到抢购时间 显示抢购的具体时间
$('#t1').html('抢购时间:');
$('#t2').html('');
let startDate = res.data.activityStartDate;
let month = startDate.split('T')[0].split('-')[1];
let day = startDate.split('T')[0].split('-')[2];
let hour = startDate.split('T')[1].split(':')[0];
$('#p1').html(month);
$('#p2').html(day);
$('#p3').html(hour);
$('#t3').html('月');
$('#t4').html('日');
$('#t5').html('点整');
$('.img_btn p').html('立即抢购');
$('.img_btn').css("background-image", "url(../images/nobuy_btn.png)");
$('.img_btn p').css("color", "#FFFFFF");
// $(".received_img").attr("src", "");
let time = ((activityStartDate - nowDate) / 1000).toFixed(0);
runtime(time)
} else if (nowDate > activityEndDate || res.data.activityIsEnding == 1) { // 活动时间已过
// $(".received_img").attr("src", "");
$('.img_bg_M').css("background-image", "url(../images/MJ_200@3x.png)");
$('.img_bg_p1').css("color", "#CCCCCC");
$('.img_bg_p2').css("color", "#CCCCCC");
$('.img_btn p').css("color", "#FFFFFF");
$('.img_btn p').html('活动结束')
$('.box_content_t').hide()
$('.img_btn').css("background-image", "url(../images/nobuy_btn.png)");
$('.dataStatistics').css('display', "none");
$('.deta_replace').css('display', "flex");
$('#notice').css('display', "block");
$('.notice_img').css('display', "block");
} else { // 到了抢购的时间显示距离结束时间的倒计时
currentTime = res.data.currentTime.replace('T', ' ').replace(/-/g, '/');
end = res.data.activityEndDate.replace('T', ' ').replace(/-/g, '/');
if (num > 0) {
$('#t1').html('结束倒计时:')
if (res.data.count != 0) {
// $(".received_img").attr("src", "");
$('.img_btn p').html('立即抢购');
} else {
$('.img_btn p').html('去使用');
$(".received_img").css('display', "block");
$('.img_btn').css("background-image", "url(../images/buy_btn.png)");
} }
} } else {
if (options.platform == 'app') {
window.postMessage(JSON.stringify(data)); // $(".received_img").attr("src", "");
} else if (options.platform == 'H5') { $('.img_bg_M').css("background-image", "url(../images/MJ_200@3x.png)");
window.location.href = 'https://activity.oytour.com/html/downloadApp.html' $('.img_bg_p1').css("color", "#CCCCCC");
$('.img_bg_p2').css("color", "#CCCCCC");
$('.img_btn p').css("color", "#FFFFFF");
$('.img_btn p').html('活动结束')
$('.box_content_t').hide()
$('.img_btn').css("background-image", "url(../images/nobuy_btn.png)");
$('.dataStatistics').css('display', "none");
$('.deta_replace').css('display', "flex");
$('#notice').css('display', "block");
$('.notice_img').css('display', "block");
} }
} }
} else {
window.location.href = 'https://activity.oytour.com/html/login.html' //优惠券的有限时间
} let expirationDate = (res.data.expirationDate).split('T')[0].replace(/-/g, '.');
} else { let title = $('.img_bg_p1').text()
if ($('.img_btn p').text() == '活动结束') { let RushbuyTime = {
if (options.platform == 'app') { RushbuyTime: expirationDate,
window.postMessage(JSON.stringify({ 'action': 'showToast', 'message': '活动已结束' })); title: title,
} else { userName: res.data.contact,
layer.msg('活动已结束') shopName: res.data.customerName,
} }
localStorage.RushbuyTime = JSON.stringify(RushbuyTime)
$('.img_bg_p2').html('有效期截止:' + expirationDate)
} else { } else {
if (options.platform == 'app') { $('.dataStatistics').dataStatistics({
window.postMessage(JSON.stringify({ 'action': 'showToast', 'message': '活动还未开始' })); max: 0,
} else { min: 0,
len: 4,
add: true
}); //刚进入页面不执行动画
layer.msg('活动还未开始')
}
} }
} // clearInterval(xhtime)
},
error: function(res) {
layer.msg(res.message)
$('.dataStatistics').dataStatistics({
max: 0,
min: 0,
len: 4,
add: true
}); //刚进入页面不执行动画
} }
});
}) }, 300000) //5分钟请求一次接口
}; };
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