Showing
20 changed files
with
86 additions
and
17 deletions
1 | <div class="about-us"> | 1 | <div class="about-us"> |
2 | <div id="header"> | 2 | <div id="header"> |
3 | + {{#unless isYohoBuy}} | ||
3 | <div class="blk-header-wrap" class="is-fixed"> | 4 | <div class="blk-header-wrap" class="is-fixed"> |
4 | <div class="blk-header"> | 5 | <div class="blk-header"> |
5 | <div class="blk-header-left"> | 6 | <div class="blk-header-left"> |
@@ -13,6 +14,7 @@ | @@ -13,6 +14,7 @@ | ||
13 | </div> | 14 | </div> |
14 | <div class="blk-header-gap"></div> | 15 | <div class="blk-header-gap"></div> |
15 | </div> | 16 | </div> |
17 | + {{/unless}} | ||
16 | </div> | 18 | </div> |
17 | <div class="icon-container"> | 19 | <div class="icon-container"> |
18 | <span class="blk-start-icon"></span> | 20 | <span class="blk-start-icon"></span> |
1 | <div class="yoho-suggest-sub-page yoho-page"> | 1 | <div class="yoho-suggest-sub-page yoho-page"> |
2 | <div id="header"> | 2 | <div id="header"> |
3 | + {{#unless isYohoBuy}} | ||
3 | <div class="blk-header-wrap" class="is-fixed"> | 4 | <div class="blk-header-wrap" class="is-fixed"> |
4 | <div class="blk-header"> | 5 | <div class="blk-header"> |
5 | <div class="blk-header-left"> | 6 | <div class="blk-header-left"> |
@@ -13,6 +14,7 @@ | @@ -13,6 +14,7 @@ | ||
13 | </div> | 14 | </div> |
14 | <div class="blk-header-gap"></div> | 15 | <div class="blk-header-gap"></div> |
15 | </div> | 16 | </div> |
17 | + {{/unless}} | ||
16 | </div> | 18 | </div> |
17 | <div class="suggest-sub-form"> | 19 | <div class="suggest-sub-form"> |
18 | <textarea name="" id="suggest-textarea" placeholder="请写下对于BLK的意见和建议,我们将及时根据您的意见作出改进"></textarea> | 20 | <textarea name="" id="suggest-textarea" placeholder="请写下对于BLK的意见和建议,我们将及时根据您的意见作出改进"></textarea> |
1 | <div class="help"> | 1 | <div class="help"> |
2 | <div id="header"> | 2 | <div id="header"> |
3 | + {{#unless isYohoBuy}} | ||
3 | <div class="blk-header-wrap" class="is-fixed"> | 4 | <div class="blk-header-wrap" class="is-fixed"> |
4 | <div class="blk-header"> | 5 | <div class="blk-header"> |
5 | <div class="blk-header-left"> | 6 | <div class="blk-header-left"> |
@@ -13,6 +14,7 @@ | @@ -13,6 +14,7 @@ | ||
13 | </div> | 14 | </div> |
14 | <div class="blk-header-gap"></div> | 15 | <div class="blk-header-gap"></div> |
15 | </div> | 16 | </div> |
17 | + {{/unless}} | ||
16 | </div> | 18 | </div> |
17 | <ul> | 19 | <ul> |
18 | {{# helpList}} | 20 | {{# helpList}} |
1 | <div id="header"> | 1 | <div id="header"> |
2 | + {{#unless isYohoBuy}} | ||
2 | <div class="blk-header-wrap" class="is-fixed"> | 3 | <div class="blk-header-wrap" class="is-fixed"> |
3 | <div class="blk-header"> | 4 | <div class="blk-header"> |
4 | <div class="blk-header-left"> | 5 | <div class="blk-header-left"> |
@@ -12,6 +13,7 @@ | @@ -12,6 +13,7 @@ | ||
12 | </div> | 13 | </div> |
13 | <div class="blk-header-gap"></div> | 14 | <div class="blk-header-gap"></div> |
14 | </div> | 15 | </div> |
16 | + {{/unless}} | ||
15 | </div> | 17 | </div> |
16 | {{#if helpDetail_1}} | 18 | {{#if helpDetail_1}} |
17 | {{> helpDetail_1}} | 19 | {{> helpDetail_1}} |
1 | <div class="vip-privilege-page yoho-page"> | 1 | <div class="vip-privilege-page yoho-page"> |
2 | + {{#unless isYohoBuy}} | ||
2 | <div class="blk-header-wrap"> | 3 | <div class="blk-header-wrap"> |
3 | <div class="blk-header"> | 4 | <div class="blk-header"> |
4 | <div class="blk-header-left"> | 5 | <div class="blk-header-left"> |
@@ -8,6 +9,7 @@ | @@ -8,6 +9,7 @@ | ||
8 | <span class="blk-header-title">VIP特权</span> | 9 | <span class="blk-header-title">VIP特权</span> |
9 | </div> | 10 | </div> |
10 | </div> | 11 | </div> |
12 | + {{/unless}} | ||
11 | <ul class="privilege-list"> | 13 | <ul class="privilege-list"> |
12 | {{#each privilege}} | 14 | {{#each privilege}} |
13 | <li> | 15 | <li> |
1 | <div class="provisions"> | 1 | <div class="provisions"> |
2 | <div id="header"> | 2 | <div id="header"> |
3 | + {{#unless isYohoBuy}} | ||
3 | <div class="blk-header-wrap" class="is-fixed"> | 4 | <div class="blk-header-wrap" class="is-fixed"> |
4 | <div class="blk-header"> | 5 | <div class="blk-header"> |
5 | <div class="blk-header-left"> | 6 | <div class="blk-header-left"> |
@@ -13,6 +14,7 @@ | @@ -13,6 +14,7 @@ | ||
13 | </div> | 14 | </div> |
14 | <div class="blk-header-gap"></div> | 15 | <div class="blk-header-gap"></div> |
15 | </div> | 16 | </div> |
17 | + {{/unless}} | ||
16 | </div> | 18 | </div> |
17 | <section class="detail"> | 19 | <section class="detail"> |
18 | <p>欢迎访问BLK APP!我们以本隐私申明声明对访问者隐私保护的许诺。</p> | 20 | <p>欢迎访问BLK APP!我们以本隐私申明声明对访问者隐私保护的许诺。</p> |
@@ -40,6 +40,7 @@ exports.index = (req, res, next) => { | @@ -40,6 +40,7 @@ exports.index = (req, res, next) => { | ||
40 | /* 查询 产品列表 method:GET */ | 40 | /* 查询 产品列表 method:GET */ |
41 | exports.fetchProducts = (req, res, next) => { | 41 | exports.fetchProducts = (req, res, next) => { |
42 | const params = req.query; | 42 | const params = req.query; |
43 | + | ||
43 | 44 | ||
44 | searchModel.products(params) | 45 | searchModel.products(params) |
45 | .then(result => res.json(result)) | 46 | .then(result => res.json(result)) |
@@ -17,7 +17,9 @@ module.exports = { | @@ -17,7 +17,9 @@ module.exports = { | ||
17 | module: 'product', | 17 | module: 'product', |
18 | page: 'shop', | 18 | page: 'shop', |
19 | domain: req.params.domain, | 19 | domain: req.params.domain, |
20 | - shopId: req.query.id | 20 | + shopId: req.query.id, |
21 | + title: req.params.domain, | ||
22 | + noYohoTitle: true | ||
21 | }); | 23 | }); |
22 | }, | 24 | }, |
23 | 25 |
1 | -<div id="ssr" style="position: absolute; top: 0; width: 100%;"> | 1 | +<div id="ssr" class="product-list {{#if isYohoBuy}}no-header{{/if}}" style="position: absolute; top: 0; width: 100%;"> |
2 | + {{#unless isYohoBuy}} | ||
2 | <div class="blk-header-wrap" class="is-fixed"> | 3 | <div class="blk-header-wrap" class="is-fixed"> |
3 | <div class="blk-header"> | 4 | <div class="blk-header"> |
4 | <div class="blk-header-left"> | 5 | <div class="blk-header-left"> |
@@ -12,6 +13,7 @@ | @@ -12,6 +13,7 @@ | ||
12 | </div> | 13 | </div> |
13 | <div class="blk-header-gap"></div> | 14 | <div class="blk-header-gap"></div> |
14 | </div> | 15 | </div> |
16 | + {{/unless}} | ||
15 | <div class="top-filter clearfix"> | 17 | <div class="top-filter clearfix"> |
16 | <div class="filter-content"> | 18 | <div class="filter-content"> |
17 | <ul class="filter-type"> | 19 | <ul class="filter-type"> |
@@ -38,9 +38,10 @@ module.exports = () => { | @@ -38,9 +38,10 @@ module.exports = () => { | ||
38 | // 判断请求是否来自app | 38 | // 判断请求是否来自app |
39 | let userAgent = req.get('User-Agent'); | 39 | let userAgent = req.get('User-Agent'); |
40 | 40 | ||
41 | - yoho.isApp = /yh_blk/i.test(req.get('User-Agent')); | 41 | + yoho.isApp = /yh_blk/i.test(req.get('User-Agent')) || /YH_BLK/i.test(req.get('User-Agent')); |
42 | yoho.isiOS = /\(i[^;]+;( U;)? CPU.+Mac OS X/i.test(userAgent); | 42 | yoho.isiOS = /\(i[^;]+;( U;)? CPU.+Mac OS X/i.test(userAgent); |
43 | yoho.isAndroid = /Android/i.test(userAgent); | 43 | yoho.isAndroid = /Android/i.test(userAgent); |
44 | + yoho.isYohoBuy = /YohoBuy/i.test(userAgent); | ||
44 | 45 | ||
45 | Object.assign(res.locals, yoho); | 46 | Object.assign(res.locals, yoho); |
46 | Object.assign(req.yoho, yoho); | 47 | Object.assign(req.yoho, yoho); |
@@ -11,6 +11,12 @@ module.exports = () => { | @@ -11,6 +11,12 @@ module.exports = () => { | ||
11 | delete req.cookies._YOHOUID; | 11 | delete req.cookies._YOHOUID; |
12 | } | 12 | } |
13 | 13 | ||
14 | + delete req.query.app_version; | ||
15 | + delete req.query.client_secret; | ||
16 | + delete req.query.client_type; | ||
17 | + delete req.query.session_key; | ||
18 | + delete req.query.udid; | ||
19 | + | ||
14 | next(); | 20 | next(); |
15 | }; | 21 | }; |
16 | }; | 22 | }; |
@@ -17,13 +17,12 @@ const nullFun = () => {}; | @@ -17,13 +17,12 @@ const nullFun = () => {}; | ||
17 | 17 | ||
18 | /* 提示信息 */ | 18 | /* 提示信息 */ |
19 | const tipInfo = '暂不支持,请在BLK应用中打开'; | 19 | const tipInfo = '暂不支持,请在BLK应用中打开'; |
20 | - | ||
21 | const yoho = { | 20 | const yoho = { |
22 | /** | 21 | /** |
23 | * 判断是否是 APP | 22 | * 判断是否是 APP |
24 | */ | 23 | */ |
25 | isApp: /yh_blk/i.test(navigator.userAgent || '') || /YH_BLK/i.test(navigator.userAgent || ''), | 24 | isApp: /yh_blk/i.test(navigator.userAgent || '') || /YH_BLK/i.test(navigator.userAgent || ''), |
26 | - isiOS: true,///\(i[^;]+;( U;)? CPU.+Mac OS X/i.test(navigator.userAgent || ''), | 25 | + isiOS: /\(i[^;]+;( U;)? CPU.+Mac OS X/i.test(navigator.userAgent || ''), |
27 | isAndroid: /Android/i.test(navigator.userAgent || ''), | 26 | isAndroid: /Android/i.test(navigator.userAgent || ''), |
28 | isYohoBuy: /YohoBuy/i.test(navigator.userAgent || ''), | 27 | isYohoBuy: /YohoBuy/i.test(navigator.userAgent || ''), |
29 | 28 |
1 | <template> | 1 | <template> |
2 | <div class="cate-page" id='cate-page'> | 2 | <div class="cate-page" id='cate-page'> |
3 | - <header-box title="全部品类" ref="header"></header-box> | 3 | + <header-box title="全部品类" ref="header" v-if="!hideHeader"></header-box> |
4 | <div class="cate-container clearfix"> | 4 | <div class="cate-container clearfix"> |
5 | <div class="content"> | 5 | <div class="content"> |
6 | <ul class="primary-level"> | 6 | <ul class="primary-level"> |
@@ -256,7 +256,8 @@ | @@ -256,7 +256,8 @@ | ||
256 | default() { | 256 | default() { |
257 | return []; | 257 | return []; |
258 | } | 258 | } |
259 | - } | 259 | + }, |
260 | + hideHeader: Boolean | ||
260 | }, | 261 | }, |
261 | data() { | 262 | data() { |
262 | return { | 263 | return { |
@@ -289,6 +290,11 @@ | @@ -289,6 +290,11 @@ | ||
289 | return cate.id.toString() === allSorts; | 290 | return cate.id.toString() === allSorts; |
290 | }) | 291 | }) |
291 | }; | 292 | }; |
293 | + this.cateNavRightData.forEach(right => { | ||
294 | + right.checked = this.currentValue.some(cate => { | ||
295 | + return cate.id.toString() === right.relation_parameter.sort; | ||
296 | + }); | ||
297 | + }); | ||
292 | }, | 298 | }, |
293 | 299 | ||
294 | /* 筛选列表使用返回值 */ | 300 | /* 筛选列表使用返回值 */ |
1 | <template> | 1 | <template> |
2 | - <div class="blk-header-wrap" :class="[{'is-fixed': fixed}, className]"> | 2 | + <div class="blk-header-wrap" v-if="showHeader" :class="[{'is-fixed': fixed}, className]"> |
3 | <div class="blk-header"> | 3 | <div class="blk-header"> |
4 | <div class="blk-header-left"> | 4 | <div class="blk-header-left"> |
5 | <slot name="left"> | 5 | <slot name="left"> |
@@ -27,10 +27,30 @@ | @@ -27,10 +27,30 @@ | ||
27 | fixed: Boolean, | 27 | fixed: Boolean, |
28 | scrollFix: Boolean | 28 | scrollFix: Boolean |
29 | }, | 29 | }, |
30 | + data() { | ||
31 | + return { | ||
32 | + showHeader: true | ||
33 | + }; | ||
34 | + }, | ||
30 | methods: { | 35 | methods: { |
31 | goBack() { | 36 | goBack() { |
32 | yoho.goBack({}, function() {}, function() {}); | 37 | yoho.goBack({}, function() {}, function() {}); |
33 | } | 38 | } |
39 | + }, | ||
40 | + created() { | ||
41 | + if (yoho.isYohoBuy) { | ||
42 | + this.showHeader = false; | ||
43 | + if (this.title) { | ||
44 | + document.title = this.title; | ||
45 | + } | ||
46 | + } | ||
47 | + }, | ||
48 | + watch: { | ||
49 | + title(val) { | ||
50 | + if (val) { | ||
51 | + document.title = val; | ||
52 | + } | ||
53 | + } | ||
34 | } | 54 | } |
35 | }; | 55 | }; |
36 | </script> | 56 | </script> |
@@ -18,6 +18,7 @@ | @@ -18,6 +18,7 @@ | ||
18 | @select="selectItem"></normal-filter> | 18 | @select="selectItem"></normal-filter> |
19 | <sort-filter class="filter-sub-detail filter-sort" | 19 | <sort-filter class="filter-sub-detail filter-sort" |
20 | v-if="subType === 'group_sort'" | 20 | v-if="subType === 'group_sort'" |
21 | + :hide-header="true" | ||
21 | :value="currentValue" | 22 | :value="currentValue" |
22 | :category="data" | 23 | :category="data" |
23 | @select="selectItem"></sort-filter> | 24 | @select="selectItem"></sort-filter> |
@@ -288,7 +288,7 @@ export default { | @@ -288,7 +288,7 @@ export default { | ||
288 | FilterItem, | 288 | FilterItem, |
289 | FilterSub | 289 | FilterSub |
290 | }, | 290 | }, |
291 | - created(){ | 291 | + created() { |
292 | let temp = []; | 292 | let temp = []; |
293 | 293 | ||
294 | _.each(this.filter.group_sort, item => { | 294 | _.each(this.filter.group_sort, item => { |
1 | <template> | 1 | <template> |
2 | - <div> | 2 | + <div class="product-list" :class="{'no-header': noheader}"> |
3 | <header-box :title="sortName" class="list-header"></header-box> | 3 | <header-box :title="sortName" class="list-header"></header-box> |
4 | <filter-box :val="order" :filter="filterConfig" v-if="enableOrder"></filter-box> | 4 | <filter-box :val="order" :filter="filterConfig" v-if="enableOrder"></filter-box> |
5 | <product-list :data="productList" :state="listState" class="list-items"></product-list> | 5 | <product-list :data="productList" :state="listState" class="list-items"></product-list> |
@@ -29,6 +29,7 @@ | @@ -29,6 +29,7 @@ | ||
29 | export default { | 29 | export default { |
30 | data: function() { | 30 | data: function() { |
31 | return { | 31 | return { |
32 | + noheader: false, | ||
32 | isApp: yoho.isApp, | 33 | isApp: yoho.isApp, |
33 | isiOS: yoho.isiOS, | 34 | isiOS: yoho.isiOS, |
34 | sortName: locationQuery.title || locationQuery.sort_name, // 优先使用 title | 35 | sortName: locationQuery.title || locationQuery.sort_name, // 优先使用 title |
@@ -156,6 +157,7 @@ | @@ -156,6 +157,7 @@ | ||
156 | created: function() { | 157 | created: function() { |
157 | const self = this; | 158 | const self = this; |
158 | 159 | ||
160 | + this.noheader = yoho.isYohoBuy; | ||
159 | 161 | ||
160 | bus.$on('list.paging', function() { | 162 | bus.$on('list.paging', function() { |
161 | self.search(); | 163 | self.search(); |
@@ -198,4 +200,9 @@ | @@ -198,4 +200,9 @@ | ||
198 | background-color: #fff; | 200 | background-color: #fff; |
199 | padding-top: 105px; | 201 | padding-top: 105px; |
200 | } | 202 | } |
203 | + .product-list.no-header { | ||
204 | + .top-filter { | ||
205 | + top: 0; | ||
206 | + } | ||
207 | + } | ||
201 | </style> | 208 | </style> |
1 | <template> | 1 | <template> |
2 | - <div> | 2 | + <div class="product-new" :class="{'no-header': noheader}"> |
3 | <header-box title="新品抢先看"></header-box> | 3 | <header-box title="新品抢先看"></header-box> |
4 | <filter-box :val="order" :filter="filterConfig" v-if="enableOrder"></filter-box> | 4 | <filter-box :val="order" :filter="filterConfig" v-if="enableOrder"></filter-box> |
5 | <product-list :data="productList" :state="listState" class="list-items"></product-list> | 5 | <product-list :data="productList" :state="listState" class="list-items"></product-list> |
@@ -29,6 +29,7 @@ | @@ -29,6 +29,7 @@ | ||
29 | export default { | 29 | export default { |
30 | data: function() { | 30 | data: function() { |
31 | return { | 31 | return { |
32 | + noheader: false, | ||
32 | isApp: yoho.isApp, | 33 | isApp: yoho.isApp, |
33 | isiOS: yoho.isiOS, | 34 | isiOS: yoho.isiOS, |
34 | sortName: locationQuery.sort_name, | 35 | sortName: locationQuery.sort_name, |
@@ -147,6 +148,8 @@ | @@ -147,6 +148,8 @@ | ||
147 | created: function() { | 148 | created: function() { |
148 | const self = this; | 149 | const self = this; |
149 | 150 | ||
151 | + this.noheader = yoho.isYohoBuy; | ||
152 | + | ||
150 | bus.$on('list.paging', function() { | 153 | bus.$on('list.paging', function() { |
151 | self.search(); | 154 | self.search(); |
152 | }); | 155 | }); |
@@ -174,4 +177,9 @@ | @@ -174,4 +177,9 @@ | ||
174 | background-color: #fff; | 177 | background-color: #fff; |
175 | padding-top: 105px; | 178 | padding-top: 105px; |
176 | } | 179 | } |
180 | + .product-new.no-header { | ||
181 | + .top-filter { | ||
182 | + top: 0; | ||
183 | + } | ||
184 | + } | ||
177 | </style> | 185 | </style> |
1 | <template> | 1 | <template> |
2 | - <div> | 2 | + <div class="shop-box" :class="{'no-header': noheader}"> |
3 | <top-bar :share-data="shareData" :show-top-bar="showTopBar"></top-bar> | 3 | <top-bar :share-data="shareData" :show-top-bar="showTopBar"></top-bar> |
4 | <div :class='{"shop-goods-top": true}' class="list-items"> | 4 | <div :class='{"shop-goods-top": true}' class="list-items"> |
5 | <product-list :data="productList" :state="listState"></product-list> | 5 | <product-list :data="productList" :state="listState"></product-list> |
@@ -8,6 +8,11 @@ | @@ -8,6 +8,11 @@ | ||
8 | </div> | 8 | </div> |
9 | </template> | 9 | </template> |
10 | <style> | 10 | <style> |
11 | + .shop-box.no-header { | ||
12 | + .top-filter { | ||
13 | + top: 0; | ||
14 | + } | ||
15 | + } | ||
11 | #shop { | 16 | #shop { |
12 | .empty-tip { | 17 | .empty-tip { |
13 | margin-top: 40px; | 18 | margin-top: 40px; |
@@ -39,6 +44,7 @@ | @@ -39,6 +44,7 @@ | ||
39 | export default { | 44 | export default { |
40 | data() { | 45 | data() { |
41 | return { | 46 | return { |
47 | + noheader: false, | ||
42 | shareData: {}, // 分享相关数据 | 48 | shareData: {}, // 分享相关数据 |
43 | shopInfo: {}, // 店铺介绍相关数据 | 49 | shopInfo: {}, // 店铺介绍相关数据 |
44 | sortConfig: {}, | 50 | sortConfig: {}, |
@@ -58,7 +64,6 @@ | @@ -58,7 +64,6 @@ | ||
58 | inSearching: false, | 64 | inSearching: false, |
59 | enableOrder: false, | 65 | enableOrder: false, |
60 | order: '', | 66 | order: '', |
61 | - fixIosTop: false | ||
62 | }; | 67 | }; |
63 | }, | 68 | }, |
64 | computed: { | 69 | computed: { |
@@ -184,6 +189,8 @@ | @@ -184,6 +189,8 @@ | ||
184 | created() { | 189 | created() { |
185 | const self = this; | 190 | const self = this; |
186 | 191 | ||
192 | + this.noheader = yoho.isYohoBuy; | ||
193 | + | ||
187 | this.getShopInfo(); | 194 | this.getShopInfo(); |
188 | this.search() | 195 | this.search() |
189 | .then(()=>{ | 196 | .then(()=>{ |
@@ -212,10 +219,6 @@ | @@ -212,10 +219,6 @@ | ||
212 | self.filter = val; | 219 | self.filter = val; |
213 | self.$refs.filter.isVisible = false; | 220 | self.$refs.filter.isVisible = false; |
214 | }); | 221 | }); |
215 | - | ||
216 | - if(yoho.isiOS) { | ||
217 | - this.fixIosTop = true; | ||
218 | - } | ||
219 | } | 222 | } |
220 | }; | 223 | }; |
221 | 224 |
-
Please register or login to post a comment