Commit 8889a249 authored by Mac's avatar Mac

修改样式

parent 8d2f15ca
...@@ -109,8 +109,8 @@ p{ ...@@ -109,8 +109,8 @@ p{
} }
.img_bg_M{ .img_bg_M{
width: 100%; width: 100%;
height: 1.46rem; height: 2.14rem;
background-image: url(../images/M_200@3x.png); background-image: url(../images/M_200.png);
background-size: 100% 100%; background-size: 100% 100%;
background-repeat: no-repeat; background-repeat: no-repeat;
position: relative; position: relative;
...@@ -142,16 +142,16 @@ p{ ...@@ -142,16 +142,16 @@ p{
} }
.explain{ .explain{
width: 90%; width: 90%;
height: 1rem; height: 1.1rem;
background: #E03234; background: #E03234;
margin-left: 5%; margin-left: 5%;
padding: 0.15rem 0;
overflow: auto; overflow: auto;
} }
.explain p{ .explain p{
font-size: 0.14rem; font-size: 0.14rem;
color: #FFFFFF; color: #FFFFFF;
margin-left: 0.15rem; margin: 0.15rem;
} }
.img_bg_M .received_img{ .img_bg_M .received_img{
...@@ -241,7 +241,7 @@ p{ ...@@ -241,7 +241,7 @@ p{
height: 0.4rem; height: 0.4rem;
margin-top: 0.29rem; margin-top: 0.29rem;
margin-left: 0.32rem; margin-left: 0.32rem;
display: none; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
......
...@@ -151,10 +151,16 @@ ...@@ -151,10 +151,16 @@
// let href = 'http://activity.oytour.com/html/Appmd/draw.html?customerId=1549&accountId=1182&token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE1NzE5NzA5MDUuMCwiZXhwIjoxNTc0NTYyOTA1LjAsInVzZXJJbmZvIjp7InVpZCI6IjExODIiLCJyZXF1ZXN0RnJvbSI6M319.vlAcXCx4C_0KOmfLm4cLRxU28gTHmuMK6jgJtwjsSPM&secretKey=5d5e16254bd741c486fe2b83b42171d2&platform=App'; // let href = 'http://activity.oytour.com/html/Appmd/draw.html?customerId=1549&accountId=1182&token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE1NzE5NzA5MDUuMCwiZXhwIjoxNTc0NTYyOTA1LjAsInVzZXJJbmZvIjp7InVpZCI6IjExODIiLCJyZXF1ZXN0RnJvbSI6M319.vlAcXCx4C_0KOmfLm4cLRxU28gTHmuMK6jgJtwjsSPM&secretKey=5d5e16254bd741c486fe2b83b42171d2&platform=App';
// let href = window.location.href; // let href = window.location.href;
// alert("href",href) // alert("href",href)
let href='http://127.0.0.1:5500/html/GT_activities.html?customerId=1549&accountId=1182&token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE1NzM0NjY2NjMuMCwiZXhwIjoxNTczNTUzMDYzLjAsInVzZXJJbmZvIjp7InVpZCI6IjExODIiLCJyZXF1ZXN0RnJvbSI6NH19.hX2b2MqSWYmWS0k3YsthxW-T6UxarIm5rdbqCVQtxdQ&secretKey=5d5e16254bd741c486fe2b83b42171d2&platform=xcx'; let href='http://127.0.0.1:5500/html/GT_activities.html?customerId=1549&accountId=1182&token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE1NzM0NjY2NjMuMCwiZXhwIjoxNTczNTUzMDYzLjAsInVzZXJJbmZvIjp7InVpZCI6IjExODIiLCJyZXF1ZXN0RnJvbSI6NH19.hX2b2MqSWYmWS0k3YsthxW-T6UxarIm5rdbqCVQtxdQ&secretKey=5d5e16254bd741c486fe2b83b42171d2&platform=App';
let param = href.split('?')[1].split("&") ? href.split('?')[1].split("&") : null; let param = href.split('?')[1].split("&") ? href.split('?')[1].split("&") : null;
let token = param[2].split('=')[1]; // 如果进入页面没有登录的参数 处理跳到h5页面登录
if(href.split('?')[1].indexOf('customerId') == -1 || href.split('?')[1].indexOf('accountId') == -1 ||
href.split('?')[1].indexOf('token') == -1||href.split('?')[1].indexOf('secretKey') == -1||
href.split('?')[1].indexOf('platform') == -1){
window.location.href = 'http://activity.oytour.com/html/login.html';
}
// console.log(href.split('?')[1].split("&").indexOf('customerId'))
let userInfo ={ let userInfo ={
customerId: param[0].split('=')[1], customerId: param[0].split('=')[1],
accountId: param[1].split('=')[1], accountId: param[1].split('=')[1],
...@@ -201,11 +207,11 @@ ...@@ -201,11 +207,11 @@
let activityStartDate = new Date(res.data.activityStartDate.replace('T',' ').replace(/-/g,'/')).getTime(); //活动开始时间 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 activityEndDate = new Date(res.data.activityEndDate.replace('T',' ').replace(/-/g,'/')).getTime(); //活动结束时间
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 activityStartDate = new Date('2019/11/08 17:43:50').getTime(); // let activityStartDate = new Date('2019/11/08 17:43:50').getTime();
// let activityEndDate = new Date('2019/11/08 17:23:00').getTime(); //活动结束时间 let activityEndDate = new Date('2019/11/08 17:23:00').getTime(); //活动结束时间
//判断当前时间是否到了抢购时间 //判断当前时间是否到了抢购时间
...@@ -234,7 +240,8 @@ ...@@ -234,7 +240,8 @@
$(".received_img").attr("src",""); $(".received_img").attr("src","");
$('.img_bg_M').css("background-image","url(../images/MJ_200@3x.png)"); $('.img_bg_M').css("background-image","url(../images/MJ_200@3x.png)");
$('.img_bg_M p').css("color","#CCCCCC"); $('.img_bg_p1').css("color","#CCCCCC");
$('.img_bg_p2').css("color","#CCCCCC");
$('.img_btn p').css("color","#FFFFFF"); $('.img_btn p').css("color","#FFFFFF");
$('.img_btn p').html('活动结束') $('.img_btn p').html('活动结束')
$('.box_content_t').hide() $('.box_content_t').hide()
...@@ -274,15 +281,14 @@ ...@@ -274,15 +281,14 @@
}else { }else {
$('.img_btn p').html('去使用'); $('.img_btn p').html('去使用');
$(".received_img").attr("src","../images/received@3x.png"); $(".received_img").attr("src","../images/received@3x.png");
$(".img_bg_M").css("background-image","url(../images/M_200_2.png)");
$(".img_bg_M").css("height", "2.14rem");//通过设置CSS属性来设置元素的高
$('.use_oupon').css('display',"flex");
} }
}else { }else {
$(".received_img").attr("src",""); $(".received_img").attr("src","");
$('.img_bg_M').css("background-image","url(../images/MJ_200@3x.png)"); $('.img_bg_M').css("background-image","url(../images/MJ_200@3x.png)");
$('.img_bg_M p').css("color","#CCCCCC"); $('.img_bg_p1').css("color","#CCCCCC");
$('.img_bg_p2').css("color","#CCCCCC");
$('.img_btn p').css("color","#FFFFFF"); $('.img_btn p').css("color","#FFFFFF");
$('.img_btn p').html('活动结束') $('.img_btn p').html('活动结束')
$('.box_content_t').hide() $('.box_content_t').hide()
...@@ -380,7 +386,6 @@ ...@@ -380,7 +386,6 @@
var timer1 = setInterval(increase,1000); var timer1 = setInterval(increase,1000);
function increase() { function increase() {
time--; time--;
console.log(time)
if (time<1) { if (time<1) {
clearInterval(timer1); clearInterval(timer1);
window.location.reload() window.location.reload()
......
images/MJ_200@3x.png

29.1 KB | W: | H:

images/MJ_200@3x.png

24.2 KB | W: | H:

images/MJ_200@3x.png
images/MJ_200@3x.png
images/MJ_200@3x.png
images/MJ_200@3x.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -164,11 +164,8 @@ $.fn.dataStatistics = function(options){ ...@@ -164,11 +164,8 @@ $.fn.dataStatistics = function(options){
}else if( nowDate >= activityEndDate){ //活动结束 }else if( nowDate >= activityEndDate){ //活动结束
$(".received_img").attr("src",""); $(".received_img").attr("src","");
$('.img_bg_M').css("background-image","url(../images/MJ_200@3x.png)"); $('.img_bg_p1').css("color","#CCCCCC");
$(".img_bg_M").css("height", "1.46rem");//通过设置CSS属性来设置元素的高 $('.img_bg_p2').css("color","#CCCCCC");
$('.use_oupon').css('display',"none");
$('.img_bg_M p').css("color","#CCCCCC");
$('.img_btn p').css("color","#FFFFFF"); $('.img_btn p').css("color","#FFFFFF");
$('.img_btn').css("background-color", "#CCCCCC"); $('.img_btn').css("background-color", "#CCCCCC");
...@@ -181,24 +178,16 @@ $.fn.dataStatistics = function(options){ ...@@ -181,24 +178,16 @@ $.fn.dataStatistics = function(options){
$(".received_img").attr("src",""); $(".received_img").attr("src","");
$('.img_btn p').html(res.data.redemptionPrice + '元抢购') $('.img_btn p').html(res.data.redemptionPrice + '元抢购')
$(".img_bg_M").css("background-image","url(../images/M_200@3x.png)");
$(".img_bg_M").css("height", "1.46rem");//通过设置CSS属性来设置元素的高
$('.use_oupon').css('display',"none");
}else { }else {
$(".received_img").attr("src","../images/received@3x.png"); $(".received_img").attr("src","../images/received@3x.png");
$('.img_btn p').html('去使用') $('.img_btn p').html('去使用')
$(".img_bg_M").css("background-image","url(../images/M_200_2.png)");
$(".img_bg_M").css("height", "2.14rem");//通过设置CSS属性来设置元素的高
$('.use_oupon').css('display',"flex");
} }
}else { }else {
$(".received_img").attr("src",""); $(".received_img").attr("src","");
$('.img_bg_M').css("background-image","url(../images/MJ_200@3x.png)"); $('.img_bg_p1').css("color","#CCCCCC");
$(".img_bg_M").css("height", "1.46rem");//通过设置CSS属性来设置元素的高 $('.img_bg_p2').css("color","#CCCCCC");
$('.use_oupon').css('display',"none");
$('.img_bg_M p').css("color","#CCCCCC");
$('.img_btn p').css("color","#FFFFFF"); $('.img_btn p').css("color","#FFFFFF");
$('.img_btn p').html('活动结束') $('.img_btn p').html('活动结束')
$('.box_content_t').hide() $('.box_content_t').hide()
...@@ -224,7 +213,7 @@ $.fn.dataStatistics = function(options){ ...@@ -224,7 +213,7 @@ $.fn.dataStatistics = function(options){
},(difference+5)*1000) //5s请求一次接口 },(difference+5)*1000) //5s请求一次接口
$('.img_btn').click(function () { $('.img_btn').click(function () {
if($('.img_btn p').css('color')=='rgb(224, 50, 52)'){ //判断按钮是否可以点击 if($('.img_btn p').css('color')=='rgb(224, 50, 52)'){ //判断按钮是否可以点击
if( options.count !=0){ //判断是可以抢购 if( options.count !=0){ //判断是可以抢购
if(options.platform == 'App'){ if(options.platform == 'App'){
...@@ -241,7 +230,6 @@ $.fn.dataStatistics = function(options){ ...@@ -241,7 +230,6 @@ $.fn.dataStatistics = function(options){
window.postMessage(JSON.stringify({'action' : 'dismissHud'})); window.postMessage(JSON.stringify({'action' : 'dismissHud'}));
} }
if (res.resultCode === 1) { if (res.resultCode === 1) {
console.log("res",res);
if(options.platform == 'App'){ if(options.platform == 'App'){
window.postMessage(JSON.stringify({'action' : 'showToast', 'message' : res.message})); window.postMessage(JSON.stringify({'action' : 'showToast', 'message' : res.message}));
}else { }else {
...@@ -254,7 +242,7 @@ $.fn.dataStatistics = function(options){ ...@@ -254,7 +242,7 @@ $.fn.dataStatistics = function(options){
clearInterval(timer3) //2,执行动画之后清除timer3 clearInterval(timer3) //2,执行动画之后清除timer3
},difference*1000) },difference*1000)
let title = $('.box_title_2 p').html(); let title ='200元' + $('.img_bg_p1').html();
let data = { let data = {
'action' : 'jump', // showToast->一个提示信息 showHud->一个黑色的loading 'action' : 'jump', // showToast->一个提示信息 showHud->一个黑色的loading
...@@ -263,7 +251,8 @@ $.fn.dataStatistics = function(options){ ...@@ -263,7 +251,8 @@ $.fn.dataStatistics = function(options){
'couponId' : res.data.couponId, 'couponId' : res.data.couponId,
'title':title, 'title':title,
'price':res.data.preferPrice, 'price':res.data.preferPrice,
'backKey':'reload' 'backKey':'reload',
'data':res.data
} }
} }
if(options.platform == 'App'){ if(options.platform == 'App'){
...@@ -290,7 +279,7 @@ $.fn.dataStatistics = function(options){ ...@@ -290,7 +279,7 @@ $.fn.dataStatistics = function(options){
data.sProductName=title; data.sProductName=title;
data.productId=res.data.couponId; data.productId=res.data.couponId;
data.dTotalPrice=res.data.preferPrice; data.dTotalPrice=res.data.preferPrice;
window.location.href = 'http://127.0.0.1:5500/html/pay.html?sOrderNo='+data.sOrderNo+'&sProductName='+data.sProductName+'&productId='+data.productId+'&dTotalPrice='+data.dTotalPrice+'&CustomerId='+userInfo.customerId; window.location.href = 'http://127.0.0.1:5500/html/pay.html?sOrderNo='+data.sOrderNo+'&sProductName='+data.sProductName+'&productId='+data.productId+'&dTotalPrice='+data.dTotalPrice+'&CustomerId='+userInfo.customerId;
} }
...@@ -326,7 +315,6 @@ $.fn.dataStatistics = function(options){ ...@@ -326,7 +315,6 @@ $.fn.dataStatistics = function(options){
}else { }else {
layer.msg('活动已结束') layer.msg('活动已结束')
} }
window.location.reload()
}else { }else {
if(options.platform == 'App'){ if(options.platform == 'App'){
window.postMessage(JSON.stringify({'action' : 'showToast', 'message' : '活动还未开始'})); window.postMessage(JSON.stringify({'action' : 'showToast', 'message' : '活动还未开始'}));
...@@ -334,7 +322,6 @@ $.fn.dataStatistics = function(options){ ...@@ -334,7 +322,6 @@ $.fn.dataStatistics = function(options){
layer.msg('活动还未开始') layer.msg('活动还未开始')
} }
window.location.reload()
} }
} }
......
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