Authored by zzzzzzz

会员日1028

... ... @@ -68,7 +68,7 @@ exports.index = (req, res, next) => {
return Promise.reject('error');
}
res.render('vip_day/index', {
res.render('vip-day/index', {
title: '会员日活动',
pageStyle: 'vip-day entry',
goods1: result.data.goods1,
... ... @@ -91,7 +91,7 @@ exports.crazyWheel = (req, res, next) => {
vipDayModel.getJoinNum(1).then(result => {
let joins = result && result.data || 0;
res.render('vip_day/crazy_wheel', {
res.render('vip-day/crazy_wheel', {
title: '疯狂大转盘',
pageStyle: 'vip-day game',
isWheel: true,
... ... @@ -115,7 +115,7 @@ exports.crazyLuck = (req, res, next) => {
coins = (coins && coins.data && coins.data.total) || 0;
joinNum = (joinNum && joinNum.data) || 0;
res.render('vip_day/crazy_luck', {
res.render('vip-day/crazy_luck', {
title: '拼手气',
pageStyle: 'vip-day game',
isLuck: true,
... ...
/* eslint no-unused-vars: ["error", { "args": "none" }]*/
/* eslint-disable no-shadow, camelcase */
'use strict';
const helpers = global.yoho.helpers;
const vipDayModel = require('../models/vipDay10');
const auth = require('../../passport/models/auth-helper');
const co = require('bluebird').coroutine;
function humanNum_wan(num) {
return num;
// if (num > 9999) {
// num = (num / 10000).toFixed(2) + '万'
// }
// return num;
}
exports.beforeIn = (req, res, next) => {
// 将APP登录状态正常化
if (req.yoho.isApp) {
req.user.uid = Number(req.user.uid || req.query.uid);
}
// 未登录
if (!req.user.uid) {
if (req.xhr) {
return res.json({
code: 401,
message: '抱歉,您还未登录',
redirect: '/signin.html'
});
}
return res.redirect(helpers.urlFormat('/signin.html', {
refer: req.originalUrl
}));
}
next();
};
exports.index = (req, res, next) => {
res.locals.module = 'activity';
res.locals.page = 'vipday-entry10';
res.locals.width750 = true;
let cate = {
goods1: [51281456, 51228151, 51315660],
goods2: [51362376, 51339512, 51316684],
goods3: [51374524, 51338322, 51344316]
};
if (req.app.get('env') !== 'production') {
cate = {
goods1: [512581904, 512581902, 512581900],
goods2: [512581822, 512581816, 512581812],
goods3: [512581806, 512581796, 512581792]
};
}
vipDayModel.getGoods(cate)
.then(result => {
// console.log(result.data)
if (result.code !== 200) {
return Promise.reject('error');
}
res.render('vip-day/vip-day1028/index', {
title: '会员日活动',
pageStyle: 'vip-day10 entry',
goods1: result.data.goods1,
goods2: result.data.goods2,
goods3: result.data.goods3
});
return;
}).catch(next);
};
exports.crazyWheel = (req, res, next) => {
res.locals.module = 'activity';
res.locals.page = 'vipday-wheel10';
res.locals.width750 = true;
if (!req.session.playwheel) {
return res.redirect('/activity/vip-day10');
}
vipDayModel.getJoinNum(1).then(result => {
let joins = result && result.data || 0;
res.render('vip-day/vip-day1028/crazy_wheel', {
title: '疯狂大转盘',
pageStyle: 'vip-day10 game',
isWheel: true,
joins: humanNum_wan(joins),
joinNum: joins
});
});
};
exports.crazyLuck = (req, res, next) => {
const uid = req.user.uid;
res.locals.module = 'activity';
res.locals.page = 'vipday-luck10';
res.locals.width750 = true;
co(function* () {
let coins = yield vipDayModel.getCoins(uid);
let joinNum = yield vipDayModel.getJoinNum(2);
coins = (coins && coins.data && coins.data.total) || 0;
joinNum = (joinNum && joinNum.data) || 0;
res.render('vip_day10/crazy_luck', {
title: '拼手气',
pageStyle: 'vip-day10 game',
isLuck: true,
coins: humanNum_wan(coins),
coinNum: coins,
joins: humanNum_wan(joinNum),
joinNum: joinNum,
});
})().catch(next);
};
/* 会员日签到 */
exports.signin = (req, res, next) => {
let uid = req.user.uid;
return vipDayModel.signin(uid)
.then(function(result) {
res.json(result);
})
.catch(next);
};
exports.wheelResult = (req, res, next) => {
let uid = req.user.uid;
let prize_type = 3;
return vipDayModel.addPrizeLog(uid, prize_type).then(result => {
return res.json(result);
}).catch(next);
};
exports.checkIsStudent = (req, res, next) => {
let uid = req.user.uid;
vipDayModel.checkIsStudent(uid).then(result => {
console.log(result);
}).catch(next);
};
exports.luckResult = (req, res, next) => {
let uid = req.user.uid;
let prize_type = 1;
let cost = 20;
let handle = co(function* (uid) {
// 查询用户 有货币
let r1 = yield vipDayModel.getCoins(uid);
if (r1.code !== 200) {
return {
code: r1.code,
message: '请求不合法'
};
}
let coin = r1.data.total;
// console.log(coin);
if (coin < 20) {
return { code: 400, message: '有货币不够...' };
}
// 得出 中奖结果
let result = yield vipDayModel.addPrizeLog(uid, prize_type);
if (result.code !== 200) {
return result;
}
Object.assign(result, { coin: coin - cost + result.data });
return result;
});
handle(uid).then(function(result) {
return res.json(result);
}).catch(next);
};
exports.luckResultCollect = (req, res, next) => {
let uid = req.user.uid;
let prize_type = 1;
return vipDayModel.queryPrizeLog(uid, prize_type).then(result => {
if (result.code === 200 && result.data) {
result.data = result.data.filter(award => award.prizeValue);
}
res.json(result);
});
};
... ...
/* eslint-disable camelcase */
'use strict';
const url = require('url');
const _ = require('lodash');
const API = global.yoho.API;
const serviceAPI = global.yoho.ServiceAPI;
const utils = require(global.utils + '/product-process');
const helpers = global.yoho.helpers;
// 签到
// doc: http://git.yoho.cn/yoho-documents/api-interfaces/blob/master/%E4%BC%9A%E5%91%98%E6%97%A5%E6%B4%BB%E5%8A%A8/%E4%BC%9A%E5%91%98%E6%97%A5%E7%AD%BE%E5%88%B0.md
exports.signin = (uid)=> {
const url = '/activity/UserdaySigninController/signin';
return serviceAPI.post(url, {uid});
};
exports.queryLeaveWordsList = (uid) => {
const url = '/activity/UserdayLeaveWordsController/queryLeaveWordsList';
return serviceAPI.get(url, {uid});
};
// 拼手气大转盘 抽奖
// doc: http://git.yoho.cn/yoho-documents/api-interfaces/blob/master/%E4%BC%9A%E5%91%98%E6%97%A5%E6%B4%BB%E5%8A%A8/%E6%8B%BC%E6%89%8B%E6%B0%94%E5%A4%A7%E8%BD%AC%E7%9B%98%E6%8A%BD%E5%A5%96.md
exports.addPrizeLog = (uid, prize_type) => {
const url = '/activity/UserdayPrizeLogController/addPrizeLog';
return serviceAPI.post(url, {
uid,
prize_type
});
};
// 查询 中奖纪录
exports.queryPrizeLog = (uid, prize_type) => {
const url = '/activity/UserdayPrizeLogController/queryPrizeLog';
return serviceAPI.get(url, {
uid,
prize_type
});
};
// 获取用户的有货币
// doc: http://git.yoho.cn/yoho-documents/api-interfaces/tree/master/%E6%9C%89%E8%B4%A7%E5%B8%81
exports.getCoins = uid => {
return API.get('', {
method: 'app.yohocoin.total',
uid
});
};
// 获取抽奖人数
// doc: http://git.yoho.cn/yoho-documents/api-interfaces/blob/master/%E4%BC%9A%E5%91%98%E6%97%A5%E6%B4%BB%E5%8A%A8/%E6%9F%A5%E8%AF%A2%E5%8F%82%E4%B8%8E%E6%8A%BD%E5%A5%96%E4%BA%BA%E6%95%B0.md
exports.getJoinNum = prize_type => {
const url = '/activity/UserdayPrizeLogController/queryPrizeLogNum';
return serviceAPI.get(url, {
prize_type,
});
};
/**
* cate [object Object]
*/
exports.getGoods = cate => {
let skns = '';
let cates = Object.keys(cate);
_.forEach(cate, function(val, key) {
skns = skns.concat(',').concat(val.join(','));
});
skns = skns.slice(1);
return API.get('', {
method: 'h5.product.batch',
productSkn: skns
}).then(result => {
if (result.code !== 200) {
return {
code: result.code,
message: result.message
};
}
let productList = utils.processProductList(result.data.product_list);
let data = {};
productList.forEach(product=> {
let skn = product.productSkn;
let imgSrc = url.parse(product.defaultImages);
product.defaultImages = ['//', imgSrc.hostname, imgSrc.pathname].join('');
product.url = helpers.appUrlFormat(product.url, 'go.productDetail', {
product_skn: skn
});
for (let c of cates) {
let index = cate[c].indexOf(skn);
if (index !== -1) {
cate[c].splice(index, 1);
data[c] || (data[c] = []);
data[c].push(product);
break;
}
}
});
// console.log(data.goods1.length)
// console.log(data.goods2.length)
// console.log(data.goods3.length)
return {
code: 200,
data
};
});
};
// 判断是否学生
exports.checkIsStudent = uid => {
return API.get('', {
method: 'app.student.checkIsStudent',
uid: uid,
});
};
... ...
... ... @@ -17,6 +17,7 @@ const invite = require(`${cRoot}/invite`);
const couponFloor = require(`${cRoot}/coupon-floor`);
const auth = require('../../doraemon/middleware/auth');
const vipDay = require(`${cRoot}/vipDay`);
const vipDay10 = require(`${cRoot}/vipDay10`);
const market = require(`${cRoot}/market`);
// routers
... ... @@ -83,6 +84,15 @@ router.post('/vip-day/signin.json', vipDay.beforeIn, vipDay.signin);
router.post('/vip-day/msg/save.json', vipDay.beforeIn, vipDay.saveMsg);
router.get('/vip-day/msg/fetch.json', vipDay.fetchMsg);
// 1028会员日
router.get('/vip-day10', vipDay10.index);
router.get('/vip-day10/crazy-wheel', vipDay10.beforeIn, vipDay10.crazyWheel);
router.post('/vip-day10/crazy-wheel/award.json', vipDay10.beforeIn, vipDay10.wheelResult);
router.post('/vip-day10/crazy-luck/award.json', vipDay10.beforeIn, vipDay10.luckResult);
router.get('/vip-day10/crazy-luck/award-list.json', vipDay10.beforeIn, vipDay10.luckResultCollect);
router.get('/vip-day10/crazy-luck', vipDay10.beforeIn, vipDay10.crazyLuck);
router.post('/vip-day10/signin.json', vipDay10.beforeIn, vipDay10.signin);
module.exports = router;
... ...
<div class="vipday-game game-luck">
{{> vip_day/game-header message="花20有货币就能获一次抽奖机会哦!"}}
{{> vip_day/game-main}}
<div class="info">
<div class="info-item my-icon">
<div class="my-icon-label">
<i class="small-icon"></i><span>我的有货币</span>
</div>
<span id="my-coin" class="game-val game-rect">{{coins}}</span>
</div>
<div class="info-item">
<button id="my-award" class="game-btn my-award" type="button" data-toggle="ymodal" data-target="#js-awards">我的奖品</button>
</div>
<div class="info-item player-num">
<div>
已有:<span id="player-num" class="player-num-val">{{joins}}</span>
</div>
<span>参加抽奖</span>
</div>
</div>
<div class="explain">
<div class="explain-txt">
<h6 class="explain-title">有货币抽奖规则:</h6>
<ul class="explain-rules">
<li>1、 每次投入20有货币,用户账内有货币需大于20;每位用户不限参与次数</li>
<li>2、 奖品为20、50、100、200、1000、2000、5000有货币,抽中对应奖品即可获得;如未中奖则告知“很遗憾您没有中奖,继续加油哦~~”!</li>
</ul>
</div>
</div>
</div>
<div class="ymodal ymodal-alert vipday-luck-awards" id="js-awards">
<div class="ymodal-dialog">
<div class="ymodal-content">
<div class="ymodal-header">我的奖品<i class="iconfont close" data-dismiss="ymodal">&#xe623</i></div>
<ol class="ymodal-body">
<!-- placeholder -->
</ol>
</div>
</div>
</div>
<script>
var coin = {{coinNum}};
var joinNum = {{joinNum}};
</script>
... ...
<div class="vipday-game game-wheel">
{{> vip_day/game-header message="您有1次抽奖机会"}}
{{> vip_day/game-main}}
<div class="info">
<div class="info-item">
已有<span class="game-val game-rect" id="js-join-num">{{joins}}</span>人参与抽奖
</div>
</div>
<div class="explain">
<div class="explain-txt">
<h6 class="explain-title">留言板细则:</h6>
<ul class="explain-rules">
<li>每位用户限写一条留言,完成提交后获得一次抽奖机会。可随机获得10元现金券、20元现金券、50元现金券、100元现金券</li>
<li>您的想法有可能会在后面的会员日实现哦~<br>本次活动解释权归有货所有</li>
</ul>
</div>
</div>
</div>
<script>
var joinNum = {{joinNum}};
</script>
... ...
{{! header }}
<header class="vip-day10-header"></header>
{{! section: 玩转有货币 }}
<section class="vip-day10-sec play-coin" id="play-coin">
<div class="content">
<h2>玩转有货币</h2>
<p>签到福利</p>
<p>今日签到享双倍有货币</p>
<a href='/home/mycurrency{{#if isApp}}?openby:yohobuy={"action":"go.signin"}{{/if}}' class="d-chit-more">立即签到</a>
</div>
</section>
<br/>
<br/>
<br/>
<br/>
{{! section: vip等级加速 }}
<section class="vip-day10-sec vip-rocket" id="vip-rocket">
<header class="header">
<i class="title-pic"></i>
</header>
<div class="content text-center">
<a href="javascript:;" data-toggle="ymodal" data-target="#vip-privilege" class="vip-rocket-a"></a>
<i class="vip-rocket-point"></i>
</div>
</section>
{{! section: 会员日专享商品 }}
<section class="vip-day10-sec vip-goods" id="vip-goods">
<header class="header">
<i class="title-pic"></i>
</header>
<div class="content">
<div class="vip-goods-sec">
<!-- good class 1-->
<h5 class="vip-goods-sec-label">潮牌尖货</h5>
<ul class="vip-goods-list clearfix">
{{#each goods1}}
{{> vip_day/vip-good}}
{{/each}}
</ul>
<!-- good class 2-->
<h5 class="vip-goods-sec-label">新品释出</h5>
<ul class="vip-goods-list clearfix">
{{#each goods2}}
{{> vip_day/vip-good}}
{{/each}}
</ul>
<!-- good class 3-->
<h5 class="vip-goods-sec-label">VIP独享</h5>
<ul class="vip-goods-list clearfix">
{{#each goods3}}
{{> vip_day/vip-good}}
{{/each}}
</ul>
<div class="text-center">
<a href='https://m.yohobuy.com/product/sale/vip?channel={{channel}}&openby:yohobuy={"action":"go.vippro"}' class="vip-goods-more">点击查看更多</a>
</div>
</div>
</div>
</section>
{{! section: 学生专享 }}
<section id="js-msg-sec" class="vip-day10-sec vip-day10-student">
<header class="header">
<h1>学生专享</h1>
</header>
<div class="content vip-day10-msg">
想嘻嘻嘻嘻嘻嘻嘻嘻嘻
嘻嘻嘻事实上事实上事实上
立即认证
</div>
</section>
{{! section: 召唤神龙}}
<!--<a href="/activity/invite?act_id=29&openby:yohobuy={'action':'go.h5','params':{url:'http://m.yohobuy.com/activity/invite?act_id=29'}}">-->
<div class="vip-day10-sec friends" id="js-invite-friends">"呼朋唤友一起玩!更多福利,欢乐加倍"</div>
<!--</a>-->
{{! footer }}
<footer class="vip-day10-footer">
{{#unless isApp}} <a href="http://www.yohoshow.com/about/index/yohobuyqr/" class="app-download"></a> {{/unless}}
</footer>
{{> vip_day/footer-nav }}
{{! 立刻关注抢优惠券 弹出二维码}}
<div class="ymodal" id="chit-qcode">
<div class="vh-center ymodal-dialog" data-dismiss="ymodal">
<div>
<img class="qcode" src="{{imgSrc 'img/activity/vip_day/qcode.jpg'}}">
<p class="chit-qcode-tip">扫码关注有货微信或搜索“yohobuy”关注订阅号</p>
</div>
</div>
</div>
<div class="ymodal" id="qiandao-modal">
<div class="vh-center ymodal-dialog" data-dismiss="ymodal">
<img src="{{imgSrc 'img/activity/vip_day/qiandao.png'}}">
</div>
</div>
<div class="ymodal" id="vip-privilege">
<div class="vh-center ymodal-dialog" data-dismiss="ymodal">
<img src="{{imgSrc 'img/activity/vip_day/privilege.png'}}" alt="VIP 权益">
</div>
</div>
\ No newline at end of file
... ...
/* eslint-disable vars-on-top */
/**
* @author xuan.chen@yoho.cn
*/
'use strict';
require('plugin/modal');
require('plugin/modal.alert');
require('../common.js');
var yoho = require('../yoho-app');
var share = require('../common/share');
var tip = require('plugin/tip');
window.tip = tip;
var $punch, $punchModal;
var $invite;
function appJump(where, option) {
var $anchor = $(document.createElement('a'));
where = [location.protocol, '//', location.hostname, where].join('');
option.params || (option.params = {});
$anchor.attr('href', [where, '?openby:yohobuy=', JSON.stringify(option)].join(''));
// alert($anchor.attr('href'))
$anchor.appendTo('body');
$anchor[0].click();
$anchor.delay(2000).remove();
}
var page = {
rollTimer: null,
init: function() {
this.domInit();
this.bindEvents();
share({
title: '有货【会员日】潮集狂欢,限时六大福利,还不快参与起来?!',
link: location.href,
desc: '每月28日,尽情释放!',
imgUrl: 'http://img10.static.yhbimg.com/taobaocms/2016/09/23/18/010ccac2955e7e50ffb66b75110e73e3e1.png'
});
},
domInit: function() {
$punch = $('#js-qiandao');
$punchModal = $('#qiandao-modal');
$invite = $('#js-invite-friends');
},
bindEvents: function() {
$punch.on('click', $.proxy(this.punchFuli, this));
if (yoho.isApp) {
$invite.on('click', function() {
$.yAlert({
content: '立即参与“呼朋唤友一起玩”<br>在“我的”页面下方点击“邀请好友赢福利”才可以参加哦',
okText: '立即去'
})
.on('hiden.yoho.modal', function() {
appJump('/home', { action: 'go.mine'});
});
});
}
},
// 签到福利
punchFuli: function() {
if (yoho.isApp && !yoho.getUid()) {
appJump('http://m.yohobuy.com/signin.html', {
action: 'go.weblogin',
params: {
url: 'http://m.yohobuy.com/signin.html',
jumpurl: {
url: 'http://m.yohobuy.com/activity/vip-day10'
}
}
});
return false;
}
$.post('/activity/vip-day10/signin.json?app_version=1&uid=' + yoho.getUid()).done(function(res) {
if (res.code !== 200) {
tip.show(res.message || '签到失败');
if (res.redirect) {
location.href = res.redirect;
}
return;
}
$punchModal.yModal('show');
})
.fail(function() {
tip.show('签到失败 >_<');
});
},
};
window.$ = $;
$(function() {
page.init();
});
... ...
/* eslint-disable vars-on-top */
'use strict';
require('plugin/modal.alert');
require('../common');
var yoho = require('js/yoho-app');
var tip = require('plugin/tip');
var Game = require('./vip-day/game');
window.$ = $;
function coinNumReadable(coin) {
if (coin > 9999) {
coin = (coin / 10000).toFixed(2) + '万';
}
return coin;
}
function getAwards($container) {
$.get('/activity/vip-day10/crazy-luck/award-list.json?app_version=1&uid=' + yoho.getUid())
.done(function(res) {
if (res.code !== 200) {
return tip.show('获取失败,稍后再试..');
}
var $frag = $(document.createDocumentFragment());
if (!res.data) {
$frag.append('<li><div class="text-center">快试试手气吧~</div></li>');
} else {
$.each(res.data, function(i, li) {
$frag.append(
[
'<li>',
'<span class="time pull-right">' + li.winningTime + '</span>',
'<div><span class="red">' + li.prizeValue + '</span>有货币</div>',
'</li>'
].join('')
);
});
}
$container.html($frag);
})
.fail(function() {
tip.show('获取失败,稍后再试..');
});
}
$(function() {
var gCoin = window.coin;
var $coin = $('#my-coin');
var $awardsModal = $('#js-awards');
var $playerNum = $('#player-num');
var $awardsList = $awardsModal.find('.ymodal-body');
var game = new Game('#js-stage', {
url: '/activity/vip-day10/crazy-luck/award.json?app_version=1&uid=' + yoho.getUid(),
prize_type: 1,
awards: [20, 2000, 100, 50, 200, 5000, 0, 10000],
cost: 20
});
function upPlayers(up) {
window.joinNum += up;
$playerNum.text(window.joinNum);
}
function setCoins(count) {
$coin.text(coinNumReadable(count));
}
setInterval(function() {
var up = Math.floor(Math.random() * 5);
upPlayers(up);
}, 5000);
game.onstart = function() {
if (gCoin >= 20) {
setCoins(gCoin - 20);
}
};
game.onsuccess = function(score, coin) {
var content = score === 0 ? '很遗憾您没有中奖,继续加油哦~' : '<p class="primary">恭喜你获得<span class="award">' + score + '</span>个有货币,请到【我的奖品】中查收</p>';
$.yAlert({
class: 'vipday-game-alert',
content: content
});
setCoins(gCoin = coin);
upPlayers(1);
};
$awardsModal.on('show.yoho.modal', function() {
getAwards($awardsList);
});
});
... ...
/* eslint-disable vars-on-top */
'use strict';
require('plugin/modal.alert');
require('../common');
var yoho = require('js/yoho-app');
var Game = require('./vip-day/game');
window.$ = $;
$(function() {
var $gameNotify = $('#js-game-notify');
var $playerNum = $('#js-join-num');
var game = new Game('#js-stage', {
url: '/activity/vip-day10/crazy-wheel/award.json?app_version=1&uid=' + yoho.getUid(),
awards: [50, 5, 10, 100, 20, 28, 1, 80]
});
function numReadable(num) {
if (num > 9999) {
num = (num / 10000).toFixed(2) + '万';
}
return num;
}
function upPlayers(up) {
window.joinNum += up;
$playerNum.text(numReadable(window.joinNum));
}
setInterval(function() {
var up = Math.floor(Math.random() * 5);
upPlayers(up);
}, 5000);
game.onsuccess = function(score) {
// console.log(score);
upPlayers(1);
$.yAlert({
class: 'vipday-game-alert',
content: '<p class="primary">恭喜你获得<span class="award">' + score + '</span>元优惠券,请到【我的-优惠券】中查收奖品</p>'
});
$gameNotify.text('您的机会已用完,请下月28号再来');
};
});
... ...
... ... @@ -113,7 +113,7 @@ yoho = {
return qs.uid;
}
return window.gitUid();
return window.getUid();
},
goLogin: function(refer, data) {
... ...
@import "live/index";
@import "vip_day/index";
@import "vip_day10/index";
@import "student";
@import "market/index";
... ...
.vip-day10.entry {
background-color: #262992;
}
.vip-day10-header {
background: resolve("activity/vip_day/activity.jpg");
background-size: 100% 100%;
height: 363px;
/*box-shadow: inset -6px -6px 7px rgba(15, 5, 10, 0.32);*/
}
.vip-day10-footer {
position: relative;
height: 466px;
background: resolve("activity/vip_day/foot-app.png");
background-size: 100% 100%;
margin-bottom: 116px;
.app-download {
position: absolute;
right: 45px;
bottom: 185px;
width: 169px;
height: 52px;
}
}
.vip-day10-slogan {
height: 107px;
background: no-repeat center center resolve("activity/vip_day/slogan.png");
background-size: 322px 107px;
}
.vip-day10-sec {
margin-left: 19px;
margin-right: 19px;
.title-pic {
display: inline-block;
background-repeat: no-repeat
}
.header {
position: relative;
text-align: center;
}
.content {
position: relative;
background-color: #fff;
padding-left: 15px;
padding-right: 15px;
border-radius: 16px;
box-shadow: inset -6px -6px 7px rgba(15, 5, 10, 0.32);
&:after,
&:before {
display: table;
content: '';
clear: both;
}
}
}
.vip-day10 {
/* 福利: 玩转有货币 */
.play-coin {
text-align: center;
}
/* VIP 等级加速 */
.vip-rocket {
.title-pic {
width: 223px;
height: 103px;
background-image: url('/activity/vip_day/vip-boot.png');
}
.content {
height: 263px;
background: no-repeat center center resolve('activity/vip_day/vip-boot-pic.jpg');
background-size: 100% 100%;
}
}
.vip-rocket-a {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
.vip-rocket-point {
position: absolute;
left: 50%;
bottom: -50px;
margin-left: -38px;
width: 76px;
height: 107px;
background: no-repeat center center url('/activity/vip_day/point.png');
}
/* 福利 会员日专享商品 */
.vip-goods {
.title-pic {
width: 330px;
height: 126px;
background-image: url("/activity/vip_day/vip-day10-goods.png");
}
}
.vip-goods-sec {
overflow: hidden;
}
.vip-goods-more {
display: block;
margin: 47px auto;
width: 186px;
height: 44px;
line-height: 44px;
background-color: #000;
color: #fff;
box-shadow: 8px 8px #929191;
border-radius: 16px;
}
.vip-goods-sec-label {
width: 200px;
height: 57px;
line-height: 57px;
margin: 50px auto 25px;
background-color: #e95d3f;
box-shadow: -4px -4px 4px rgba(0, 0, 0, 0.28);
font-size: 40px;
color: #fff;
text-align: center;
letter-spacing: 2PX;
}
.vip-good {
position: relative;
float: left;
// width: 222px;
width: 33.3333%;
// border: 1PX solid #000;
padding-right: 8px;
&:nth-child(3n) {
margin-right: 0;
}
}
.vip-good-link {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
.vip-good-show {
width: 220px;
height: calc(220 * 4 / 3px);
}
.vip-good-price {
margin-top: 10px;
margin-bottom: 14px;
position: relative;
text-align: center;
sup {
// font-size: 20px;
// vertical-align: super;
}
.disable-price {
margin-left: 5px;
text-decoration: line-through;
color: #5b5b5b;
}
&:before {
position: absolute;
left: 50%;
bottom: -14px;
content: "";
display: block;
width: 0;
height: 0;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-bottom: 9px solid #000;
transform: translate3d(-50%, 0, 0);
}
&:after {
display: block;
content: "";
clear: both;
}
}
.vip-good-bottom {
padding-top: 10px;
padding-bottom: 12px;
background-color: #000;
text-align: center;
}
.vip-good-name {
font-size: 20px;
color: #fff;
height: calc(2*20*1.4px);
margin-bottom: 10px;
margin-left: 5px;
margin-right: 5px;
}
.vip-good-fav {
line-height: 25px;
font-size: 16px;
background-color: #fff;
color: #000;
}
/* 福利6: 召唤朋友 */
.friends {
margin-top: 64px;
margin-bottom: 56px;
color: transparent;
height: 327px;
background-image: resolve('activity/vip_day/invite.jpg');
background-size: 100% 100%;
}
}
/* 福利5: 福利加倍 */
.vip-day10-student {
.title-pic {
width: 329px;
height: 135px;
background-image: url("/activity/vip_day/happy-fuli.png");
}
}
.vip-day10-msg {
padding-top: 15px;
.mirror {
float: left;
width: 60%;
// width: 430px;
margin-right: 35px;
padding: 5px;
background-color: #e9e9ea;
border-radius: 4px;
}
.vip-msg-content {
height: 136px;
display: block;
background-color: #e9e9ea;
border: none;
outline: none;
width: 100%;
resize: none;
}
.vip-msg-send {
display: block;
height: 42px;
line-height: 42px;
background-color: #e95d3f;
color: #fff;
width: 100%;
border-radius: 8px;
font-weight: bold;
}
.txt {
float: left;
margin-top: 23px;
margin-bottom: 23px;
width: 195px;
height: 132px;
}
}
.vip-day10-msg-input {
position: relative;
display: block;
// visibility: hidden;
height: 51PX;
margin-top: 15px;
margin-bottom: 15px;
border: 3PX solid #e9e9ea;
box-sizing: content-box;
overflow: hidden;
li {
padding-left: 15px;
padding-right: 15px;
height: 51PX;
line-height: 51PX;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
}
/* FLOW Element */
.vip-day10 {
#chit-qcode .qcode {
width: 540px;
height: 540px;
}
.chit-qcode-tip {
color: white;
margin-top: 10px;
}
#qiandao-modal img {
width: 559px;
height: 545px;
}
#vip-privilege img {
width: 494px;
}
#vipday-msg-input {
.msg-text {
width: 100%;
height: 330px;
}
}
#chit-qcode,
#qiandao-modal,
#vip-privilege {
.ymodal-dialog {
height: 100%;
width: auto;
margin: 0;
}
}
.footer-nav {
position: fixed;
right: 0;
bottom: 0;
left: 0;
z-index: 1;
background-color: #131313;
color: #345abc;
text-shadow: 0 0 5px #0919f5;
li {
position: relative;
padding-top: 15px;
float: left;
width: 20%;
height: 115px;
text-align: center;
a {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
}
i {
display: inline-block;
width: 76px;
height: 47px;
background-repeat: no-repeat;
background-position: center center;
background-size: 100% 100%;
}
.bg-chit {
background-image: resolve("activity/vip_day/get-chit.png");
}
.bg-coin {
background-image: resolve("activity/vip_day/play-coin.png");
}
.bg-level {
background-image: resolve("activity/vip_day/double-level.png");
}
.bg-goods {
background-image: resolve("activity/vip_day/private-goods.png");
}
.bg-fuli {
background-image: resolve("activity/vip_day/double-fuli.png");
}
}
}
... ...
$color1: #c03729; /* red */
$color2: #ffea5f; /* yellow */
$color3: #952c20; /* shadow */
$border-radius: 8px;
.vip-day.game {
background-color: #27272b;
}
.vipday-game {
font-size: 24px;
width: 750px;
border-top: 1PX solid #27272b;
.game-rect {
border: 3px solid #001;
background-color: #342327;
box-shadow: 0 0 0 3px #ee5646;
border-radius: 8px;
color: $color2;
}
.game-val {
font-size: 38px;
display: inline-block;
padding: 5px 20px;
margin-left: 20px;
margin-right: 20px;
}
.game-btn {
height: 100px;
line-height: 100px;
border: none;
outline: none;
border-radius: 8PX;
box-shadow: 0 8px $color3;
background-color: $color2;
font-size: 32px;
padding: 0 40px;
}
.my-award {
color: #5e4412;
}
/* ---------------------------------------------------- *\
header area
\* ---------------------------------------------------- */
.header {
height: 142px;
background-color: $color1;
overflow: hidden;
}
.header-banner {
float: left;
width: 162px;
height: 124px;
margin: 11px 25px 7px 15px;
}
&.game-luck .header-banner {
background: url("/activity/vip_day/chit.png");
}
&.game-wheel .header-banner {
background: url("/activity/vip_day/coin.png");
}
.game-notify {
width: 510px;
height: 79px;
margin-top: 32px;
overflow: hidden;
text-align: center;
font-size: 28px;
line-height: calc(79 - 3 * 2px);
}
/* ---------------------------------------------------- *\
main area
\* ---------------------------------------------------- */
.game {
position: relative;
height: 536px;
background: resolve("activity/vip_day/stage@2x.png");
background-size: 750px 536px;
}
.game-stage {
position: absolute;
top: 60px;
right: 82px;
left: 82px;
width: 586px;
height: 406px;
background-size: contain;
}
.game-item {
float: left;
width: calc((586-4) / 3px);
height: calc((406-4) / 3px);
margin-right: 2px;
margin-bottom: 2px;
&:nth-child(3n) {
margin-right: 0;
}
}
.game-award.is-active {
background: url("/activity/vip_day/cursor.png");
}
&.game-luck .game-stage {
background-image: resolve("activity/vip_day/luck-stage.png");
}
&.game-wheel .game-stage {
background-image: resolve("activity/vip_day/chit-stage.png");
}
/* ---------------------------------------------------- *\
footer area
\* ---------------------------------------------------- */
.small-icon {
display: inline-block;
width: 25px;
height: 25px;
margin-right: 5px;
vertical-align: middle;
background: url("/activity/vip_day/coin-lite@2x.png");
}
.info {
display: table;
width: 100%;
position: relative;
padding-top: 15px;
padding-bottom: 60px;
background-color: $color1;
color: #ffedbf;
}
.my-icon-label {
margin-bottom: 15px;
span {
vertical-align: middle;
}
}
.player-num {
font-size: 22px;
}
.player-num-val {
font-size: 32px;
}
.info-item {
display: table-cell;
text-align: center;
vertical-align: middle;
}
.explain {
position: relative;
width: 708px;
margin-left: auto;
margin-right: auto;
margin-top: -43px;
&:before {
display: block;
content: "";
height: 27px;
border: 5px solid #ffedbf;
border-radius: 12px;
background-color: #32212c;
}
}
.explain-txt {
position: relative;
z-index: 1;
width: 679px;
height: 297px;
padding: 27px 40px 13px;
margin: -13px auto 0;
background: white resolve("activity/vip_day/sprite1.png") repeat-x left bottom;
background-size: 13px;
&:before {
position: absolute;
top: 0;
left: 0;
right: 0;
content: "";
height: 27px;
background: linear-gradient(to bottom, rgba(171, 171, 171, 0.8), transparent);
}
}
.explain-title {
font-size: 26px;
font-weight: bold;
margin-bottom: 10px;
}
.explain-rules {
li {
margin-bottom: 10px;
}
}
}
.vipday-game-alert {
.primary {
font-size: 34px;
}
.award {
color: #d0021b;
}
}
.vipday-luck-awards {
.ymodal-body {
text-align: left;
padding-top: 0;
height: 400px;
overflow: auto;
}
.ymodal-header {
font-size: 38px;
height: 120px;
line-height: 120px;
color: #fff;
background-color: #444;
text-align: center;
}
.close {
font-size: 36px;
position: absolute;
top: 22px;
right: 22px;
line-height: 1;
}
li {
font-size: 32px;
height: 95px;
line-height: 95px;
border-bottom: 1PX solid #e0e0e0;
&:last-of-type {
border-bottom: none;
}
}
.red {
color: #d0021b;
}
.time {
color: #999;
font-size: 26px;
}
}
... ...
@import "entry";
@import "game";
\ No newline at end of file
... ...