Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohoblk-wap
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
李奇
7 years ago
Commit
95f1495c5b8d8c7ddfc194b7ca42181354fa4deb
2 parents
9c560b66
002be747
Merge branch 'master' into feature/add-sessionKey
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
17 additions
and
11 deletions
config/common.js
package.json
public/build/webpack.base.config.js
public/js/common/intercept-click.js
public/vue/component/product/cart/add-to-cart.vue
public/vue/product/detail/index.vue
public/vue/product/detail/operation-bar.vue
config/common.js
View file @
95f1495
...
...
@@ -106,7 +106,7 @@ if (isProduction) {
},
memcache
:
{
master
:
[
'memcache1.yohoops.org:12111'
,
'memcache2.yohoops.org:12111'
,
'memcache3.yohoops.org:12111'
],
slave
:
[
'memcache1.yohoops.org:12112'
,
'memcache2.yohoops.org:12112'
,
'memcache3.yohoops.org:12112'
],
slave
:
[],
session
:
[
'memcache1.yohoops.org:12111'
,
'memcache2.yohoops.org:12111'
,
'memcache3.yohoops.org:12111'
],
timeout
:
100
,
retries
:
0
...
...
package.json
View file @
95f1495
{
"name"
:
"yohoblk-wap"
,
"version"
:
"2.0.2
1
"
,
"version"
:
"2.0.2
6
"
,
"private"
:
true
,
"description"
:
"A New Yohobuy Project With Express"
,
"repository"
:
{
...
...
public/build/webpack.base.config.js
View file @
95f1495
...
...
@@ -25,6 +25,7 @@ const hbsLoader = {
const
getEntries
=
()
=>
{
const
entries
=
{
libs
:
[
'babel-polyfill'
,
'jquery'
,
'yoho-qs'
,
'yoho-cookie'
,
...
...
public/js/common/intercept-click.js
View file @
95f1495
...
...
@@ -19,7 +19,7 @@ const origin = location.origin;
*/
const
defaultTitleMap
=
{
1
:
{
headerid
:
'1'
,
headerid
:
'
-
1'
,
left
:
{
action
:
''
},
...
...
public/vue/component/product/cart/add-to-cart.vue
View file @
95f1495
...
...
@@ -58,7 +58,7 @@ export default {
return {};
},
buttonText() {
if (this.value.storage_sum <= 0) {
if (this.value.storage_sum <= 0
|| this.value.is_deposit_advance === 'Y'
) {
return '已售罄';
}
return '加入购物车';
...
...
@@ -156,7 +156,7 @@ export default {
return yoho.goLogin();
}
if (this.value.storage_sum <= 0) {
if (this.value.storage_sum <= 0
|| this.value.is_deposit_advance === 'Y'
) {
return;
}
if (!this.colorId) {
...
...
public/vue/product/detail/index.vue
View file @
95f1495
...
...
@@ -283,6 +283,7 @@
import operationBar from './operation-bar.vue';
import 'common/back-top';
import cookie from 'yoho-cookie';
import qs from 'yoho-qs';
const app = $('#app');
...
...
@@ -413,13 +414,14 @@
}
});
const href = location.href;
const mark = /\?/.test(href) ? '&' : '?';
const origin = location.origin;
const pathname = location.pathname;
const channel = cookie.get('_Channel') || 'men';
const queryStr = $.param(Object.assign(qs, {channel}));
share({
title: this.entity.product_name,
link: `${
href}${mark}channel=${channel
}`,
link: `${
origin}${pathname}?${queryStr
}`,
desc: '我在BLK发现了一个不错的商品,快来看看吧!',
imgUrl: this.firstImage.replace(/(\{width}|\{height}|\{mode})/g, function($0) {
const dict = {
...
...
public/vue/product/detail/operation-bar.vue
View file @
95f1495
...
...
@@ -56,9 +56,11 @@
}
</style>
<script>
import $ from 'yoho-jquery';
import yoho from 'yoho';
import tip from 'common/tip';
import cookie from 'yoho-cookie';
import qs from 'yoho-qs';
export default {
name: 'operation-bar',
...
...
@@ -83,15 +85,16 @@
},
methods: {
share() {
const href = location.href;
const mark = /\?/.test(href) ? '&' : '?';
const origin = location.origin;
const pathname = location.pathname;
const channel = cookie.get('_Channel') || 'men';
const queryStr = $.param(Object.assign(qs, {channel}));
yoho.goShare({
title: this.shareTitle || '',
des: '我在BLK发现了一个不错的商品,快来看看吧!',
img: location.protocol + this.shareImg,
url: `${
href}${mark}channel=${channel
}`
url: `${
origin}${pathname}?${queryStr
}`
});
},
toggleFavorite: function() {
...
...
Please
register
or
login
to post a comment