From 34a4f660ca01a215daca4d6fc8201c322a19b549 Mon Sep 17 00:00:00 2001 From: lijing <356055691@qq.com> Date: Thu, 29 Dec 2016 15:56:02 +0800 Subject: [PATCH] 增加局部css,删除多余图片,修改ajax的url --- apps/activity/controllers/raffle.js | 7 +++++-- public/img/activity/raffle/big-bg.png | Bin 58563 -> 0 bytes public/img/activity/raffle/kind.png | Bin 3944 -> 0 bytes public/img/activity/raffle/logo.png | Bin 12609 -> 0 bytes public/img/activity/raffle/title.png | Bin 38142 -> 0 bytes public/js/activity/raffle.page.js | 8 +++++--- public/scss/activity/_index.css | 1 - public/scss/activity/raffle/_index.css | 1 - public/scss/activity/raffle/_style.css | 218 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- public/scss/activity/raffle/promotion.page.css | 220 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 10 files changed, 230 insertions(+), 225 deletions(-) delete mode 100644 public/img/activity/raffle/big-bg.png delete mode 100644 public/img/activity/raffle/kind.png delete mode 100644 public/img/activity/raffle/logo.png delete mode 100644 public/img/activity/raffle/title.png delete mode 100644 public/scss/activity/raffle/_index.css delete mode 100644 public/scss/activity/raffle/_style.css create mode 100644 public/scss/activity/raffle/promotion.page.css diff --git a/apps/activity/controllers/raffle.js b/apps/activity/controllers/raffle.js index 2f1d68f..bd959d5 100644 --- a/apps/activity/controllers/raffle.js +++ b/apps/activity/controllers/raffle.js @@ -16,7 +16,8 @@ exports.activity = (req, res, next) => { }).then((result) => { res.render('raffle/activity', Object.assign(result, { title: 'Yoho!Buy 有货', - width750: true + width750: true, + localCss: true })); }).catch(next); }; @@ -45,7 +46,8 @@ exports.order = (req, res, next) => { }), title: 'Yoho!Buy 有货', pageFooter: true, - order: result + order: result, + localCss: true }); }).catch(next); }; @@ -81,6 +83,7 @@ exports.enter = (req, res) => { res.render('raffle/enter', { module: 'activity', page: 'raffle', + localCss: true, uid: req.user.uid }); } diff --git a/public/img/activity/raffle/big-bg.png b/public/img/activity/raffle/big-bg.png deleted file mode 100644 index c43d274..0000000 Binary files a/public/img/activity/raffle/big-bg.png and /dev/null differ diff --git a/public/img/activity/raffle/kind.png b/public/img/activity/raffle/kind.png deleted file mode 100644 index a354840..0000000 Binary files a/public/img/activity/raffle/kind.png and /dev/null differ diff --git a/public/img/activity/raffle/logo.png b/public/img/activity/raffle/logo.png deleted file mode 100644 index a9b4a3c..0000000 Binary files a/public/img/activity/raffle/logo.png and /dev/null differ diff --git a/public/img/activity/raffle/title.png b/public/img/activity/raffle/title.png deleted file mode 100644 index 32f12a2..0000000 Binary files a/public/img/activity/raffle/title.png and /dev/null differ diff --git a/public/js/activity/raffle.page.js b/public/js/activity/raffle.page.js index 0f40802..9dc45c9 100644 --- a/public/js/activity/raffle.page.js +++ b/public/js/activity/raffle.page.js @@ -41,6 +41,8 @@ var orderContent = require('activity/raffle/order-content.hbs'); require('../common'); +require('activity/raffle/promotion.page.css'); + // 减少计时 function downCount(item) { var hoursItem = item.find('.hours'); @@ -122,7 +124,7 @@ function getOrders(option) { $.ajax({ type: 'GET', - url: 'getOrders', + url: '/activity/raffle/getOrders', data: opt, success: function(data) { var num; @@ -204,7 +206,7 @@ orderHammer.on('tap', function(e) { orderCode = $cur.closest('.raffle-btn').attr('data-code'); $.ajax({ type: 'POST', - url: 'lucky', + url: '/activity/raffle/lucky', data: { lotteryId: 1001, userId: userId, @@ -337,7 +339,7 @@ $(function() { userId = $('.dia-tip').val(); $.ajax({ type: 'GET', - url: 'bind', + url: '/activity/raffle/bind', data: { userId: userId }, diff --git a/public/scss/activity/_index.css b/public/scss/activity/_index.css index 6a6d9d8..3b04fa6 100644 --- a/public/scss/activity/_index.css +++ b/public/scss/activity/_index.css @@ -3,7 +3,6 @@ @import "vip-day10/index"; @import "student"; @import "market/index"; -@import "raffle/index"; @import "shop-collect/shop-collect"; @import "single-day"; @import "ali-cloud"; diff --git a/public/scss/activity/raffle/_index.css b/public/scss/activity/raffle/_index.css deleted file mode 100644 index 1c19cd8..0000000 --- a/public/scss/activity/raffle/_index.css +++ /dev/null @@ -1 +0,0 @@ -@import "style"; diff --git a/public/scss/activity/raffle/_style.css b/public/scss/activity/raffle/_style.css deleted file mode 100644 index 8629787..0000000 --- a/public/scss/activity/raffle/_style.css +++ /dev/null @@ -1,218 +0,0 @@ -.wx-act-c { - width: 100%; - overflow: hidden; - position: relative; - background-size: 100%; - background-repeat: no-repeat; - - .logo { - width: 263px; - height: 53px; - background-size: 100%; - display: block; - margin: 25px auto 0; - } - - .title { - width: 621px; - height: 352px; - background-size: 100%; - display: block; - margin: 25px auto 0; - padding-top: 150px; - - p { - text-align: center; - font-size: 20px; - color: #fff; - line-height: 40px; - padding: 0 30px; - max-height: 160px; - overflow: hidden; - } - } - - .kind { - width: 288px; - height: 58px; - background-size: 100%; - display: block; - margin: 15px auto 0; - } - - .kind-list { - padding-top: 15px; - - li { - font-size: 22px; - color: #fff; - text-align: center; - line-height: 40px; - } - } - - .btn { - display: block; - width: 472px; - height: 88px; - background: resolve("activity/raffle/btn.png") no-repeat center center; - background-size: 100%; - margin: 40px auto 0; - } - - .account { - line-height: 90px; - color: #fff; - font-size: 24px; - text-align: center; - - a { - font-size: 18px; - border: solid 1px #fff; - color: #fff; - padding: 1px 10px; - border-radius: 46px; - margin-left: 15px; - } - } - - .rule-c { - width: 690px; - height: 278px; - background: resolve("activity/raffle/s-bg.png") repeat; - margin: 15px auto 30px; - border-radius: 15px; - - .rule-title { - line-height: 80px; - font-size: 26px; - color: #fff; - text-align: center; - } - - .rule-list-c { - height: 198px; - overflow-y: scroll; - padding: 0 30px; - - li { - color: #fff; - font-size: 22px; - line-height: 40px; - } - } - } -} - -.order-page { - .order { - .header { - border-bottom: 1px solid #e0e0e0; - - .raffle-btn { - width: 140px; - height: 60px; - line-height: 60px; - background-color: #e01; - color: #fff; - font-size: 24px; - position: absolute; - right: 30px; - top: 15px; - border-radius: 8px; - text-align: center; - } - - .disable-btn { - width: 140px; - height: 60px; - line-height: 60px; - background-color: #e0e0e0; - color: #454545; - font-size: 24px; - position: absolute; - right: 30px; - top: 15px; - border-radius: 8px; - text-align: center; - } - } - } - - .dia-c { - display: none; - width: 100%; - height: 100%; - position: fixed; - top: 0; - bottom: 0; - right: 0; - left: 0; - z-index: 1; - - .dia-bg { - width: 100%; - height: 100%; - top: 0; - bottom: 0; - right: 0; - left: 0; - background-color: #000; - opacity: 0.7; - } - - .dia-main { - width: 540px; - position: absolute; - top: 50%; - left: 50%; - margin-left: -270px; - - .lucky { - width: 540px; - height: 421px; - background: resolve("activity/raffle/dia-succ.png"); - background-size: 100%; - } - - .unlucky { - width: 540px; - height: 421px; - background: resolve("activity/raffle/dia-err.png"); - background-size: 100%; - } - - p { - width: 540px; - height: 128px; - position: absolute; - bottom: 83px; - left: 0; - font-size: 20px; - color: #444; - padding: 30px; - line-height: 30px; - } - - a { - width: 214px; - height: 53px; - display: block; - position: absolute; - left: 162px; - bottom: 30px; - } - } - - .close { - width: 40px; - height: 40px; - background-repeat: no-repeat; - background-image: resolve("activity/raffle/close.png"); - position: absolute; - top: -20px; - right: -20px; - background-size: 100%; - } - } -} diff --git a/public/scss/activity/raffle/promotion.page.css b/public/scss/activity/raffle/promotion.page.css new file mode 100644 index 0000000..aa1d4d5 --- /dev/null +++ b/public/scss/activity/raffle/promotion.page.css @@ -0,0 +1,220 @@ + @import "../../home/_order.css"; + +.wx-act-c { + width: 100%; + overflow: hidden; + position: relative; + background-size: 100%; + background-repeat: no-repeat; + + .logo { + width: 263px; + height: 53px; + background-size: 100%; + display: block; + margin: 25px auto 0; + } + + .title { + width: 621px; + height: 352px; + background-size: 100%; + display: block; + margin: 25px auto 0; + padding-top: 150px; + + p { + text-align: center; + font-size: 20px; + color: #fff; + line-height: 40px; + padding: 0 30px; + max-height: 160px; + overflow: hidden; + } + } + + .kind { + width: 288px; + height: 58px; + background-size: 100%; + display: block; + margin: 15px auto 0; + } + + .kind-list { + padding-top: 15px; + + li { + font-size: 22px; + color: #fff; + text-align: center; + line-height: 40px; + } + } + + .btn { + display: block; + width: 472px; + height: 88px; + background: resolve("activity/raffle/btn.png") no-repeat center center; + background-size: 100%; + margin: 40px auto 0; + } + + .account { + line-height: 90px; + color: #fff; + font-size: 24px; + text-align: center; + + a { + font-size: 18px; + border: solid 1px #fff; + color: #fff; + padding: 1px 10px; + border-radius: 46px; + margin-left: 15px; + } + } + + .rule-c { + width: 690px; + height: 278px; + background: resolve("activity/raffle/s-bg.png") repeat; + margin: 15px auto 30px; + border-radius: 15px; + + .rule-title { + line-height: 80px; + font-size: 26px; + color: #fff; + text-align: center; + } + + .rule-list-c { + height: 198px; + overflow-y: scroll; + padding: 0 30px; + + li { + color: #fff; + font-size: 22px; + line-height: 40px; + } + } + } +} + +.order-page { + .order { + .header { + border-bottom: 1px solid #e0e0e0; + + .raffle-btn { + width: 140px; + height: 60px; + line-height: 60px; + background-color: #e01; + color: #fff; + font-size: 24px; + position: absolute; + right: 30px; + top: 15px; + border-radius: 8px; + text-align: center; + } + + .disable-btn { + width: 140px; + height: 60px; + line-height: 60px; + background-color: #e0e0e0; + color: #454545; + font-size: 24px; + position: absolute; + right: 30px; + top: 15px; + border-radius: 8px; + text-align: center; + } + } + } + + .dia-c { + display: none; + width: 100%; + height: 100%; + position: fixed; + top: 0; + bottom: 0; + right: 0; + left: 0; + z-index: 1; + + .dia-bg { + width: 100%; + height: 100%; + top: 0; + bottom: 0; + right: 0; + left: 0; + background-color: #000; + opacity: 0.7; + } + + .dia-main { + width: 540px; + position: absolute; + top: 50%; + left: 50%; + margin-left: -270px; + + .lucky { + width: 540px; + height: 421px; + background: resolve("activity/raffle/dia-succ.png"); + background-size: 100%; + } + + .unlucky { + width: 540px; + height: 421px; + background: resolve("activity/raffle/dia-err.png"); + background-size: 100%; + } + + p { + width: 540px; + height: 128px; + position: absolute; + bottom: 83px; + left: 0; + font-size: 20px; + color: #444; + padding: 30px; + line-height: 30px; + } + + a { + width: 214px; + height: 53px; + display: block; + position: absolute; + left: 162px; + bottom: 30px; + } + } + + .close { + width: 40px; + height: 40px; + background-repeat: no-repeat; + background-image: resolve("activity/raffle/close.png"); + position: absolute; + top: -20px; + right: -20px; + background-size: 100%; + } + } +} -- libgit2 0.24.0