Authored by TaoHuang

hotfix(detail): fix product name

... ... @@ -56,6 +56,7 @@ 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 qs from 'qs';
const { mapState: mapArticleState, mapActions, mapGetters } = createNamespacedHelpers('article');
... ... @@ -252,10 +253,10 @@ export default {
e.preventDefault();
// 对商品详情链接单独处理
let url = new URL(ele.getAttribute('href'));
const searchParams = url.searchParams;
let openBy = searchParams.get('openby:yohobuy');
let skn = searchParams.get('product_skn');
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) {
... ... @@ -265,7 +266,7 @@ export default {
openBy.params.from_page_name = name;
openBy.params.from_page_param = vm.data.articleId;
url = url.origin + '/?openby:yohobuy=' + JSON.stringify(openBy) + '&product_skn=' + skn;
url = url.protocol + '//' + url.host + '?openby:yohobuy=' + JSON.stringify(openBy) + '&product_skn=' + skn;
}
}
}
... ...