Merge branch 'hotfix/agelevel' into 'master'
Hotfix/agelevel See merge request !1180
Showing
5 changed files
with
15 additions
and
7 deletions
1 | let tip = require('plugin/tip'), | 1 | let tip = require('plugin/tip'), |
2 | - moment = require('moment'), | ||
3 | Swiper = require('yoho-swiper'); | 2 | Swiper = require('yoho-swiper'); |
4 | 3 | ||
5 | // IScroll = require('yoho-iscroll'); | 4 | // IScroll = require('yoho-iscroll'); |
@@ -225,8 +224,13 @@ function removeByValue(arr, val) { | @@ -225,8 +224,13 @@ function removeByValue(arr, val) { | ||
225 | } | 224 | } |
226 | } | 225 | } |
227 | 226 | ||
228 | -function _formatDay(day) { | ||
229 | - return moment(day).format('MM月DD日 HH:mm'); | 227 | +function _formatDay(date) { |
228 | + let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1); | ||
229 | + let D = date.getDate() < 10 ? '0' + date.getDate() : date.getDate(); | ||
230 | + let h = date.getHours() < 10 ? '0' + date.getHours() : date.getHours(); | ||
231 | + let m = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes(); | ||
232 | + | ||
233 | + return `${M}月${D}日 ${h}:${m}`; | ||
230 | } | 234 | } |
231 | 235 | ||
232 | function pullPicBig(cIndex) { | 236 | function pullPicBig(cIndex) { |
@@ -16,7 +16,7 @@ let $listNav = $('#list-nav'); // 筛选项列表 | @@ -16,7 +16,7 @@ let $listNav = $('#list-nav'); // 筛选项列表 | ||
16 | */ | 16 | */ |
17 | let productListWithFilter = new ProductListWithFilter({ | 17 | let productListWithFilter = new ProductListWithFilter({ |
18 | shop_id: shopId | 18 | shop_id: shopId |
19 | -}); | 19 | +}, 'product/search/shop/goods'); |
20 | 20 | ||
21 | productListWithFilter.scrollActived = false; | 21 | productListWithFilter.scrollActived = false; |
22 | 22 |
@@ -75,7 +75,7 @@ $.each($goodsContainer, function(index, elem) { | @@ -75,7 +75,7 @@ $.each($goodsContainer, function(index, elem) { | ||
75 | 75 | ||
76 | switch (parseInt($(elem).data('type'), 10)) { | 76 | switch (parseInt($(elem).data('type'), 10)) { |
77 | case 0: | 77 | case 0: |
78 | - url = '/product/search/search'; | 78 | + url = '/product/search/shop/goods'; |
79 | Object.assign(data, { | 79 | Object.assign(data, { |
80 | shop_id: shopId, | 80 | shop_id: shopId, |
81 | order: $(elem).data('order') | 81 | order: $(elem).data('order') |
@@ -111,7 +111,7 @@ $.each($goodsContainer, function(index, elem) { | @@ -111,7 +111,7 @@ $.each($goodsContainer, function(index, elem) { | ||
111 | */ | 111 | */ |
112 | $.ajax({ | 112 | $.ajax({ |
113 | type: 'GET', | 113 | type: 'GET', |
114 | - url: '/product/search/search', | 114 | + url: '/product/search/shop/goods', |
115 | xhrFields: { | 115 | xhrFields: { |
116 | withCredentials: true | 116 | withCredentials: true |
117 | }, | 117 | }, |
@@ -213,6 +213,10 @@ | @@ -213,6 +213,10 @@ | ||
213 | padding: 0 25px; | 213 | padding: 0 25px; |
214 | background-color: #fff; | 214 | background-color: #fff; |
215 | 215 | ||
216 | + .swiper-wrapper { | ||
217 | + display: block !important; | ||
218 | + } | ||
219 | + | ||
216 | .swiper-slide { | 220 | .swiper-slide { |
217 | border-radius: 10px; | 221 | border-radius: 10px; |
218 | overflow: hidden; | 222 | overflow: hidden; |
-
Please register or login to post a comment