Authored by yyq

action 过滤

... ... @@ -3,6 +3,9 @@ import $ from 'yoho-jquery';
import tip from 'js/plugin/tip';
import {transToMiniappPath} from 'js/common/miniapp-path-rules';
const jumpAction = ['go.productDetail', 'go.list', 'go.shop', 'go.poollist',
'go.activitytemplate', 'go.collagehome', 'go.bargainlist', 'go.activitytemplate'];
class LinkHandle {
constructor() {
$(document).delegate('a:not(.yoho-coin, .yoho-conpon)', 'click', event => {
... ... @@ -17,10 +20,15 @@ class LinkHandle {
// let path = this.transToPath(href);
// this.goMiniProgram(path);
//
// 跳转至小程序公共处理页
this.goMiniProgram(`/pages/common/webback?url=${encodeURIComponent(href)}`);
let transData = transToMiniappPath(href);
if (jumpAction.indexOf(transData.action) >= 0) {
// 跳转至小程序公共处理页
this.goMiniProgram(`/pages/common/webback?url=${encodeURIComponent(href)}`);
} else {
tip.show('暂不支持,请使用Yoho!buy有货APP选购');
}
event.preventDefault();
}
... ...