Commit 83b65b20 authored by zhengke's avatar zhengke

修改

parent 70ef309b
...@@ -433,6 +433,10 @@ ...@@ -433,6 +433,10 @@
}); });
}); });
} }
//跳转到h5优惠券
if(platform == 'H5'){
window.location.href = 'http://activity.oytour.com/html/coupons.html';
}
}) })
</script> </script>
</body> </body>
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
} }
.coupons_page{ .coupons_page{
width:100%; width:100%;
height:100%;
background-color:#F8F5F5; background-color:#F8F5F5;
} }
.coupons_title{ .coupons_title{
...@@ -58,7 +57,7 @@ ...@@ -58,7 +57,7 @@
width:0; width:0;
height:0; height:0;
position:absolute; position:absolute;
right:3rem; 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;
...@@ -110,6 +109,8 @@ ...@@ -110,6 +109,8 @@
} }
.coupons_Content{ .coupons_Content{
width:100%; width:100%;
height:87.2%;
overflow: scroll;
} }
.coupons_List{ .coupons_List{
width:80%; width:80%;
...@@ -126,7 +127,7 @@ ...@@ -126,7 +127,7 @@
position: relative; position: relative;
color:#fff; color:#fff;
} }
.coupons_List img{ .Coupon_leftImg img{
width:12rem; width:12rem;
} }
.dikouPrice{ .dikouPrice{
...@@ -179,7 +180,6 @@ ...@@ -179,7 +180,6 @@
.goToUse{ .goToUse{
position: absolute; position: absolute;
width:9rem; width:9rem;
height:4rem;
outline: none; outline: none;
border-radius:1rem; border-radius:1rem;
border:0; border:0;
...@@ -286,6 +286,25 @@ ...@@ -286,6 +286,25 @@
.Coupons_active{ .Coupons_active{
color:#EE4454; color:#EE4454;
} }
.layui-layer-content{
font-size:1.8rem!important;
padding:2rem 1rem!important;
}
.activeClick{
background-color: #FCDADD!important;
color:#EE4454!important;
}
.zanwu{
width:100%;
text-align:center;
margin-top:2rem;
}
.zanwurenhe{
width:100%;
text-align:center;
margin-top:1rem;
font-size:2rem;
}
</style> </style>
<body> <body>
...@@ -300,25 +319,26 @@ ...@@ -300,25 +319,26 @@
<i class="bd_right"></i> <i class="bd_right"></i>
</div> </div>
<div class="coupons_NavTwo"> <div class="coupons_NavTwo">
<div class="Coupons_active">全部</div> <div class="Coupons_active" onclick="getAllTicket(0,0,1)">全部</div>
<div>折扣券</div> <div onclick="getAllTicket(0,2,1)">折扣券</div>
<div>抵扣券</div> <div onclick="getAllTicket(0,1,1)">抵扣券</div>
<div>已过期</div> <div onclick="getAllTicket(0,0,4)">已过期</div>
</div> </div>
<div class="coupons_tyList"> <div class="coupons_tyList">
<span>通用</span> <span class="activeClick" onclick="getAllTicket(0,'',1)">不限</span>
<span>跟团游</span> <span onclick="getAllTicket(1,'',1)">通用</span>
<span>自由行</span> <span onclick="getAllTicket(2,'',1)">跟团游</span>
<span>景点</span> <span onclick="getAllTicket(7,'',1)">自由行</span>
<span>当地游</span> <span onclick="getAllTicket(8,'',1)">当地游</span>
<span>定制游</span> <span onclick="getAllTicket(5,'',1)">景点门票</span>
<span>美食</span> <span onclick="getAllTicket(11,'',1)">美食</span>
<span>门票</span> <span onclick="getAllTicket(3,'',1)">签证</span>
<span>签证</span> <span onclick="getAllTicket(4,'',1)">机票</span>
<span onclick="getAllTicket(10,'',1)">酒店</span>
</div> </div>
</div> </div>
<div class="coupons_Content"> <div class="coupons_Content">
<div class="coupons_List"> <!-- <div class="coupons_List">
<div class="Coupon_leftImg"> <div class="Coupon_leftImg">
<img src="../images/login/gty.png" alt=""/> <img src="../images/login/gty.png" alt=""/>
<div class="dikouPrice"> <div class="dikouPrice">
...@@ -357,33 +377,12 @@ ...@@ -357,33 +377,12 @@
</div> </div>
</div> </div>
<button class="goToUse zyxUse">去使用</button> <button class="goToUse zyxUse">去使用</button>
</div> </div> -->
<div class="coupons_List">
<div class="Coupon_leftImg">
<img src="../images/login/guoqi.png" alt=""/>
<div class="dikouPrice">
<span>¥</span>20
</div>
<div class="dikouName">抵扣券</div>
</div>
<div class="Coupon_right">
<div class="Coupon_rightOne">
全线通用20元现金
<span class="Coupon_gty ygqTitle">自由行</span>
</div>
<div class="Coupon_xianlu">不限线路及系列</div>
<div class="Coupon_Time">
2019.06.14 - 2019.06.16
</div>
</div>
<button class="goToUse ygqUse">去使用</button>
</div>
</div> </div>
<div class="goToDownLoad"> <div class="goToDownLoad">
<div> <div>
<img class="downloadImg" src="../images/login/godownload.png" alt=""/> <img class="downloadImg" src="../images/login/godownload.png" alt=""/>
<span> <span onclick="goDownLoad()">
下载同业App使用<img src="../images/login/arrowR.png" alt=""/> 下载同业App使用<img src="../images/login/arrowR.png" alt=""/>
</span> </span>
</div> </div>
...@@ -392,6 +391,9 @@ ...@@ -392,6 +391,9 @@
</body> </body>
<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/layer/layer.js"></script> <script type="text/javascript" src="../js/layer/layer.js"></script>
<script type="text/javascript" src="../js/mian.js"></script>
<script src="../js/md5.js"></script>
<script> <script>
$(function(){ $(function(){
$(document).click(function(e){ $(document).click(function(e){
...@@ -402,15 +404,132 @@ ...@@ -402,15 +404,132 @@
$(".coupons_tyList").click(function(event){ $(".coupons_tyList").click(function(event){
event.stopPropagation(); event.stopPropagation();
}); });
let title='通用'; let title='不限';
$('.useType').html(title); $('.useType').html(title);
$(".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'); $(this).addClass('Coupons_active').siblings().removeClass('Coupons_active');
}) })
//getAllTicket(0,'',1);
}) })
function showList(){ function showList(){
$('.coupons_tyList').slideToggle(300); $('.coupons_tyList').slideToggle(300);
} }
//获取所有优惠券
function getAllTicket(couponsUseScope,couponsType,couponEffectStatus){
let msg={
pageIndex: 1,
pageSize: 8,
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) {
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">
<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=""/>`
}
str+=`<div class="dikouPrice">
<span>¥</span>${dataArr[i].denomination}
</div>
<div class="dikouName">折扣券</div>
</div>
<div class="Coupon_right">
<div class="Coupon_rightOne">
${dataArr[i].couponsName}
</div>
<div class="Coupon_xianlu">
${dataArr[i].lineName==''?'不限':dataArr[i].lineName}-
${dataArr[i].lineTeamName==''?'不限':dataArr[i].lineTeamName}
</div>
<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>`
}
}else{
str+=`<div class="zanwu">
<img src="../images/login/zanwu.png" alt=""/>
<div class="zanwurenhe">暂无任何优惠券</div>
</div>`
}
$('.coupons_Content').html(str);
}else{
layer.msg(res.message);
}
},
error: function (res) {
layer.msg(res.message);
}
});
}
//格式化日期
function getDate(date){
return date.split(' ')[0];
}
//跳转至下载
function goDownLoad(){
window.location.href = 'http://activity.oytour.com/html/downloadApp.html';
}
</script> </script>
</html> </html>
...@@ -219,7 +219,7 @@ ...@@ -219,7 +219,7 @@
float:left; float:left;
} }
.layui-layer-content{ .layui-layer-content{
font-size:2rem!important; font-size:1.8rem!important;
padding:2rem 1rem!important; padding:2rem 1rem!important;
} }
</style> </style>
...@@ -282,7 +282,7 @@ ...@@ -282,7 +282,7 @@
<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/login/ico_lock2.png'/>
<span class="login_Zh">密码</span> <span class="login_Zh">密码</span>
<input class='form_item_input' 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'>
...@@ -294,7 +294,7 @@ ...@@ -294,7 +294,7 @@
</div> </div>
</div> </div>
</div> </div>
<button class="login_btn">激活并登录</button> <button class="login_btn" onclick="Activation()">激活并登录</button>
</div> </div>
<div class="jihuoDiv"> <div class="jihuoDiv">
<span class="jilijihuo" onclick="backToLogin()">返回登录</span> <span class="jilijihuo" onclick="backToLogin()">返回登录</span>
...@@ -384,8 +384,10 @@ ...@@ -384,8 +384,10 @@
let accountId=res.data.accountId; let accountId=res.data.accountId;
let token=res.data.token; let token=res.data.token;
let secretKey=res.data.secretKey; let secretKey=res.data.secretKey;
window.location.href = 'http://activity.oytour.com/html/GT_activities.html?customerId='+customerId+'&accountId='+accountId+'&token='+token+'&secretKey='+secretKey+'&platform=H5'; //window.location.href = 'http://activity.oytour.com/html/GT_activities.html?customerId='+customerId+'&accountId='+accountId+'&token='+token+'&secretKey='+secretKey+'&platform=H5';
window.location.href = 'http://127.0.0.1:5500/html/GT_activities.html?customerId='+customerId+'&accountId='+accountId+'&token='+token+'&secretKey='+secretKey+'&platform=H5';
}else{
layer.msg(res.message);
} }
}, },
error: function (res) { error: function (res) {
...@@ -445,15 +447,18 @@ ...@@ -445,15 +447,18 @@
} }
//点击激活 //点击激活
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(),
...@@ -464,7 +469,7 @@ ...@@ -464,7 +469,7 @@
type: "POST", type: "POST",
url: `${getApiUrl().urlPost}`, url: `${getApiUrl().urlPost}`,
contentType: "application/json", contentType: "application/json",
data: getAjaxData('b2b_post_AccountActivation', msg), data: getAjaxData('b2b_post_AccountActivation', activeMsg),
async: false, async: false,
success: function (res) { success: function (res) {
if (res.resultCode === 1) { if (res.resultCode === 1) {
...@@ -474,6 +479,8 @@ ...@@ -474,6 +479,8 @@
password: $('#Activation_password').val() password: $('#Activation_password').val()
}; };
Login(msg) Login(msg)
}else{
layer.msg(res.message);
} }
}, },
error: function (res) { error: function (res) {
......
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