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
0cd46dc8cd95b3c5ba7b38fb7fcc6880d2e9e118
2 parents
d10b4f20
fd2c62d3
Merge branch 'hotfix/shareLink' into 'master'
fixed: 分享链接添加频道参数 See merge request
!50
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
public/vue/product/detail/index.vue
public/vue/product/detail/operation-bar.vue
public/vue/product/detail/index.vue
View file @
0cd46dc
...
...
@@ -282,6 +282,7 @@
import shoppingBag from 'component/product/shopping-bag.vue';
import operationBar from './operation-bar.vue';
import 'common/back-top';
import cookie from 'yoho-cookie';
const app = $('#app');
...
...
@@ -412,9 +413,13 @@
}
});
const href = location.href;
const mark = /\?/.test(href) ? '&' : '?';
const channel = cookie.get('_Channel') || 'men';
share({
title: this.entity.product_name,
link:
location.href
,
link:
`${href}${mark}channel=${channel}`
,
desc: '我在BLK发现了一个不错的商品,快来看看吧!',
imgUrl: this.firstImage.replace(/(\{width}|\{height}|\{mode})/g, function($0) {
const dict = {
...
...
public/vue/product/detail/operation-bar.vue
View file @
0cd46dc
...
...
@@ -58,6 +58,7 @@
<script>
import yoho from 'yoho';
import tip from 'common/tip';
import cookie from 'yoho-cookie';
export default {
name: 'operation-bar',
...
...
@@ -82,11 +83,15 @@
},
methods: {
share() {
const href = location.href;
const mark = /\?/.test(href) ? '&' : '?';
const channel = cookie.get('_Channel') || 'men';
yoho.goShare({
title: this.shareTitle || '',
des: '我在BLK发现了一个不错的商品,快来看看吧!',
img: location.protocol + this.shareImg,
url:
location.href
url:
`${href}${mark}channel=${channel}`
});
},
toggleFavorite: function() {
...
...
Please
register
or
login
to post a comment