Commit 328d0756 authored by 罗超's avatar 罗超

no message

parent 87a01d40
...@@ -8,10 +8,10 @@ $.fn.dataStatistics = function(options) { ...@@ -8,10 +8,10 @@ $.fn.dataStatistics = function(options) {
couponId: 0, //订单id couponId: 0, //订单id
platform: 'app', platform: 'app',
count: 0, count: 0,
login:true, login: true,
activityStartDate:0, activityStartDate: 0,
activityEndDate:0, activityEndDate: 0,
nowDate:0 nowDate: 0
}, options || {}); }, options || {});
var ths = this; //解决this指向问题 var ths = this; //解决this指向问题
...@@ -64,6 +64,7 @@ $.fn.dataStatistics = function(options) { ...@@ -64,6 +64,7 @@ $.fn.dataStatistics = function(options) {
var nownumber = options.min; //优惠券数量 var nownumber = options.min; //优惠券数量
var Activityendtime = ''; //活动结束时间 var Activityendtime = ''; //活动结束时间
let nodisplay = false; let nodisplay = false;
function run(diff) { function run(diff) {
if (diff) { if (diff) {
difference = diff difference = diff
...@@ -83,7 +84,7 @@ $.fn.dataStatistics = function(options) { ...@@ -83,7 +84,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(nodisplay == true){ //显示活动预告 if (nodisplay == true) { //显示活动预告
$('.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");
...@@ -147,7 +148,7 @@ $.fn.dataStatistics = function(options) { ...@@ -147,7 +148,7 @@ $.fn.dataStatistics = function(options) {
type: "POST", type: "POST",
url: `${getApiUrl().urlJava}api/appActivity/getCurrentActivity`, url: `${getApiUrl().urlJava}api/appActivity/getCurrentActivity`,
contentType: "application/json", contentType: "application/json",
data: getJavaData({couponId:options.couponId}), data: getJavaData({ couponId: options.couponId }),
async: false, async: false,
success: function(res) { success: function(res) {
if (res.resultCode === 1) { if (res.resultCode === 1) {
...@@ -157,7 +158,7 @@ $.fn.dataStatistics = function(options) { ...@@ -157,7 +158,7 @@ $.fn.dataStatistics = function(options) {
nownumber = res.data.repertory; // 算出现在的数字 nownumber = res.data.repertory; // 算出现在的数字
if (num > 0) { if (num > 0) {
if(num> 5){ if (num > 5) {
$('.digit_set').empty() $('.digit_set').empty()
clearInterval(timer2); clearInterval(timer2);
$('.dataStatistics').dataStatistics({ $('.dataStatistics').dataStatistics({
...@@ -168,16 +169,16 @@ $.fn.dataStatistics = function(options) { ...@@ -168,16 +169,16 @@ $.fn.dataStatistics = function(options) {
price: options.price, price: options.price,
couponId: options.couponId, couponId: options.couponId,
platform: options.platform, platform: options.platform,
login:options.login, login: options.login,
count: options.count, //判断是否可以抢购 0为不可以 count: options.count, //判断是否可以抢购 0为不可以
activityStartDate:options.activityStartDate, activityStartDate: options.activityStartDate,
activityEndDate:options.activityEndDate, activityEndDate: options.activityEndDate,
}); //刚进入页面不执行动画 }); //刚进入页面不执行动画
}else { } else {
run(num) run(num)
} }
}else if(num< 0){ } else if (num < 0) {
$('.digit_set').empty() $('.digit_set').empty()
clearInterval(timer2); clearInterval(timer2);
$('.dataStatistics').dataStatistics({ $('.dataStatistics').dataStatistics({
...@@ -188,10 +189,10 @@ $.fn.dataStatistics = function(options) { ...@@ -188,10 +189,10 @@ $.fn.dataStatistics = function(options) {
price: options.price, price: options.price,
couponId: options.couponId, couponId: options.couponId,
platform: options.platform, platform: options.platform,
login:options.login, login: options.login,
count: options.count, //判断是否可以抢购 0为不可以 count: options.count, //判断是否可以抢购 0为不可以
activityStartDate:options.activityStartDate, activityStartDate: options.activityStartDate,
activityEndDate:options.activityEndDate, activityEndDate: options.activityEndDate,
}); //刚进入页面不执行动画 }); //刚进入页面不执行动画
} }
...@@ -270,18 +271,16 @@ $.fn.dataStatistics = function(options) { ...@@ -270,18 +271,16 @@ $.fn.dataStatistics = function(options) {
$('.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.login == true){ if (options.login == true) {
if (options.count != 0) { //判断是可以抢购 if (options.count != 0) { //判断是可以抢购
let buyInfo = { // let buyInfo = {
redemptionPrice: options.price, // redemptionPrice: options.price,
couponId: options.couponId, // couponId: options.couponId,
platform:options.platform, // platform: options.platform,
} // }
localStorage.buyInfo = JSON.stringify(buyInfo) // localStorage.buyInfo = JSON.stringify(buyInfo)
window.location.href = 'https://activity.oytour.com/html/Rushbuy.html'; window.location.href = `https://activity.oytour.com/html/Rushbuy.html?redemptionPrice=${options.price}&couponId=${options.couponId}&platform=${options.platform}`;
// window.location.href = './Rushbuy.html' ;
} else { } else {
let data = { let data = {
'action': 'jump', // showToast->一个提示信息 showHud->一个黑色的loading 'action': 'jump', // showToast->一个提示信息 showHud->一个黑色的loading
...@@ -292,12 +291,12 @@ $.fn.dataStatistics = function(options) { ...@@ -292,12 +291,12 @@ $.fn.dataStatistics = function(options) {
} }
if (options.platform == 'app') { if (options.platform == 'app') {
window.postMessage(JSON.stringify(data)); window.postMessage(JSON.stringify(data));
}else if(options.platform == 'H5'){ } else if (options.platform == 'H5') {
window.location.href = 'https://activity.oytour.com/html/downloadApp.html' window.location.href = 'https://activity.oytour.com/html/downloadApp.html'
} }
} }
}else { } else {
window.location.href = 'https://activity.oytour.com/html/login.html' window.location.href = 'https://activity.oytour.com/html/login.html'
} }
} else { } else {
......
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