Authored by 李奇

Merge branch 'master' into feature/add-sessionKey

@@ -106,7 +106,7 @@ if (isProduction) { @@ -106,7 +106,7 @@ if (isProduction) {
106 }, 106 },
107 memcache: { 107 memcache: {
108 master: ['memcache1.yohoops.org:12111', 'memcache2.yohoops.org:12111', 'memcache3.yohoops.org:12111'], 108 master: ['memcache1.yohoops.org:12111', 'memcache2.yohoops.org:12111', 'memcache3.yohoops.org:12111'],
109 - slave: ['memcache1.yohoops.org:12112', 'memcache2.yohoops.org:12112', 'memcache3.yohoops.org:12112'], 109 + slave: [],
110 session: ['memcache1.yohoops.org:12111', 'memcache2.yohoops.org:12111', 'memcache3.yohoops.org:12111'], 110 session: ['memcache1.yohoops.org:12111', 'memcache2.yohoops.org:12111', 'memcache3.yohoops.org:12111'],
111 timeout: 100, 111 timeout: 100,
112 retries: 0 112 retries: 0
1 { 1 {
2 "name": "yohoblk-wap", 2 "name": "yohoblk-wap",
3 - "version": "2.0.21", 3 + "version": "2.0.26",
4 "private": true, 4 "private": true,
5 "description": "A New Yohobuy Project With Express", 5 "description": "A New Yohobuy Project With Express",
6 "repository": { 6 "repository": {
@@ -25,6 +25,7 @@ const hbsLoader = { @@ -25,6 +25,7 @@ const hbsLoader = {
25 const getEntries = () => { 25 const getEntries = () => {
26 const entries = { 26 const entries = {
27 libs: [ 27 libs: [
  28 + 'babel-polyfill',
28 'jquery', 29 'jquery',
29 'yoho-qs', 30 'yoho-qs',
30 'yoho-cookie', 31 'yoho-cookie',
@@ -19,7 +19,7 @@ const origin = location.origin; @@ -19,7 +19,7 @@ const origin = location.origin;
19 */ 19 */
20 const defaultTitleMap = { 20 const defaultTitleMap = {
21 1: { 21 1: {
22 - headerid: '1', 22 + headerid: '-1',
23 left: { 23 left: {
24 action: '' 24 action: ''
25 }, 25 },
@@ -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() {