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