Merge branch 'master' into grey
Showing
9 changed files
with
126 additions
and
109 deletions
@@ -14,6 +14,11 @@ const index = (req, res, next) => { | @@ -14,6 +14,11 @@ const index = (req, res, next) => { | ||
14 | let uid = +req.query.uid || +req.user.uid; | 14 | let uid = +req.query.uid || +req.user.uid; |
15 | let curUrl = 'http://m.yohobuy.com/activity/annual-account'; | 15 | let curUrl = 'http://m.yohobuy.com/activity/annual-account'; |
16 | 16 | ||
17 | + if (!uid) { | ||
18 | + res.redirect('/signin.html?refer=http://m.yohobuy.com/activity/annual-account'); | ||
19 | + return; | ||
20 | + } | ||
21 | + | ||
17 | annualAccountModel.getAccountData({ | 22 | annualAccountModel.getAccountData({ |
18 | uid: uid, | 23 | uid: uid, |
19 | year: '2016' | 24 | year: '2016' |
@@ -98,7 +103,7 @@ const share = (req, res) => { | @@ -98,7 +103,7 @@ const share = (req, res) => { | ||
98 | title: title, | 103 | title: title, |
99 | localCss: true, | 104 | localCss: true, |
100 | data: Object.assign({ | 105 | data: Object.assign({ |
101 | - sUrl: req.originalUrl | 106 | + sUrl: 'http://m.yohobuy.com' + req.originalUrl |
102 | }, q) | 107 | }, q) |
103 | }); | 108 | }); |
104 | }; | 109 | }; |
@@ -8,13 +8,13 @@ | @@ -8,13 +8,13 @@ | ||
8 | 8 | ||
9 | const router = require('express').Router(); // eslint-disable-line | 9 | const router = require('express').Router(); // eslint-disable-line |
10 | const cRoot = './controllers'; | 10 | const cRoot = './controllers'; |
11 | -const auth = require('../../doraemon/middleware/auth'); | ||
12 | const demo = require(`${cRoot}/demo`); | 11 | const demo = require(`${cRoot}/demo`); |
13 | const coupon = require(`${cRoot}/coupon`); | 12 | const coupon = require(`${cRoot}/coupon`); |
14 | const wechat = require(`${cRoot}/wechat`); | 13 | const wechat = require(`${cRoot}/wechat`); |
15 | const student = require(`${cRoot}/student`); | 14 | const student = require(`${cRoot}/student`); |
16 | const live = require(`${cRoot}/live`); | 15 | const live = require(`${cRoot}/live`); |
17 | const invite = require(`${cRoot}/invite`); | 16 | const invite = require(`${cRoot}/invite`); |
17 | +const auth = require('../../doraemon/middleware/auth'); | ||
18 | 18 | ||
19 | const couponFloor = require(`${cRoot}/coupon-floor`); | 19 | const couponFloor = require(`${cRoot}/coupon-floor`); |
20 | const vipDay = require(`${cRoot}/vipDay`); | 20 | const vipDay = require(`${cRoot}/vipDay`); |
@@ -162,7 +162,7 @@ router.get('/redbag/2017', redbag.index); | @@ -162,7 +162,7 @@ router.get('/redbag/2017', redbag.index); | ||
162 | router.get('/individuation', individuation.productLst); | 162 | router.get('/individuation', individuation.productLst); |
163 | 163 | ||
164 | // 2016 年度账单 | 164 | // 2016 年度账单 |
165 | -router.get('/annual-account', auth, annualAccount.index); | 165 | +router.get('/annual-account', annualAccount.index); |
166 | router.get('/annual-account/share', annualAccount.share); | 166 | router.get('/annual-account/share', annualAccount.share); |
167 | router.get('/app-downloads', appDownloads.index); | 167 | router.get('/app-downloads', appDownloads.index); |
168 | 168 |
1 | {{#data}} | 1 | {{#data}} |
2 | <div class="annual-account-page ch" data-login="{{loginUrl}}" data-is-app="{{isApp}}"> | 2 | <div class="annual-account-page ch" data-login="{{loginUrl}}" data-is-app="{{isApp}}"> |
3 | - <div class="annual-bg ch"></div> | 3 | + |
4 | <input type="hidden" value="{{sUrl}}" id="s-url"> | 4 | <input type="hidden" value="{{sUrl}}" id="s-url"> |
5 | <div class="audio-btn"></div> | 5 | <div class="audio-btn"></div> |
6 | <audio preload="auto" loop="loop" id="audio"> | 6 | <audio preload="auto" loop="loop" id="audio"> |
@@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
3 | <input type="hidden" value="{{sUrl}}" id="s-url"> | 3 | <input type="hidden" value="{{sUrl}}" id="s-url"> |
4 | <div class="account-bg3"> | 4 | <div class="account-bg3"> |
5 | <div class="share-txt"> | 5 | <div class="share-txt"> |
6 | - <span class="name">{{name}}</span><br>的潮流分为<span class="red-color">{{score}}</span><br>击败了<span class="red-color">{{beat}}%</span>的潮人<br>获得 | 6 | + <span class="name">{{name}}</span>的潮流分为<span class="red-color">{{score}}</span><br>击败了<span class="red-color">{{beat}}%</span>的潮人<br>获得 |
7 | </div> | 7 | </div> |
8 | <div class="portrait-{{n}}"></div> | 8 | <div class="portrait-{{n}}"></div> |
9 | <div class="share-txt">称号</div> | 9 | <div class="share-txt">称号</div> |
@@ -54,6 +54,9 @@ function listenVideo() { | @@ -54,6 +54,9 @@ function listenVideo() { | ||
54 | } | 54 | } |
55 | }); | 55 | }); |
56 | } | 56 | } |
57 | +$('body').css({ | ||
58 | + height: $(window).height() | ||
59 | +}); | ||
57 | 60 | ||
58 | $(function() { | 61 | $(function() { |
59 | var $purdah1 = $('.purdah1'), | 62 | var $purdah1 = $('.purdah1'), |
@@ -72,8 +75,9 @@ $(function() { | @@ -72,8 +75,9 @@ $(function() { | ||
72 | 75 | ||
73 | $commonH.css({height: $(window).height()}); | 76 | $commonH.css({height: $(window).height()}); |
74 | 77 | ||
75 | - audioAction(); | ||
76 | - listenVideo(); | 78 | + setTimeout(function() { |
79 | + $('.top-downloadbar').css({zIndex: 9}); | ||
80 | + }, 400); | ||
77 | 81 | ||
78 | share({ | 82 | share({ |
79 | imgUrl: 'https://feature.yoho.cn/300x300.png', | 83 | imgUrl: 'https://feature.yoho.cn/300x300.png', |
@@ -82,103 +86,108 @@ $(function() { | @@ -82,103 +86,108 @@ $(function() { | ||
82 | desc: 'YOHO!BUY有货2016潮流轨迹' | 86 | desc: 'YOHO!BUY有货2016潮流轨迹' |
83 | }); | 87 | }); |
84 | 88 | ||
85 | - mySwiper = new Swiper('.swiper-container', { | ||
86 | - direction: 'vertical', | ||
87 | - onTransitionEnd: function(swiper) { | ||
88 | - var aIndex = swiper.activeIndex; | ||
89 | - var i = 1; | ||
90 | - | ||
91 | - if (aIndex === 1) { | ||
92 | - setTimeout(function() { | ||
93 | - $nav2Img.addClass('n2-img-animation'); | ||
94 | - $purdah1.addClass('purdah1-animation'); | ||
95 | - }, 300); | ||
96 | - } | 89 | + if ($('.account-share-page').length === 0) { |
90 | + audioAction(); | ||
91 | + listenVideo(); | ||
92 | + | ||
93 | + mySwiper = new Swiper('.swiper-container', { | ||
94 | + direction: 'vertical', | ||
95 | + onTransitionEnd: function(swiper) { | ||
96 | + var aIndex = swiper.activeIndex; | ||
97 | + var i = 1; | ||
98 | + | ||
99 | + if (aIndex === 1) { | ||
100 | + setTimeout(function() { | ||
101 | + $nav2Img.addClass('n2-img-animation'); | ||
102 | + $purdah1.addClass('purdah1-animation'); | ||
103 | + }, 300); | ||
104 | + } | ||
97 | 105 | ||
98 | - if (aIndex === 2) { | ||
99 | - $purdahLeft.addClass('purdah-l-animation'); | ||
100 | - $purdahRight.addClass('purdah-r-animation'); | ||
101 | - if ($monthList.find('li').length === 0) { | ||
102 | - for (i; i <= 32; i++) { | ||
103 | - if (i === 7) { | ||
104 | - $monthList.find('ul').append('<li class="goods-' + i + '"><div class="goods-gif-' + i + '"></div></li>'); | ||
105 | - } else { | ||
106 | - $monthList.find('ul').append('<li class="goods-' + i + '"></li>'); | 106 | + if (aIndex === 2) { |
107 | + $purdahLeft.addClass('purdah-l-animation'); | ||
108 | + $purdahRight.addClass('purdah-r-animation'); | ||
109 | + if ($monthList.find('li').length === 0) { | ||
110 | + for (i; i <= 32; i++) { | ||
111 | + if (i === 7) { | ||
112 | + $monthList.find('ul').append('<li class="goods-' + i + '"><div class="goods-gif-' + i + '"></div></li>'); | ||
113 | + } else { | ||
114 | + $monthList.find('ul').append('<li class="goods-' + i + '"></li>'); | ||
115 | + } | ||
107 | } | 116 | } |
108 | } | 117 | } |
118 | + $monthList.fadeIn(); | ||
109 | } | 119 | } |
110 | - $monthList.fadeIn(); | ||
111 | - } | ||
112 | 120 | ||
113 | - if (aIndex === 3) { | ||
114 | - $runMen.fadeIn(); | ||
115 | - } | 121 | + if (aIndex === 3) { |
122 | + $runMen.fadeIn(); | ||
123 | + } | ||
116 | 124 | ||
117 | - if (aIndex !== 4) { | ||
118 | - $video[0].pause(); | ||
119 | - if (audioStatus) { | ||
120 | - $audio[0].play(); | 125 | + if (aIndex !== 4) { |
126 | + $video[0].pause(); | ||
127 | + if (audioStatus) { | ||
128 | + $audio[0].play(); | ||
129 | + } | ||
121 | } | 130 | } |
122 | - } | ||
123 | 131 | ||
124 | - if (aIndex === 4) { | ||
125 | - $videoBox.addClass('video-animation'); | ||
126 | - setTimeout(function() { | ||
127 | - $('#video').show(); | ||
128 | - }, 600); | ||
129 | - } | 132 | + if (aIndex === 4) { |
133 | + $videoBox.addClass('video-animation'); | ||
134 | + setTimeout(function() { | ||
135 | + $('#video').show(); | ||
136 | + }, 600); | ||
137 | + } | ||
130 | 138 | ||
131 | - if (aIndex === 5) { | ||
132 | - $spokesman.addClass('spokesman-animation'); | ||
133 | - tbTime = setTimeout(function() { | ||
134 | - $tB.addClass('txt-animation'); | ||
135 | - }, 500); | ||
136 | - handTime = setTimeout(function() { | ||
137 | - $hand.addClass('hand-animation'); | ||
138 | - }, 1000); | ||
139 | - twTime = setTimeout(function() { | ||
140 | - $tW.addClass('txt-animation'); | ||
141 | - }, 1500); | ||
142 | - } | ||
143 | - }, | ||
144 | - onSlideChangeStart: function(swiper) { | ||
145 | - var aIndex = swiper.activeIndex; | ||
146 | - | ||
147 | - if (aIndex === 1 || aIndex === 3) { | ||
148 | - $purdahLeft.removeClass('purdah-l-animation'); | ||
149 | - $purdahRight.removeClass('purdah-r-animation'); | ||
150 | - $monthList.fadeOut(); | ||
151 | - $monthList.find('ul').scrollLeft(0); | ||
152 | - } | 139 | + if (aIndex === 5) { |
140 | + $spokesman.addClass('spokesman-animation'); | ||
141 | + tbTime = setTimeout(function() { | ||
142 | + $tB.addClass('txt-animation'); | ||
143 | + }, 500); | ||
144 | + handTime = setTimeout(function() { | ||
145 | + $hand.addClass('hand-animation'); | ||
146 | + }, 1000); | ||
147 | + twTime = setTimeout(function() { | ||
148 | + $tW.addClass('txt-animation'); | ||
149 | + }, 1500); | ||
150 | + } | ||
151 | + }, | ||
152 | + onSlideChangeStart: function(swiper) { | ||
153 | + var aIndex = swiper.activeIndex; | ||
154 | + | ||
155 | + if (aIndex === 1 || aIndex === 3) { | ||
156 | + $purdahLeft.removeClass('purdah-l-animation'); | ||
157 | + $purdahRight.removeClass('purdah-r-animation'); | ||
158 | + $monthList.fadeOut(); | ||
159 | + $monthList.find('ul').scrollLeft(0); | ||
160 | + } | ||
153 | 161 | ||
154 | - if (aIndex === 0 || aIndex === 2) { | ||
155 | - $nav2Img.removeClass('n2-img-animation'); | ||
156 | - $purdah1.removeClass('purdah1-animation'); | ||
157 | - } | 162 | + if (aIndex === 0 || aIndex === 2) { |
163 | + $nav2Img.removeClass('n2-img-animation'); | ||
164 | + $purdah1.removeClass('purdah1-animation'); | ||
165 | + } | ||
158 | 166 | ||
159 | - if (aIndex === 2 || aIndex === 4) { | ||
160 | - $runMen.hide(); | ||
161 | - } | 167 | + if (aIndex === 2 || aIndex === 4) { |
168 | + $runMen.hide(); | ||
169 | + } | ||
162 | 170 | ||
163 | - if (aIndex === 3 || aIndex === 5) { | ||
164 | - $videoBox.removeClass('video-animation'); | ||
165 | - $('#video').hide(); | ||
166 | - } | 171 | + if (aIndex === 3 || aIndex === 5) { |
172 | + $videoBox.removeClass('video-animation'); | ||
173 | + $('#video').hide(); | ||
174 | + } | ||
167 | 175 | ||
168 | - if (aIndex === 4 || aIndex === 6) { | ||
169 | - clearTimeout(tbTime); | ||
170 | - clearTimeout(twTime); | ||
171 | - clearTimeout(handTime); | ||
172 | - $spokesman.removeClass('spokesman-animation'); | ||
173 | - $tB.removeClass('txt-animation'); | ||
174 | - $hand.removeClass('hand-animation'); | ||
175 | - $tW.removeClass('txt-animation'); | 176 | + if (aIndex === 4 || aIndex === 6) { |
177 | + clearTimeout(tbTime); | ||
178 | + clearTimeout(twTime); | ||
179 | + clearTimeout(handTime); | ||
180 | + $spokesman.removeClass('spokesman-animation'); | ||
181 | + $tB.removeClass('txt-animation'); | ||
182 | + $hand.removeClass('hand-animation'); | ||
183 | + $tW.removeClass('txt-animation'); | ||
184 | + } | ||
176 | } | 185 | } |
177 | - } | ||
178 | - }); | 186 | + }); |
179 | 187 | ||
180 | - // 开启2016潮流轨迹按钮 | ||
181 | - $('.start-btn').on('click', function() { | ||
182 | - mySwiper.slideTo(1, 1000, true); | ||
183 | - }); | 188 | + // 开启2016潮流轨迹按钮 |
189 | + $('.start-btn').on('click', function() { | ||
190 | + mySwiper.slideTo(1, 1000, true); | ||
191 | + }); | ||
192 | + } | ||
184 | }); | 193 | }); |
1 | .annual-account-page { | 1 | .annual-account-page { |
2 | width: 640px; | 2 | width: 640px; |
3 | overflow: hidden; | 3 | overflow: hidden; |
4 | + background-image: resolve("activity/annual-account/bg.gif"); | ||
5 | + background-size: cover; | ||
6 | + position: fixed; | ||
7 | + left: 0; | ||
8 | + top: 0; | ||
9 | + z-index: 1; | ||
4 | 10 | ||
5 | .audio-btn { | 11 | .audio-btn { |
6 | width: 49px; | 12 | width: 49px; |
@@ -10,7 +16,7 @@ | @@ -10,7 +16,7 @@ | ||
10 | position: fixed; | 16 | position: fixed; |
11 | top: 30px; | 17 | top: 30px; |
12 | right: 30px; | 18 | right: 30px; |
13 | - z-index: 99; | 19 | + z-index: 8; |
14 | } | 20 | } |
15 | 21 | ||
16 | .audio-f { | 22 | .audio-f { |
@@ -18,16 +24,6 @@ | @@ -18,16 +24,6 @@ | ||
18 | background-size: contain; | 24 | background-size: contain; |
19 | } | 25 | } |
20 | 26 | ||
21 | - .annual-bg { | ||
22 | - width: 100%; | ||
23 | - background-image: resolve("activity/annual-account/bg.gif"); | ||
24 | - background-size: cover; | ||
25 | - position: fixed; | ||
26 | - left: 0; | ||
27 | - top: 0; | ||
28 | - z-index: -1; | ||
29 | - } | ||
30 | - | ||
31 | .nav-1 { | 27 | .nav-1 { |
32 | width: 100%; | 28 | width: 100%; |
33 | background: resolve("activity/annual-account/account-bg.png") no-repeat; | 29 | background: resolve("activity/annual-account/account-bg.png") no-repeat; |
@@ -595,9 +591,8 @@ | @@ -595,9 +591,8 @@ | ||
595 | } | 591 | } |
596 | 592 | ||
597 | .account-2-consume { | 593 | .account-2-consume { |
598 | - position: absolute; | ||
599 | - left: 70px; | ||
600 | - top: 100px; | 594 | + max-width: 550px; |
595 | + margin: 100px auto 0; | ||
601 | 596 | ||
602 | .chop-hand { | 597 | .chop-hand { |
603 | width: 349px; | 598 | width: 349px; |
@@ -711,12 +706,20 @@ | @@ -711,12 +706,20 @@ | ||
711 | line-height: 60px; | 706 | line-height: 60px; |
712 | font-weight: bold; | 707 | font-weight: bold; |
713 | text-align: center; | 708 | text-align: center; |
709 | + margin: 0 auto; | ||
710 | + max-width: 85%; | ||
714 | } | 711 | } |
715 | 712 | ||
716 | .name { | 713 | .name { |
717 | font-size: 50px; | 714 | font-size: 50px; |
718 | margin-top: 50px; | 715 | margin-top: 50px; |
719 | display: inline-block; | 716 | display: inline-block; |
717 | + max-height: 120px; | ||
718 | + overflow: hidden; | ||
719 | + text-overflow: ellipsis; | ||
720 | + display: -webkit-box; | ||
721 | + -webkit-line-clamp: 2; | ||
722 | + -webkit-box-orient: vertical; | ||
720 | } | 723 | } |
721 | 724 | ||
722 | .create-btn { | 725 | .create-btn { |
@@ -39,8 +39,8 @@ | @@ -39,8 +39,8 @@ | ||
39 | height: 50px; | 39 | height: 50px; |
40 | line-height: 50px; | 40 | line-height: 50px; |
41 | width: 130px; | 41 | width: 130px; |
42 | - padding-left: 20px; | ||
43 | - padding-right: 20px; | 42 | + padding-left: 2px; |
43 | + padding-right: 2px; | ||
44 | border-radius: 8px; | 44 | border-radius: 8px; |
45 | white-space: nowrap; | 45 | white-space: nowrap; |
46 | text-overflow: ellipsis; | 46 | text-overflow: ellipsis; |
-
Please register or login to post a comment