Merge remote-tracking branch 'origin/release/3.0' into release/3.0
Showing
14 changed files
with
47 additions
and
23 deletions
1 | <div class="about-us"> | 1 | <div class="about-us"> |
2 | <div id="header"> | 2 | <div id="header"> |
3 | - {{#unless isYohoBuy}} | ||
4 | <div class="blk-header-wrap" class="is-fixed"> | 3 | <div class="blk-header-wrap" class="is-fixed"> |
5 | <div class="blk-header"> | 4 | <div class="blk-header"> |
6 | <div class="blk-header-left"> | 5 | <div class="blk-header-left"> |
@@ -14,7 +13,6 @@ | @@ -14,7 +13,6 @@ | ||
14 | </div> | 13 | </div> |
15 | <div class="blk-header-gap"></div> | 14 | <div class="blk-header-gap"></div> |
16 | </div> | 15 | </div> |
17 | - {{/unless}} | ||
18 | </div> | 16 | </div> |
19 | <div class="icon-container"> | 17 | <div class="icon-container"> |
20 | <span class="blk-start-icon"></span> | 18 | <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}} | ||
4 | <div class="blk-header-wrap" class="is-fixed"> | 3 | <div class="blk-header-wrap" class="is-fixed"> |
5 | <div class="blk-header"> | 4 | <div class="blk-header"> |
6 | <div class="blk-header-left"> | 5 | <div class="blk-header-left"> |
@@ -14,7 +13,6 @@ | @@ -14,7 +13,6 @@ | ||
14 | </div> | 13 | </div> |
15 | <div class="blk-header-gap"></div> | 14 | <div class="blk-header-gap"></div> |
16 | </div> | 15 | </div> |
17 | - {{/unless}} | ||
18 | </div> | 16 | </div> |
19 | <div class="suggest-sub-form"> | 17 | <div class="suggest-sub-form"> |
20 | <textarea name="" id="suggest-textarea" placeholder="请写下对于BLK的意见和建议,我们将及时根据您的意见作出改进"></textarea> | 18 | <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}} | ||
4 | <div class="blk-header-wrap" class="is-fixed"> | 3 | <div class="blk-header-wrap" class="is-fixed"> |
5 | <div class="blk-header"> | 4 | <div class="blk-header"> |
6 | <div class="blk-header-left"> | 5 | <div class="blk-header-left"> |
@@ -14,7 +13,6 @@ | @@ -14,7 +13,6 @@ | ||
14 | </div> | 13 | </div> |
15 | <div class="blk-header-gap"></div> | 14 | <div class="blk-header-gap"></div> |
16 | </div> | 15 | </div> |
17 | - {{/unless}} | ||
18 | </div> | 16 | </div> |
19 | <ul> | 17 | <ul> |
20 | {{# helpList}} | 18 | {{# helpList}} |
1 | <div id="header"> | 1 | <div id="header"> |
2 | - {{#unless isYohoBuy}} | ||
3 | <div class="blk-header-wrap" class="is-fixed"> | 2 | <div class="blk-header-wrap" class="is-fixed"> |
4 | <div class="blk-header"> | 3 | <div class="blk-header"> |
5 | <div class="blk-header-left"> | 4 | <div class="blk-header-left"> |
@@ -13,7 +12,6 @@ | @@ -13,7 +12,6 @@ | ||
13 | </div> | 12 | </div> |
14 | <div class="blk-header-gap"></div> | 13 | <div class="blk-header-gap"></div> |
15 | </div> | 14 | </div> |
16 | - {{/unless}} | ||
17 | </div> | 15 | </div> |
18 | {{#if helpDetail_1}} | 16 | {{#if helpDetail_1}} |
19 | {{> helpDetail_1}} | 17 | {{> helpDetail_1}} |
1 | <div class="vip-privilege-page yoho-page"> | 1 | <div class="vip-privilege-page yoho-page"> |
2 | - {{#unless isYohoBuy}} | ||
3 | <div class="blk-header-wrap"> | 2 | <div class="blk-header-wrap"> |
4 | <div class="blk-header"> | 3 | <div class="blk-header"> |
5 | <div class="blk-header-left"> | 4 | <div class="blk-header-left"> |
@@ -9,7 +8,6 @@ | @@ -9,7 +8,6 @@ | ||
9 | <span class="blk-header-title">VIP特权</span> | 8 | <span class="blk-header-title">VIP特权</span> |
10 | </div> | 9 | </div> |
11 | </div> | 10 | </div> |
12 | - {{/unless}} | ||
13 | <ul class="privilege-list"> | 11 | <ul class="privilege-list"> |
14 | {{#each privilege}} | 12 | {{#each privilege}} |
15 | <li> | 13 | <li> |
1 | <div class="provisions"> | 1 | <div class="provisions"> |
2 | <div id="header"> | 2 | <div id="header"> |
3 | - {{#unless isYohoBuy}} | ||
4 | <div class="blk-header-wrap" class="is-fixed"> | 3 | <div class="blk-header-wrap" class="is-fixed"> |
5 | <div class="blk-header"> | 4 | <div class="blk-header"> |
6 | <div class="blk-header-left"> | 5 | <div class="blk-header-left"> |
@@ -14,7 +13,6 @@ | @@ -14,7 +13,6 @@ | ||
14 | </div> | 13 | </div> |
15 | <div class="blk-header-gap"></div> | 14 | <div class="blk-header-gap"></div> |
16 | </div> | 15 | </div> |
17 | - {{/unless}} | ||
18 | </div> | 16 | </div> |
19 | <section class="detail"> | 17 | <section class="detail"> |
20 | <p>欢迎访问BLK APP!我们以本隐私申明声明对访问者隐私保护的许诺。</p> | 18 | <p>欢迎访问BLK APP!我们以本隐私申明声明对访问者隐私保护的许诺。</p> |
1 | -<div id="ssr" class="product-list {{#if isYohoBuy}}no-header{{/if}}" style="position: absolute; top: 0; width: 100%;"> | ||
2 | - {{#unless isYohoBuy}} | 1 | +<div id="ssr" class="product-list " style="position: absolute; top: 0; width: 100%;"> |
3 | <div class="blk-header-wrap" class="is-fixed"> | 2 | <div class="blk-header-wrap" class="is-fixed"> |
4 | <div class="blk-header"> | 3 | <div class="blk-header"> |
5 | <div class="blk-header-left"> | 4 | <div class="blk-header-left"> |
@@ -13,7 +12,6 @@ | @@ -13,7 +12,6 @@ | ||
13 | </div> | 12 | </div> |
14 | <div class="blk-header-gap"></div> | 13 | <div class="blk-header-gap"></div> |
15 | </div> | 14 | </div> |
16 | - {{/unless}} | ||
17 | <div class="top-filter clearfix"> | 15 | <div class="top-filter clearfix"> |
18 | <div class="filter-content"> | 16 | <div class="filter-content"> |
19 | <ul class="filter-type"> | 17 | <ul class="filter-type"> |
@@ -254,7 +254,7 @@ const matchHeader = (path, qs, titleMap) => { | @@ -254,7 +254,7 @@ const matchHeader = (path, qs, titleMap) => { | ||
254 | }; | 254 | }; |
255 | 255 | ||
256 | const intercept = (url) => { | 256 | const intercept = (url) => { |
257 | - if (yoho.isApp) { | 257 | + if (yoho.isApp || yoho.isYohoBuy) { |
258 | let titleMap = Object.assign({}, defaultTitleMap); | 258 | let titleMap = Object.assign({}, defaultTitleMap); |
259 | let [path, qs] = url.split('?'); | 259 | let [path, qs] = url.split('?'); |
260 | 260 |
@@ -15,6 +15,21 @@ import tip from 'common/tip'; | @@ -15,6 +15,21 @@ import tip from 'common/tip'; | ||
15 | /* 空方法 */ | 15 | /* 空方法 */ |
16 | const nullFun = () => {}; | 16 | const nullFun = () => {}; |
17 | 17 | ||
18 | +let isYohoBuy = /YohoBuy/i.test(navigator.userAgent || ''); | ||
19 | + | ||
20 | +let $appLink = document.querySelector('#yoho-app-link'); | ||
21 | + | ||
22 | +if (isYohoBuy && !$appLink) { | ||
23 | + let body = document.querySelector('body'); | ||
24 | + | ||
25 | + $appLink = document.createElement('a'); | ||
26 | + $appLink.id = 'yoho-app-link'; | ||
27 | + $appLink.href = 'javascript:;'; | ||
28 | + $appLink.style.display = 'none'; | ||
29 | + | ||
30 | + body.appendChild($appLink); | ||
31 | +} | ||
32 | + | ||
18 | /* 提示信息 */ | 33 | /* 提示信息 */ |
19 | const tipInfo = '暂不支持,请在BLK应用中打开'; | 34 | const tipInfo = '暂不支持,请在BLK应用中打开'; |
20 | const yoho = { | 35 | const yoho = { |
@@ -24,7 +39,7 @@ const yoho = { | @@ -24,7 +39,7 @@ const yoho = { | ||
24 | isApp: /yh_blk/i.test(navigator.userAgent || '') || /YH_BLK/i.test(navigator.userAgent || ''), | 39 | isApp: /yh_blk/i.test(navigator.userAgent || '') || /YH_BLK/i.test(navigator.userAgent || ''), |
25 | isiOS: /\(i[^;]+;( U;)? CPU.+Mac OS X/i.test(navigator.userAgent || ''), | 40 | isiOS: /\(i[^;]+;( U;)? CPU.+Mac OS X/i.test(navigator.userAgent || ''), |
26 | isAndroid: /Android/i.test(navigator.userAgent || ''), | 41 | isAndroid: /Android/i.test(navigator.userAgent || ''), |
27 | - isYohoBuy: /YohoBuy/i.test(navigator.userAgent || ''), | 42 | + isYohoBuy: isYohoBuy, |
28 | 43 | ||
29 | /** | 44 | /** |
30 | * store | 45 | * store |
@@ -190,6 +205,24 @@ const yoho = { | @@ -190,6 +205,24 @@ const yoho = { | ||
190 | method: 'go.newPage', | 205 | method: 'go.newPage', |
191 | arguments: args | 206 | arguments: args |
192 | }); | 207 | }); |
208 | + } if (this.isYohoBuy) { | ||
209 | + let url = args.url; | ||
210 | + | ||
211 | + // if (url.indexOf('openby:') < 0) { | ||
212 | + // delete args.url; | ||
213 | + // url += '&openby:yohobuy=' + JSON.stringify({ | ||
214 | + // action: 'go.h5', | ||
215 | + // params: { | ||
216 | + // islogin: 'N', | ||
217 | + // type: 0, | ||
218 | + // updateflag: Date.now() + '', | ||
219 | + // url: args.url, | ||
220 | + // param: args | ||
221 | + // } | ||
222 | + // }); | ||
223 | + // } | ||
224 | + $appLink.attr('href', url); | ||
225 | + $appLink[0].click(); | ||
193 | } else { | 226 | } else { |
194 | if (args.url) { | 227 | if (args.url) { |
195 | window.open(args.url); | 228 | window.open(args.url); |
@@ -437,4 +470,5 @@ const yoho = { | @@ -437,4 +470,5 @@ const yoho = { | ||
437 | } | 470 | } |
438 | }; | 471 | }; |
439 | 472 | ||
473 | + | ||
440 | export default yoho; | 474 | export default yoho; |
@@ -25,7 +25,11 @@ | @@ -25,7 +25,11 @@ | ||
25 | title: String, | 25 | title: String, |
26 | className: [String, Object, Array], | 26 | className: [String, Object, Array], |
27 | fixed: Boolean, | 27 | fixed: Boolean, |
28 | - scrollFix: Boolean | 28 | + scrollFix: Boolean, |
29 | + must: { | ||
30 | + type: Boolean, | ||
31 | + default: true | ||
32 | + } | ||
29 | }, | 33 | }, |
30 | data() { | 34 | data() { |
31 | return { | 35 | return { |
@@ -39,7 +43,7 @@ | @@ -39,7 +43,7 @@ | ||
39 | }, | 43 | }, |
40 | created() { | 44 | created() { |
41 | if (yoho.isYohoBuy) { | 45 | if (yoho.isYohoBuy) { |
42 | - this.showHeader = false; | 46 | + this.showHeader = this.must; // must为true 必须显示,否则为false |
43 | if (this.title) { | 47 | if (this.title) { |
44 | document.title = this.title; | 48 | document.title = this.title; |
45 | } | 49 | } |
1 | <template> | 1 | <template> |
2 | <div class="filter-sub" :class="{'filter-sub-open': isVisible}"> | 2 | <div class="filter-sub" :class="{'filter-sub-open': isVisible}"> |
3 | - <header-box class="filter-sub-header" :title="filterType"> | 3 | + <header-box class="filter-sub-header" :must="true" :title="filterType"> |
4 | <i class="icon icon-back" slot="left" @click="hide"></i> | 4 | <i class="icon icon-back" slot="left" @click="hide"></i> |
5 | <button class="btn-clear" slot="right" @click="clear">清空</button> | 5 | <button class="btn-clear" slot="right" @click="clear">清空</button> |
6 | </header-box> | 6 | </header-box> |
@@ -157,7 +157,7 @@ | @@ -157,7 +157,7 @@ | ||
157 | created: function() { | 157 | created: function() { |
158 | const self = this; | 158 | const self = this; |
159 | 159 | ||
160 | - this.noheader = yoho.isYohoBuy; | 160 | + // this.noheader = yoho.isYohoBuy; |
161 | 161 | ||
162 | bus.$on('list.paging', function() { | 162 | bus.$on('list.paging', function() { |
163 | self.search(); | 163 | self.search(); |
@@ -148,7 +148,7 @@ | @@ -148,7 +148,7 @@ | ||
148 | created: function() { | 148 | created: function() { |
149 | const self = this; | 149 | const self = this; |
150 | 150 | ||
151 | - this.noheader = yoho.isYohoBuy; | 151 | + // this.noheader = yoho.isYohoBuy; |
152 | 152 | ||
153 | bus.$on('list.paging', function() { | 153 | bus.$on('list.paging', function() { |
154 | self.search(); | 154 | self.search(); |
-
Please register or login to post a comment