mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-03-01 09:40:57 +01:00
fix(core): fixed home global sale notice css
This commit is contained in:
2
config/env/torrents.js
vendored
2
config/env/torrents.js
vendored
@@ -843,7 +843,7 @@ module.exports = {
|
||||
*/
|
||||
torrentGlobalSales: {
|
||||
global: {
|
||||
value: 'U2/FREE',
|
||||
value: 'U3/FREE',
|
||||
startAt: '2018-01-29 00:00:00',
|
||||
expires: 60 * 60 * 1000 * 24 * 3,
|
||||
noticeMsg: 'SITE_NOTICE.GLOBAL_SALES_NOTICE',
|
||||
|
||||
@@ -866,9 +866,9 @@ exports.announce = function (req, res) {
|
||||
var start = moment(globalSalesConfig.global.startAt, globalSalesConfig.global.timeFormats).utc().valueOf();
|
||||
var end = start + globalSalesConfig.global.expires;
|
||||
var now = Date.now();
|
||||
isGlobalSaleValid = (now > start && now < end) ? true : false;
|
||||
isGlobalSaleValid = (now > start && now < end && globalSalesConfig.global.value) ? true : false;
|
||||
|
||||
if (isGlobalSaleValid) {
|
||||
if (isGlobalSaleValid && globalSalesConfig.global.value) {
|
||||
sale = globalSalesConfig.global.value;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
var end = start + vm.globalSalesConfig.global.expires;
|
||||
var now = Date.now();
|
||||
|
||||
if (now > showat && now < end) {
|
||||
if (now > showat && now < end && vm.globalSalesConfig.global.value) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user