Authored by ccbikai(👎🏻🍜)

Merge branch 'release/vipday' into release/5.1

Showing 90 changed files with 1642 additions and 49 deletions
... ... @@ -66,7 +66,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,
... ... @@ -89,7 +89,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,
... ... @@ -113,7 +113,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 co = require('bluebird').coroutine;
function humanNum_wan(num) {
return num;
// if (num > 9999) {
// num = (num / 10000).toFixed(2) + '万'
// }
// return num;
}
exports.checkIsStudent = (req, res, next) => {
let uid = req.user.uid || req.query.uid;
vipDayModel.checkIsStudent(uid).then(result => {
res.json(result);
}).catch(next);
};
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';
let cate = {
goods1: [51140408, 51334392, 51300342, 51188891, 51243402, 51389870],
goods2: [51315800, 51388146, 51344242, 51294920, 51414498, 51337292],
goods3: [51397576, 51410158, 51289104]
};
if (req.app.get('env') !== 'production') {
cate = {
goods1: [51140408, 51334392, 51300342, 51188891, 51243402, 51389870],
goods2: [51315800, 51388146, 51344242, 51294920, 51414498, 51337292],
goods3: [51397576, 51410158, 51289104]
};
}
co(function*() {
let isStudent = false;
// 获取学生信息
if (req.user.uid || req.query.uid) {
let result = yield vipDayModel.checkIsStudent(req.user.uid || req.query.uid);
result.data && Number(result.data.isStudent) === 1 && (isStudent = true);
}
// 获取商品信息
let goodList = yield vipDayModel.getGoods(cate);
res.render('vip-day/vip-day1028/index', {
title: '会员日活动',
pageStyle: 'vip-day10 entry',
isStudent: isStudent,
goods1: goodList.data && goodList.data.goods1 || [],
goods2: goodList.data && goodList.data.goods2 || [],
goods3: goodList.data && goodList.data.goods3 || [],
});
})();
};
exports.crazyWheel = (req, res, next) => {
res.locals.module = 'activity';
res.locals.page = 'vipday-wheel10';
res.locals.width750 = true;
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-day/vip-day1028/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 || req.query.uid;
let prize_type = 3;
return vipDayModel.addPrizeLog(uid, prize_type).then(result => {
return res.json(result);
}).catch(next);
};
exports.luckResult = (req, res, next) => {
let uid = req.user.uid;
let prize_type = 3;
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 = 3;
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);
});
};
\ No newline at end of file
... ...
... ... @@ -17,12 +17,11 @@ app.on('mount', function(parent) {
delete parent.locals.settings; // 不继承父 App 的设置
Object.assign(app.locals, parent.locals);
});
app.set('views', path.join(__dirname, 'views/action'));
app.use(global.yoho.hbs({
extname: '.hbs',
defaultLayout: 'layout',
layoutsDir: doraemon,
partialsDir: path.join(__dirname, 'views/partial', `${doraemon}/partial`),
partialsDir: path.join(__dirname, 'views/partial'),
views: path.join(__dirname, 'views/action'),
helpers: Object.assign({}, global.yoho.helpers, helpers)
}));
... ...
... ... @@ -103,7 +103,7 @@ exports.getGoods = cate => {
productList.forEach(product=> {
let skn = product.productSkn;
let imgSrc = url.parse(product.defaultImages);
let imgSrc = url.parse(product.defaultImages || '');
product.defaultImages = ['//', imgSrc.hostname, imgSrc.pathname].join('');
... ...
/* 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.product_skn;
let imgSrc = url.parse(product.default_images || '');
product.default_images = ['//', 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,
});
};
... ...
... ... @@ -19,6 +19,7 @@ const invite = require(`${cRoot}/invite`);
const couponFloor = require(`${cRoot}/coupon-floor`);
const auth = require('../../doraemon/middleware/auth');
const vipDay = require(`${cRoot}/vipDay`);
const vipDay1028 = require(`${cRoot}/vipDay10`);
const market = require(`${cRoot}/market`);
const coin = require(`${cRoot}/coin`);
const shopCollect = require(`${cRoot}/shopCollect`);
... ... @@ -91,6 +92,7 @@ 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);
router.get('/coin/sendCoin', coin.sendCoin);
router.get('/shopCollect', shopCollect.shopIndex);// 店铺收藏
router.get('/shopList', shopCollect.shopList);// 店铺收藏列表
... ... @@ -98,4 +100,15 @@ router.get('/shopNav', shopCollect.shopNav);// 店铺收藏导航
router.get('/shopfavStatus', shopCollect.shopFav);// 店铺收藏状态
router.get('/share', share.getShareContent);
// 102828会员日
router.get('/vip-day1028', vipDay1028.index);
router.get('/vip-day1028/crazy-wheel', vipDay1028.beforeIn, vipDay1028.crazyWheel);
router.post('/vip-day1028/crazy-wheel/award.json', vipDay1028.beforeIn, vipDay1028.wheelResult);
router.post('/vip-day1028/crazy-luck/award.json', vipDay1028.beforeIn, vipDay1028.luckResult);
router.get('/vip-day1028/crazy-luck/award-list.json', vipDay1028.beforeIn, vipDay1028.luckResultCollect);
router.get('/vip-day1028/crazy-luck', vipDay1028.beforeIn, vipDay1028.crazyLuck);
router.post('/vip-day1028/signin.json', vipDay1028.beforeIn, vipDay1028.signin);
router.post('/vip-day1028/isStudent', vipDay1028.beforeIn, vipDay1028.checkIsStudent);
module.exports = router;
... ...
<div class="vipday-game game-luck">
{{> vip_day/game-header message="花20有货币就能获一次抽奖机会哦!"}}
{{> vip_day/game-main}}
{{> vip-day/game-header message="花20有货币就能获一次抽奖机会哦!"}}
{{> vip-day/game-main}}
<div class="info">
<div class="info-item my-icon">
<div class="my-icon-label">
... ...
<div class="vipday-game game-wheel">
{{> vip_day/game-header message="您有1次抽奖机会"}}
{{> vip_day/game-main}}
{{> 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>人参与抽奖
... ...
... ... @@ -30,13 +30,13 @@
<ul class="clearfix">
<li class="item item-1 pull-left" id="js-qiandao">
<!--<a href="http://m.yohobuy.com/home/mycurrency?openby:yohobuy={'action':'go.h5','params':{'islogin':'Y','url':'http://m.yohobuy.com/home/mycurrency'}}">-->
<img class="play-icon-flag play-coin-left" src="{{imgSrc 'img/activity/vip_day/play-coin-1.png'}}" alt="签到福利">
<img class="play-icon-flag play-coin-left" src="{{imgSrc 'img/activity/vip-day/play-coin-1.png'}}" alt="签到福利">
<!--</a>-->
</li>
<li class="play-coin-div"></li>
<li class="item item-2 pull-right" id="js-game-luck">
<a href='http://m.yohobuy.com/activity/vip-day/crazy-luck{{#if isApp}}?openby:yohobuy={"action":"go.h5","params":{"islogin":"Y","url":"http://m.yohobuy.com/activity/vip-day/crazy-luck"}}{{/if}}'>
<img class="play-icon-flag play-coin-right" src="{{imgSrc 'img/activity/vip_day/play-coin-2.png'}}" alt="拼手气">
<img class="play-icon-flag play-coin-right" src="{{imgSrc 'img/activity/vip-day/play-coin-2.png'}}" alt="拼手气">
</a>
</li>
</ul>
... ... @@ -65,21 +65,21 @@
<h5 class="vip-goods-sec-label">明星潮牌</h5>
<ul class="vip-goods-list clearfix">
{{#each goods1}}
{{> vip_day/vip-good}}
{{> 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}}
{{> 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}}
{{> vip-day/vip-good}}
{{/each}}
</ul>
<div class="text-center">
... ... @@ -100,7 +100,7 @@
<textarea class="vip-msg-content"></textarea>
<button class="vip-msg-send" type="button">写好啦!</button>
</div>
<img class="txt" src="{{imgSrc 'img/activity/vip_day/leava-msg.png'}}" alt="">
<img class="txt" src="{{imgSrc 'img/activity/vip-day/leava-msg.png'}}" alt="">
</div>
<div class="vip-day-msg-input"></div>
</div>
... ... @@ -115,13 +115,13 @@
<footer class="vip-day-footer">
{{#unless isApp}} <a href="http://www.yohoshow.com/about/index/yohobuyqr/" class="app-download"></a> {{/unless}}
</footer>
{{> vip_day/footer-nav }}
{{> 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'}}">
<img class="qcode" src="{{imgSrc 'img/activity/vip-day/qcode.jpg'}}">
<p class="chit-qcode-tip">扫码关注有货微信或搜索“yohobuy”关注订阅号</p>
</div>
</div>
... ... @@ -129,12 +129,12 @@
<div class="ymodal" id="qiandao-modal">
<div class="vh-center ymodal-dialog" data-dismiss="ymodal">
<img src="{{imgSrc 'img/activity/vip_day/qiandao.png'}}">
<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 权益">
<img src="{{imgSrc 'img/activity/vip-day/privilege.png'}}" alt="VIP 权益">
</div>
</div>
\ No newline at end of file
... ...
<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/game10-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>仅限学生用户参与抽奖,一个用户有一次抽奖机会;</li>
</ul>
</div>
</div>
</div>
<script>
var joinNum = {{joinNum}};
</script>
... ...
{{! header }}
<header class="vip-day10-header"></header>
{{! 每月28日}}
<div class="vip-day10-slogan"></div>
{{! 玩转有货币 }}
<section class="vip-day10-coin" id="play-coin">
<a href='/home/mycurrency{{#if isApp}}?openby:yohobuy={"action":"go.signin"}{{/if}}' class="checkin"></a>
</section>
{{! vip翻倍升级}}
<a href="javascript:;" data-toggle="ymodal" data-target="#vip-privilege" id="vip-double">
<section class="vip-day10-double"></section>
</a>
{{! 会员商品}}
<section class="vip-day10-goods" id="vip-goods">
<header class="title"></header>
<div class="vip-day10-goodsbg">
<div class="goods-title first-title"></div>
<ul class="goods-main clearfix">
{{#each goods1}}
{{> vip-day/vip-good1028}}
{{/each}}
</ul>
</div>
<div class="vip-day10-goodsbg">
<div class="goods-title second-title"></div>
<ul class="goods-main clearfix">
{{#each goods2}}
{{> vip-day/vip-good1028}}
{{/each}}
</ul>
</div>
<div class="vip-day10-goodsbg">
<div class="goods-title third-title"></div>
<ul class="goods-main clearfix last-vip">
{{#each goods3}}
{{> vip-day/vip-good1028}}
{{/each}}
</ul>
</div>
<a class="view-more" href="//m.yohobuy.com/product/sale/vip?channel=boys&openby:yohobuy={%22action%22:%22go.vippro%22}"></a>
</section>
{{! 学生专享}}
<section class="vip-day10-student" id="vip-student">
{{#if isStudent}}
<a href="" class="in-button in-button-bg2"></a>
{{else}}
<a href="" class="in-button in-button-bg1"></a>
{{/if}}
<a href="//m.yohobuy.com/activity/student" class="student-more"></a>
</section>
{{! 邀请好友}}
<section class="vip-day10-invite" id="vip-invite">
<a href="" class="invite-button"></a>
</section>
{{! 下载app}}
<section class="vip-day10-download">
<a href="http://www.yohoshow.com/about/index/yohobuyqr/" class="download-button"></a>
</section>
{{! 底部悬浮}}
<section class="vip-day10-menu">
<a href="#play-coin" class="id-a"></a>
<a href="#vip-double" class="id-a"></a>
<a href="#vip-goods" class="id-a"></a>
<a href="#vip-student" class="id-a"></a>
<a href="#vip-invite" class="id-a"></a>
</section>
<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 权益" id="aaasss">
</div>
</div>
\ No newline at end of file
... ...
<div class="game">
<div class="game10-stage" id="js-stage">
<div class="game-item game-award is-active" data-index="1"></div>
<div class="game-item game-award" data-index="2"></div>
<div class="game-item game-award" data-index="3"></div>
<div class="game-item game-award" data-index="8"></div>
<div class="game-item game-boot"></div>
<div class="game-item game-award" data-index="4"></div>
<div class="game-item game-award" data-index="7"></div>
<div class="game-item game-award" data-index="6"></div>
<div class="game-item game-award" data-index="5"></div>
</div>
</div>
\ No newline at end of file
... ...
<li class="vip10-good" skn={{product_skn}}>
<a href="{{url}}">
<img class="vip10-good-show" src="{{image default_images 215 192}}" alt="">
<h6 class="vip10-good-name line-clamp-1">{{product_name}}</h6>
<div class="vip10-good-price">
{{#if market_price}}
<sup class="sale-price">&yen;</sup><span class="sale-price">{{sales_price}}</span><span class="disable-price">&yen;{{market_price}}</span><span class="buy-icon">BUY</span>
{{else}}
<sup class="sale-price">&yen;</sup><span class="sale-price">{{sales_price}}</span><span class="buy-icon">BUY</span>
{{/if}}
</div>
</a>
</li>
\ No newline at end of file
... ...
/* eslint-disable vars-on-top */
/**
* @author acgpiano
*/
'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 $student, $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();
this.tracking();
share({
title: 'YOHO!BUY有货【会员日】潮集狂欢,5重福利为你而造,10月28号震撼开启,仅此一天!',
link: location.href,
desc: '每月28日,尽情释放>>',
imgUrl: 'http://img13.static.yhbimg.com/taobaocms/2016/10/21/11/029f89b08937654fe69a90b00da0053bbb.png'
});
},
domInit: function() {
document.title = '会员日活动';
$punch = $('#js-qiandao');
$punchModal = $('#qiandao-modal');
$student = $('#vip-student');
$invite = $('.invite-button');
},
bindEvents: function() {
$punch.on('click', $.proxy(this.punchFuli, this));
$invite.on('click', function(e) {
e.preventDefault();
$.yAlert({
content: '请至APP“我的”页面,点击“邀请好友赢福利”参与活动',
okText: '关闭'
});
});
$student.on('click', '.in-button-bg1', function(e) {
var url;
e.preventDefault();
if (yoho.isApp) {
url = '/activity/vip-day1028/isStudent?app_version=1&uid=' + (yoho.getUid() || 0);
} else {
url = '/activity/vip-day1028/isStudent';
}
$.post(url).done(function(result) {
if (result.code === 401) {
if (yoho.isApp && !yoho.getUid()) {
appJump('m.yohobuy.com/signin.html', {
action: 'go.weblogin',
params: {
url: 'http://m.yohobuy.com/signin.html',
jumpurl: {
url: 'http://m.yohobuy.com/activity/vip-day1028'
}
}
});
} else if (!yoho.isApp && !yoho.getUid()) {
window.location = '/signin.html?refer=' + location.href;
}
} else {
$.yAlert({
content: '请至APP“我的”页面,右上角点击“学生认证”进行认证',
okText: '关闭'
});
}
});
});
$student.on('click', '.in-button-bg2', function(e) {
e.preventDefault();
if (yoho.isApp) {
return appJump('/activity/vip-day1028/crazy-wheel', {
action: 'go.h5',
params: {
url: 'http://m.yohobuy.com/activity/vip-day1028/crazy-wheel',
islogin: 'Y'
}
});
}
window.location = '/activity/vip-day1028/crazy-wheel';
});
},
// 签到福利
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-day1028'
}
}
});
return false;
}
$.post('/activity/vip-day1028/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('签到失败 >_<');
});
},
// 获取频道页
getChannel: function() {
var name = window.cookie('_Channel');
return {
boys: 1,
girls: 2,
kids: 3,
lifestyle: 4
}[name] || window.queryString.yh_channel || 1;
},
// 埋点
tracking: function() {
var C_ID = this.getChannel(),
UDID = window.queryString.udid || '',
SID = window.queryString.session_id || '';
// 签到埋点
$('#play-coin').on('click', function() {
if (window._yas && window._yas.sendCustomInfo) {
window._yas.sendCustomInfo({
op: 'YB_MEM_DAY_SIGN_C',
param: JSON.stringify({
C_ID: C_ID,
}),
}, true);
}
});
// 会员日商品
$('#vip-goods').on('click', '.vip10-good', function() {
var skn = $(this).attr('skn');
if (window._yas && window._yas.sendCustomInfo) {
window._yas.sendCustomInfo({
op: 'YB_MEM_DAY_GDS_LIST_C',
param: JSON.stringify({
C_ID: C_ID,
UDID: UDID,
SID: SID,
PRD_SKN: skn,
}),
}, true);
}
});
// 立即认证点击
$('.in-button-bg1').on('click', function() {
if (window._yas && window._yas.sendCustomInfo) {
window._yas.sendCustomInfo({
op: 'YB_MEM_DAY_AUTH_C',
param: JSON.stringify({
C_ID: C_ID,
UDID: UDID,
SID: SID,
}),
}, true);
}
});
// 立即抽奖点击
$('.in-button-bg2').on('click', function() {
if (window._yas && window._yas.sendCustomInfo) {
window._yas.sendCustomInfo({
op: 'YB_MEM_DAY_DRAW_C',
param: JSON.stringify({
C_ID: C_ID,
UDID: UDID,
SID: SID,
}),
}, true);
}
});
// 邀请好友
$('.invite-button').on('click', function() {
if (window._yas && window._yas.sendCustomInfo) {
window._yas.sendCustomInfo({
op: 'YB_MEM_DAY_INVITE_C',
param: JSON.stringify({
C_ID: C_ID,
UDID: UDID,
SID: SID,
}),
}, true);
}
});
// 下载app
$('.download-button').on('click', function() {
if (window._yas && window._yas.sendCustomInfo) {
window._yas.sendCustomInfo({
op: 'YB_MEM_DAY_DOWNLOAD_C',
param: JSON.stringify({
C_ID: C_ID,
UDID: UDID,
SID: SID,
}),
}, true);
}
});
// view more
$('.view-more').on('click', function() {
if (window._yas && window._yas.sendCustomInfo) {
window._yas.sendCustomInfo({
op: 'YB_MEM_DAY_VIEW_MORE_C',
param: JSON.stringify({
C_ID: C_ID,
UDID: UDID,
SID: SID,
}),
}, true);
}
});
}
};
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.$ = $;
// 获取频道页
var getChannel = function() {
var name = window.cookie('_Channel');
return {
boys: 1,
girls: 2,
kids: 3,
lifestyle: 4
}[name] || window.queryString.yh_channel || 1;
};
// 抽奖埋点
var tracking = function() {
var C_ID = getChannel(),
UDID = window.queryString.udid || '',
SID = window.queryString.session_id || '';
setTimeout(function() {
if (window._yas && window._yas.sendCustomInfo) {
window._yas.sendCustomInfo({
op: 'YB_DRAW_L',
param: JSON.stringify({
C_ID: C_ID,
UDID: UDID,
SID: SID,
}),
}, true);
}
}, 3000);
// 点击立即抽奖
$('.game-boot').on('click', function() {
if (window._yas && window._yas.sendCustomInfo) {
window._yas.sendCustomInfo({
op: 'YB_DRAW_C',
param: JSON.stringify({
C_ID: C_ID,
UDID: UDID,
SID: SID,
}),
}, true);
}
});
};
$(function() {
var $gameNotify = $('#js-game-notify');
var $playerNum = $('#js-join-num');
var game = new Game('#js-stage', {
url: '/activity/vip-day1028/crazy-wheel/award.json?app_version=1&uid=' + yoho.getUid(),
awards: [999, 2, 4, 999, 1, 6, 3, 5]
});
$('#yoho-tip').css({
padding: '18px 20px',
});
if (localStorage.vip1028wheel === yoho.getUid()) {
$gameNotify.text('您的机会已用完,请下月28号再来');
}
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) {
localStorage.vip1028wheel = yoho.getUid();
var text = [],
i,
list = {
1: '100',
2: '200',
3: '500',
4: '10元</span>现金券',
5: '满299减40</span>优惠券',
6: '满499减70</span>优惠券',
};
for (i = 1; i < 7; i++) {
if (i < 4) {
text[i] = list[i] + '</span>有货币,请到【我的-有货币】中查收奖品</p>';
} else {
text[i] = list[i] + ',请到【我的-优惠券】中查收奖品</p>';
}
}
upPlayers(1);
$.yAlert({
class: 'vipday-game-alert',
content: '<p class="primary">恭喜你获得<span class="award">' + text[score],
});
$gameNotify.text('您的机会已用完,请下月28号再来');
};
tracking();
});
... ...
var search = require('./sale/search');
// 获取频道页
var getChannel = function() {
var name = window.cookie('_Channel');
return {
boys: 1,
girls: 2,
kids: 3,
lifestyle: 4
}[name] || 1;
};
search.start();
$('.goods-container').on('click', '.good-info', function() {
var C_ID = getChannel(),
UDID = window.queryString.udid || '',
SID = window.queryString.session_id || '',
skn = $(this).attr('data-id');
if (window._yas && window._yas.sendCustomInfo) {
window._yas.sendCustomInfo({
op: 'YB_MEM_DAY_GDS_LIST_C',
param: JSON.stringify({
C_ID: C_ID,
UDID: UDID,
SID: SID,
PRD_SKN: skn,
}),
}, true);
}
});
\ No newline at end of file
... ...
... ... @@ -123,7 +123,7 @@ yoho = {
return qs.uid;
}
return window.gitUid();
return window.getUid();
},
goLogin: function(refer, data) {
... ...
@import "live/index";
@import "vip_day/index";
@import "vip-day/index";
@import "vip-day10/index";
@import "student";
@import "market/index";
@import "shop-collect/shop-collect";
... ...
... ... @@ -3,7 +3,7 @@
}
.vip-day-header {
background: resolve("activity/vip_day/activity.jpg");
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);*/
... ... @@ -12,7 +12,7 @@
.vip-day-footer {
position: relative;
height: 466px;
background: resolve("activity/vip_day/foot-app.png");
background: resolve("activity/vip-day/foot-app.png");
background-size: 100% 100%;
margin-bottom: 116px;
... ... @@ -27,7 +27,7 @@
.vip-day-slogan {
height: 107px;
background: no-repeat center center resolve("activity/vip_day/slogan.png");
background: no-repeat center center resolve("activity/vip-day/slogan.png");
background-size: 322px 107px;
}
... ... @@ -89,9 +89,9 @@
background-size: 100% 100%;
}
.chit10 { background-image: resolve("activity/vip_day/chit10.png"); }
.chit30 { background-image: resolve("activity/vip_day/chit30.png"); }
.chit60 { background-image: resolve("activity/vip_day/chit60.png"); }
.chit10 { background-image: resolve("activity/vip-day/chit10.png"); }
.chit30 { background-image: resolve("activity/vip-day/chit30.png"); }
.chit60 { background-image: resolve("activity/vip-day/chit60.png"); }
}
.qiangjuan-foucs {
... ... @@ -114,7 +114,7 @@
top: -60px;
width: 140px;
height: 90px;
background: no-repeat center center url("/activity/vip_day/chit-more.png");
background: no-repeat center center url("/activity/vip-day/chit-more.png");
}
ul {
... ... @@ -126,7 +126,7 @@
.title-pic {
width: 243px;
height: 109px;
background-image: url("/activity/vip_day/play-coin-txt.png");
background-image: url("/activity/vip-day/play-coin-txt.png");
}
.item {
... ... @@ -162,12 +162,12 @@
.title-pic {
width: 223px;
height: 103px;
background-image: url('/activity/vip_day/vip-boot.png');
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: no-repeat center center resolve('activity/vip-day/vip-boot-pic.jpg');
background-size: 100% 100%;
}
... ... @@ -188,7 +188,7 @@
margin-left: -38px;
width: 76px;
height: 107px;
background: no-repeat center center url('/activity/vip_day/point.png');
background: no-repeat center center url('/activity/vip-day/point.png');
}
/* 福利 会员日专享商品 */
... ... @@ -196,7 +196,7 @@
.title-pic {
width: 330px;
height: 126px;
background-image: url("/activity/vip_day/vip-day-goods.png");
background-image: url("/activity/vip-day/vip-day-goods.png");
}
}
... ... @@ -322,7 +322,7 @@
margin-bottom: 56px;
color: transparent;
height: 327px;
background-image: resolve('activity/vip_day/invite.jpg');
background-image: resolve('activity/vip-day/invite.jpg');
background-size: 100% 100%;
}
}
... ... @@ -332,7 +332,7 @@
.title-pic {
width: 329px;
height: 135px;
background-image: url("/activity/vip_day/happy-fuli.png");
background-image: url("/activity/vip-day/happy-fuli.png");
}
}
... ... @@ -474,23 +474,23 @@
background-size: 100% 100%;
}
.bg-chit {
background-image: resolve("activity/vip_day/get-chit.png");
background-image: resolve("activity/vip-day/get-chit.png");
}
.bg-coin {
background-image: resolve("activity/vip_day/play-coin.png");
background-image: resolve("activity/vip-day/play-coin.png");
}
.bg-level {
background-image: resolve("activity/vip_day/double-level.png");
background-image: resolve("activity/vip-day/double-level.png");
}
.bg-goods {
background-image: resolve("activity/vip_day/private-goods.png");
background-image: resolve("activity/vip-day/private-goods.png");
}
.bg-fuli {
background-image: resolve("activity/vip_day/double-fuli.png");
background-image: resolve("activity/vip-day/double-fuli.png");
}
}
}
... ...
... ... @@ -63,11 +63,11 @@ $border-radius: 8px;
}
&.game-luck .header-banner {
background: url("/activity/vip_day/chit.png");
background: url("/activity/vip-day/chit.png");
}
&.game-wheel .header-banner {
background: url("/activity/vip_day/coin.png");
background: url("/activity/vip-day/coin.png");
}
.game-notify {
... ... @@ -86,7 +86,7 @@ $border-radius: 8px;
.game {
position: relative;
height: 536px;
background: resolve("activity/vip_day/stage@2x.png");
background: resolve("activity/vip-day/stage@2x.png");
background-size: 750px 536px;
}
... ... @@ -113,15 +113,15 @@ $border-radius: 8px;
}
.game-award.is-active {
background: url("/activity/vip_day/cursor.png");
background: url("/activity/vip-day/cursor.png");
}
&.game-luck .game-stage {
background-image: resolve("activity/vip_day/luck-stage.png");
background-image: resolve("activity/vip-day/luck-stage.png");
}
&.game-wheel .game-stage {
background-image: resolve("activity/vip_day/chit-stage.png");
background-image: resolve("activity/vip-day/chit-stage.png");
}
/* ---------------------------------------------------- *\
... ... @@ -134,7 +134,7 @@ $border-radius: 8px;
height: 25px;
margin-right: 5px;
vertical-align: middle;
background: url("/activity/vip_day/coin-lite@2x.png");
background: url("/activity/vip-day/coin-lite@2x.png");
}
.info {
... ... @@ -193,7 +193,7 @@ $border-radius: 8px;
height: 297px;
padding: 27px 40px 13px;
margin: -13px auto 0;
background: white resolve("activity/vip_day/sprite1.png") repeat-x left bottom;
background: white resolve("activity/vip-day/sprite1.png") repeat-x left bottom;
background-size: 13px;
&:before {
... ...
.vip-day10.entry {
background: resolve("activity/vip-day/vip-day1028/bg.jpg");
background-size: 100% 100%;
}
.vip-day10-header {
background: resolve("activity/vip-day/vip-day1028/head.gif");
background-size: 100% 100%;
height: 486px;
/*box-shadow: inset -6px -6px 7px rgba(15, 5, 10, 0.32);*/
}
.vip-day10-slogan {
height: 66px;
background: no-repeat center center resolve("activity/vip-day/vip-day1028/slogan.png");
background-size: 640px 66px;
}
.vip-day10-coin {
position: relative;
height: 338px;
width: 592px;
background: resolve("activity/vip-day/vip-day1028/coin.png");
background-size: 100% 100%;
margin: 58px auto 0;
.checkin {
position: absolute;
left: 154px;
bottom: 46px;
height: 60px;
width: 285px;
}
}
.vip-day10-double {
height: 387px;
width: 592px;
background: resolve("activity/vip-day/vip-day1028/vip-double.png");
background-size: 100% 100%;
margin: 58px auto 0;
}
.vip-day10-goods {
position: relative;
width: 592px;
border: 1px solid #3d3325;
margin: 85px auto 0;
.title {
height: 58px;
width: 315px;
margin: -23px auto 0;
background: resolve("activity/vip-day/vip-day1028/vip-goods-title.png");
background-size: 100% 100%;
}
}
.vip-day10-goodsbg {
width: 546px;
margin: 0 auto;
background: #9b7a4f;
.goods-title {
height: 58px;
margin: 40px auto 0;
&.first-title {
margin-top: 20px;
background: resolve("activity/vip-day/vip-day1028/first-title.png");
background-size: 100% 100%;
}
&.second-title {
background: resolve("activity/vip-day/vip-day1028/second-title.png");
background-size: 100% 100%;
}
&.third-title {
background: resolve("activity/vip-day/vip-day1028/third-title.png");
background-size: 100% 100%;
}
}
.goods-main {
margin: 0 -23px 20px;
}
.vip10-good {
height: 271px;
width: 192px;
background: #fff;
float: left;
margin-bottom: 20px;
&:nth-child(3n + 2){
margin: 0 7px;
}
}
.vip10-good-show {
height: 215px;
width: 192px;
}
.vip10-good-name {
padding: 0 12px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-size: 20px;
line-height: 1.2;
}
.vip10-good-price {
padding: 0 12px;
vertical-align: top;
line-height: 1.2;
.sale-price {
display: inline-block;
font-size: 20px;
font-weight: bold;
&:nth-child(2) {
padding-right: 10px;
}
}
.disable-price {
display: inline-block;
font-size: 16px;
font-weight: bold;
color: #b6b6b6;
text-decoration: line-through;
}
.buy-icon {
display: inline-block;
float: right;
padding: 2px 6px;
margin-top: 2px;
font-size: 16px;
background: #d60000;
color: #fff;
}
}
}
.last-vip .vip10-good {
margin-bottom: -15px;
}
.view-more {
display: block;
height: 75px;
width: 546px;
margin: -15px auto 25px;
background: resolve("activity/vip-day/vip-day1028/view-more.png");
background-size: 100% 100%;
}
.vip-day10-student {
position: relative;
height: 487px;
width: 590px;
margin: 60px auto 0;
background: resolve("activity/vip-day/vip-day1028/student.png");
background-size: 100% 100%;
.in-button {
position: absolute;
bottom: 120px;
left: 175px;
height: 62px;
width: 244px;
}
.in-button-bg1 {
background: resolve("activity/vip-day/vip-day1028/in-button1.png");
background-size: 100% 100%;
}
.in-button-bg2 {
background: resolve("activity/vip-day/vip-day1028/in-button2.png");
background-size: 100% 100%;
}
.student-more {
position: absolute;
bottom: 20px;
left: 20px;
height: 62px;
width: 545px;
}
}
.vip-day10-invite {
position: relative;
height: 355px;
width: 592px;
margin: 60px auto 0;
background: resolve("activity/vip-day/vip-day1028/invite-friend.png");
background-size: 100% 100%;
.invite-button {
position: absolute;
bottom: 64px;
right: 58px;
height: 60px;
width: 290px;
}
}
.vip-day10-download {
position: relative;
height: 435px;
width: 640px;
margin: -20px auto 97px;
background: resolve("activity/vip-day/vip-day1028/download-app.png");
background-size: 100% 100%;
z-index: 2;
.download-button {
position: absolute;
bottom: 172px;
right: 38px;
height: 46px;
width: 144px;
}
}
.vip-day10-menu {
position: fixed;
bottom: 0;
height: 97px;
width: 640px;
margin: -20px auto 0;
background: resolve("activity/vip-day/vip-day1028/menu.png");
background-size: 100% 100%;
z-index: 99;
.id-a {
display: block;
width: 128px;
height: 97px;
float: left;
}
}
#vip-privilege {
.ymodal-dialog {
height: 100%;
width: auto;
margin: 0;
}
img {
width: 421px;
}
}
\ No newline at end of file
... ...
$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;
}
.game10-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 .game10-stage {
background-image: resolve("activity/vip-day/luck-stage.png");
}
&.game-wheel .game10-stage {
background-image: resolve("activity/vip-day/vip-day1028/chit-stage.jpg");
}
/* ---------------------------------------------------- *\
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
... ...