Merge branch 'feature/singleDayAm' into 'master'
Feature/single day am See merge request !482
Showing
5 changed files
with
37 additions
and
30 deletions
@@ -13,8 +13,13 @@ const _ = require('lodash'); | @@ -13,8 +13,13 @@ const _ = require('lodash'); | ||
13 | const resourcesProcess = require(`${utils}/resources-process`); | 13 | const resourcesProcess = require(`${utils}/resources-process`); |
14 | 14 | ||
15 | const getResourceData = (contCode) => { | 15 | const getResourceData = (contCode) => { |
16 | + | ||
17 | + if (_.isEmpty(contCode)) { | ||
18 | + return Promise.resolve([]); | ||
19 | + } | ||
20 | + | ||
16 | return serviceAPI.get('operations/api/v5/resource/get', { | 21 | return serviceAPI.get('operations/api/v5/resource/get', { |
17 | - content_code: contCode || 'c0acf0296a3c329678fb45da958d9951', | 22 | + content_code: contCode, |
18 | platform: 'iphone' | 23 | platform: 'iphone' |
19 | }, { | 24 | }, { |
20 | cache: true | 25 | cache: true |
@@ -16,6 +16,13 @@ const domains = { | @@ -16,6 +16,13 @@ const domains = { | ||
16 | api: 'http://api.yoho.cn/', | 16 | api: 'http://api.yoho.cn/', |
17 | service: 'http://service.yoho.cn/', | 17 | service: 'http://service.yoho.cn/', |
18 | 18 | ||
19 | + | ||
20 | + // api: 'http://api-test3.yohops.com:9999/', | ||
21 | + // service: 'http://service-test3.yohops.com:9999/', | ||
22 | + // liveApi: 'http://testapi.live.yohops.com:9999/', | ||
23 | + // singleApi: 'http://api-test3.yohops.com:9999/', | ||
24 | + | ||
25 | + | ||
19 | // liveApi: 'http://api.live.yoho.cn/', | 26 | // liveApi: 'http://api.live.yoho.cn/', |
20 | // singleApi: 'http://single.yoho.cn/', | 27 | // singleApi: 'http://single.yoho.cn/', |
21 | 28 |
@@ -9,9 +9,6 @@ | @@ -9,9 +9,6 @@ | ||
9 | {{/salesPhrase}} | 9 | {{/salesPhrase}} |
10 | <p class="price"> | 10 | <p class="price"> |
11 | <span class="sale-price {{^marketPrice}}no-price{{/marketPrice}}">¥{{salesPrice}}</span> | 11 | <span class="sale-price {{^marketPrice}}no-price{{/marketPrice}}">¥{{salesPrice}}</span> |
12 | - {{#marketPrice}} | ||
13 | - <span class="market-price">¥{{.}}</span> | ||
14 | - {{/marketPrice}} | ||
15 | </p> | 12 | </p> |
16 | <p class="info-txt">{{productDesc}}</p> | 13 | <p class="info-txt">{{productDesc}}</p> |
17 | </div> | 14 | </div> |
@@ -57,16 +57,6 @@ let singleDay = { | @@ -57,16 +57,6 @@ let singleDay = { | ||
57 | self.previousScrollTop = curScrollTop; | 57 | self.previousScrollTop = curScrollTop; |
58 | }; | 58 | }; |
59 | 59 | ||
60 | - $(window).on('scroll touchmove touchstart touchend', function() { | ||
61 | - if ($(window).scrollTop() > self.swiperOTop) { | ||
62 | - self.$swiper.addClass('fixer'); | ||
63 | - } else { | ||
64 | - self.$swiper.removeClass('fixer'); | ||
65 | - } | ||
66 | - | ||
67 | - window.requestAnimationFrame(_scrollHandler.bind(self)); | ||
68 | - }); | ||
69 | - | ||
70 | $.ajax({ | 60 | $.ajax({ |
71 | type: 'GET', | 61 | type: 'GET', |
72 | url: '/activity/single-day/getSingleData', | 62 | url: '/activity/single-day/getSingleData', |
@@ -78,7 +68,7 @@ let singleDay = { | @@ -78,7 +68,7 @@ let singleDay = { | ||
78 | let i = 0, $swiperTab; | 68 | let i = 0, $swiperTab; |
79 | let tabNum = window.queryString.tabNum ? window.queryString.tabNum - 1 : 0; | 69 | let tabNum = window.queryString.tabNum ? window.queryString.tabNum - 1 : 0; |
80 | 70 | ||
81 | - if (data[0]) { | 71 | + if (data[0] && data[0].length !== 0) { |
82 | $('.banner').append(banner(data[0][0])); | 72 | $('.banner').append(banner(data[0][0])); |
83 | 73 | ||
84 | if ($('.banner-swiper').find('li').size() > 1) { | 74 | if ($('.banner-swiper').find('li').size() > 1) { |
@@ -145,6 +135,16 @@ let singleDay = { | @@ -145,6 +135,16 @@ let singleDay = { | ||
145 | }); | 135 | }); |
146 | } | 136 | } |
147 | 137 | ||
138 | + $(window).on('scroll touchmove touchstart touchend', function() { | ||
139 | + if ($(window).scrollTop() > $('.tab-area').offset().top) { | ||
140 | + self.$swiper.addClass('fixer'); | ||
141 | + } else { | ||
142 | + self.$swiper.removeClass('fixer'); | ||
143 | + } | ||
144 | + | ||
145 | + window.requestAnimationFrame(_scrollHandler.bind(self)); | ||
146 | + }); | ||
147 | + | ||
148 | loading.hideLoadingMask(); | 148 | loading.hideLoadingMask(); |
149 | }, | 149 | }, |
150 | error: function() { | 150 | error: function() { |
@@ -3,7 +3,6 @@ | @@ -3,7 +3,6 @@ | ||
3 | 3 | ||
4 | .banner { | 4 | .banner { |
5 | width: 100%; | 5 | width: 100%; |
6 | - height: 234px; | ||
7 | 6 | ||
8 | .swiper-slide { | 7 | .swiper-slide { |
9 | height: 234px; | 8 | height: 234px; |
@@ -26,10 +25,9 @@ | @@ -26,10 +25,9 @@ | ||
26 | 25 | ||
27 | .swiper-tab { | 26 | .swiper-tab { |
28 | width: 100%; | 27 | width: 100%; |
29 | - height: 80px; | ||
30 | - //border-bottom: 1px solid #e0e0e0; | ||
31 | - //border-top: 1px solid #e0e0e0; | ||
32 | - //background: #fff; | 28 | + border-bottom: 1px solid #e0e0e0; |
29 | + border-top: 1px solid #e0e0e0; | ||
30 | + background: #fff; | ||
33 | 31 | ||
34 | li { | 32 | li { |
35 | float: left; | 33 | float: left; |
@@ -111,7 +109,7 @@ | @@ -111,7 +109,7 @@ | ||
111 | } | 109 | } |
112 | 110 | ||
113 | h3 { | 111 | h3 { |
114 | - margin-top: 50px; | 112 | + margin-top: 20px; |
115 | font-size: 28px; | 113 | font-size: 28px; |
116 | display: -webkit-box; | 114 | display: -webkit-box; |
117 | -webkit-box-orient: vertical; | 115 | -webkit-box-orient: vertical; |
@@ -121,9 +119,9 @@ | @@ -121,9 +119,9 @@ | ||
121 | } | 119 | } |
122 | 120 | ||
123 | .prompt-info { | 121 | .prompt-info { |
124 | - font-size: 22px; | ||
125 | - margin-top: 29px; | ||
126 | - color: #d11226; | 122 | + font-size: 24px; |
123 | + margin-top: 25px; | ||
124 | + color: #d0021b; | ||
127 | width: 100%; | 125 | width: 100%; |
128 | overflow: hidden; | 126 | overflow: hidden; |
129 | white-space: nowrap; | 127 | white-space: nowrap; |
@@ -131,12 +129,12 @@ | @@ -131,12 +129,12 @@ | ||
131 | } | 129 | } |
132 | 130 | ||
133 | .price { | 131 | .price { |
134 | - margin-top: 29px; | 132 | + margin-top: 36px; |
135 | } | 133 | } |
136 | 134 | ||
137 | .sale-price { | 135 | .sale-price { |
138 | font-size: 34px; | 136 | font-size: 34px; |
139 | - color: #cf031e; | 137 | + color: #d62927; |
140 | } | 138 | } |
141 | 139 | ||
142 | .no-price { | 140 | .no-price { |
@@ -152,13 +150,13 @@ | @@ -152,13 +150,13 @@ | ||
152 | 150 | ||
153 | .info-txt { | 151 | .info-txt { |
154 | position: absolute; | 152 | position: absolute; |
155 | - bottom: 62px; | ||
156 | - font-size: 26px; | 153 | + bottom: 45px; |
154 | + font-size: 24px; | ||
157 | display: -webkit-box; | 155 | display: -webkit-box; |
158 | -webkit-box-orient: vertical; | 156 | -webkit-box-orient: vertical; |
159 | - -webkit-line-clamp: 2; | 157 | + -webkit-line-clamp: 4; |
160 | overflow: hidden; | 158 | overflow: hidden; |
161 | - color: #454545; | 159 | + color: #b0b0b0; |
162 | } | 160 | } |
163 | } | 161 | } |
164 | } | 162 | } |
-
Please register or login to post a comment