Merge branch 'hotfix/iphonex' into 'master'
Hotfix/iphonex See merge request !56
Showing
5 changed files
with
20 additions
and
15 deletions
@@ -18,9 +18,9 @@ module.exports = { | @@ -18,9 +18,9 @@ module.exports = { | ||
18 | app_type: 1 | 18 | app_type: 1 |
19 | }, | 19 | }, |
20 | domains: { | 20 | domains: { |
21 | - // api: 'http://api-test3.yohops.com:9999/', | ||
22 | - // service: 'http://service-test3.yohops.com:9999/', | ||
23 | - // singleApi: 'http://api-test3.yohops.com:9999/' | 21 | + api: 'http://api-test3.yohops.com:9999/', |
22 | + service: 'http://service-test3.yohops.com:9999/', | ||
23 | + singleApi: 'http://api-test3.yohops.com:9999/' | ||
24 | 24 | ||
25 | // api: 'http://api-test2.yohops.com:9999/', | 25 | // api: 'http://api-test2.yohops.com:9999/', |
26 | // service: 'http://service-test2.yohops.com:9999/', | 26 | // service: 'http://service-test2.yohops.com:9999/', |
@@ -29,9 +29,9 @@ module.exports = { | @@ -29,9 +29,9 @@ module.exports = { | ||
29 | // service: 'http://dev-service.yohops.com:9999/', | 29 | // service: 'http://dev-service.yohops.com:9999/', |
30 | // singleApi: 'http://192.168.102.27:8092/' | 30 | // singleApi: 'http://192.168.102.27:8092/' |
31 | // // | 31 | // // |
32 | - api: 'http://api.yoho.cn/', | ||
33 | - service: 'http://service.yoho.cn/', | ||
34 | - singleApi: 'http://single.yoho.cn/' | 32 | + // api: 'http://api.yoho.cn/', |
33 | + // service: 'http://service.yoho.cn/', | ||
34 | + // singleApi: 'http://single.yoho.cn/' | ||
35 | }, | 35 | }, |
36 | subDomains: { | 36 | subDomains: { |
37 | host: '.m.yohoblk.com', | 37 | host: '.m.yohoblk.com', |
@@ -58,7 +58,7 @@ export default { | @@ -58,7 +58,7 @@ export default { | ||
58 | return {}; | 58 | return {}; |
59 | }, | 59 | }, |
60 | buttonText() { | 60 | buttonText() { |
61 | - if (this.value.storage_sum <= 0) { | 61 | + if (this.value.storage_sum <= 0 || this.value.is_deposit_advance === 'Y') { |
62 | return '已售罄'; | 62 | return '已售罄'; |
63 | } | 63 | } |
64 | return '加入购物车'; | 64 | return '加入购物车'; |
@@ -156,7 +156,7 @@ export default { | @@ -156,7 +156,7 @@ export default { | ||
156 | return yoho.goLogin(); | 156 | return yoho.goLogin(); |
157 | } | 157 | } |
158 | 158 | ||
159 | - if (this.value.storage_sum <= 0) { | 159 | + if (this.value.storage_sum <= 0 || this.value.is_deposit_advance === 'Y') { |
160 | return; | 160 | return; |
161 | } | 161 | } |
162 | if (!this.colorId) { | 162 | if (!this.colorId) { |
@@ -283,6 +283,7 @@ | @@ -283,6 +283,7 @@ | ||
283 | import operationBar from './operation-bar.vue'; | 283 | import operationBar from './operation-bar.vue'; |
284 | import 'common/back-top'; | 284 | import 'common/back-top'; |
285 | import cookie from 'yoho-cookie'; | 285 | import cookie from 'yoho-cookie'; |
286 | + import qs from 'yoho-qs'; | ||
286 | 287 | ||
287 | 288 | ||
288 | const app = $('#app'); | 289 | const app = $('#app'); |
@@ -413,13 +414,14 @@ | @@ -413,13 +414,14 @@ | ||
413 | } | 414 | } |
414 | }); | 415 | }); |
415 | 416 | ||
416 | - const href = location.href; | ||
417 | - const mark = /\?/.test(href) ? '&' : '?'; | 417 | + const origin = location.origin; |
418 | + const pathname = location.pathname; | ||
418 | const channel = cookie.get('_Channel') || 'men'; | 419 | const channel = cookie.get('_Channel') || 'men'; |
420 | + const queryStr = $.param(Object.assign(qs, {channel})); | ||
419 | 421 | ||
420 | share({ | 422 | share({ |
421 | title: this.entity.product_name, | 423 | title: this.entity.product_name, |
422 | - link: `${href}${mark}channel=${channel}`, | 424 | + link: `${origin}${pathname}?${queryStr}`, |
423 | desc: '我在BLK发现了一个不错的商品,快来看看吧!', | 425 | desc: '我在BLK发现了一个不错的商品,快来看看吧!', |
424 | imgUrl: this.firstImage.replace(/(\{width}|\{height}|\{mode})/g, function($0) { | 426 | imgUrl: this.firstImage.replace(/(\{width}|\{height}|\{mode})/g, function($0) { |
425 | const dict = { | 427 | const dict = { |
@@ -56,9 +56,11 @@ | @@ -56,9 +56,11 @@ | ||
56 | } | 56 | } |
57 | </style> | 57 | </style> |
58 | <script> | 58 | <script> |
59 | + import $ from 'yoho-jquery'; | ||
59 | import yoho from 'yoho'; | 60 | import yoho from 'yoho'; |
60 | import tip from 'common/tip'; | 61 | import tip from 'common/tip'; |
61 | import cookie from 'yoho-cookie'; | 62 | import cookie from 'yoho-cookie'; |
63 | + import qs from 'yoho-qs'; | ||
62 | 64 | ||
63 | export default { | 65 | export default { |
64 | name: 'operation-bar', | 66 | name: 'operation-bar', |
@@ -83,15 +85,16 @@ | @@ -83,15 +85,16 @@ | ||
83 | }, | 85 | }, |
84 | methods: { | 86 | methods: { |
85 | share() { | 87 | share() { |
86 | - const href = location.href; | ||
87 | - const mark = /\?/.test(href) ? '&' : '?'; | 88 | + const origin = location.origin; |
89 | + const pathname = location.pathname; | ||
88 | const channel = cookie.get('_Channel') || 'men'; | 90 | const channel = cookie.get('_Channel') || 'men'; |
91 | + const queryStr = $.param(Object.assign(qs, {channel})); | ||
89 | 92 | ||
90 | yoho.goShare({ | 93 | yoho.goShare({ |
91 | title: this.shareTitle || '', | 94 | title: this.shareTitle || '', |
92 | des: '我在BLK发现了一个不错的商品,快来看看吧!', | 95 | des: '我在BLK发现了一个不错的商品,快来看看吧!', |
93 | img: location.protocol + this.shareImg, | 96 | img: location.protocol + this.shareImg, |
94 | - url: `${href}${mark}channel=${channel}` | 97 | + url: `${origin}${pathname}?${queryStr}` |
95 | }); | 98 | }); |
96 | }, | 99 | }, |
97 | toggleFavorite: function() { | 100 | toggleFavorite: function() { |
-
Please register or login to post a comment