...
|
...
|
@@ -25,7 +25,7 @@ |
|
|
|
|
|
<div v-if="recomendProduct.length">
|
|
|
<LayoutTitle class="rec-goods-title">推荐商品</LayoutTitle>
|
|
|
<ProductGroup name="articleTwoColumn" :data="recomendProduct" :share="share" model="2"></ProductGroup>
|
|
|
<ProductGroup name="ArticleDetail" :data="recomendProduct" :share="share" model="2"></ProductGroup>
|
|
|
</div>
|
|
|
|
|
|
<LayoutTitle v-if="listTitle" class="rec-article-title">{{listTitle}}</LayoutTitle>
|
...
|
...
|
@@ -55,7 +55,8 @@ import ArticleDetailFooter from './article-footer'; |
|
|
import ArticleItemSlideImage from '../article/article-item-slide-image';
|
|
|
import ArticleDetailHeader from './article-header';
|
|
|
import YAS from 'utils/yas-constants';
|
|
|
import { mapState, mapMutations, createNamespacedHelpers } from 'vuex';
|
|
|
import { createNamespacedHelpers, mapMutations, mapState } from 'vuex';
|
|
|
import qs from 'qs';
|
|
|
|
|
|
const { mapState: mapArticleState, mapActions, mapGetters } = createNamespacedHelpers('article');
|
|
|
|
...
|
...
|
@@ -220,8 +221,6 @@ export default { |
|
|
const vm = this;
|
|
|
const { childNodes = [] } = richText.childNodes[0];
|
|
|
|
|
|
console.log(childNodes[0].nodeName);
|
|
|
|
|
|
// 特殊排版兼容
|
|
|
|
|
|
if (childNodes.length === 1 && childNodes[0].nodeName === 'SECTION') {
|
...
|
...
|
@@ -245,7 +244,37 @@ export default { |
|
|
if (ele && ele.querySelector && ele.querySelector('img')) {
|
|
|
ele.classList.add('yoho-img-link');
|
|
|
|
|
|
ele.addEventListener('click', function() {
|
|
|
const defaultName = 'ArticleDetail';
|
|
|
const name = vm.$yoho.isiOS ? `iFP_${defaultName}` : `aFP_${defaultName}`;
|
|
|
|
|
|
ele.addEventListener('click', function(e) {
|
|
|
e.preventDefault();
|
|
|
|
|
|
// 对商品详情链接单独处理
|
|
|
let url = ele;
|
|
|
const searchParams = qs.parse(url.search.substring(1));
|
|
|
|
|
|
let openBy = searchParams['openby:yohobuy'];
|
|
|
|
|
|
let skn = searchParams.product_skn;
|
|
|
|
|
|
if (skn) {
|
|
|
if (openBy) {
|
|
|
openBy = JSON.parse(openBy);
|
|
|
|
|
|
if (!openBy.params.from_page_name || !openBy.params.from_page_param) {
|
|
|
openBy.params.from_page_name = name;
|
|
|
openBy.params.from_page_param = vm.data.articleId;
|
|
|
|
|
|
url = url.protocol + '//' + url.host + '?product_skn=' + skn + '&openby:yohobuy=' + JSON.stringify(openBy);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
vm.$yoho.goNewPage({
|
|
|
url: url + ''
|
|
|
});
|
|
|
|
|
|
vm.$store.dispatch('reportYas', {
|
|
|
params: {
|
|
|
appop: YAS.eventName.articleImageClick,
|
...
|
...
|
|