Authored by 周少峰

Merge branch 'hotfix/yohoLink' into test6.9.10

... ... @@ -23,128 +23,11 @@
<option value="">请选择跳转列表</option>
<option value="go.brand">品牌列表页</option>
<option value="go.productDetail">商品详情页</option>
<option value="go.coupon">优惠券页</option>
<option value="go.fav">收藏列表页</option>
<option value="go.mine">我的页面</option>
<option value="go.list">列表或搜索页</option>
<option value="go.attention">关注页</option>
<option value="go.plus">plus页</option>
<option value="go.star">star页</option>
<option value="go.new">新品到着页</option>
<option value="go.sale">折扣页</option>
<option value="go.share">分享</option>
<option value="go.h5">h5网页</option>
<option value="go.weblogin">h5网页调用本地登录</option>
<option value="go.gender">男女首页</option>
<option value="go.activity">app活动页</option>
<option value="go.home">频道首页</option>
<option value="go.yohood">YOHOOD</option>
<option value="go.top100">热销排行</option>
<option value="go.activitytemplate">活动模板</option>
<option value="go.globalpurchase">全球购</option>
<option value="go.subchannel">二级频道</option>
<option value="go.showgoods">去晒单</option>
<option value="go.limitpurchase">尖货频道</option>
<option value="go.vippro">会员商品</option>
<option value="go.shortsize">断码页</option>
<option value="go.discountmarket">折扣专区</option>
<option value="go.discountmarketpro">折扣专区详情页</option>
<option value="go.signin">签到页</option>
<option value="go.playvideo">视频播放</option>
<option value="go.shop">店铺</option>
<option value="go.outletactivity">奥莱活动详情页</option>
<option value="go.newoutlet">奥莱频道页</option>
<option value="go.category">选择一级品类</option>
<option value="go.comm.postdetail">社区帖子详情页</option>
<option value="go.comm.forum">社区版块首页</option>
<option value="go.comm.h5">社区H5</option>
<option value="go.comm.productDetail">社区商品详情页</option>
<option value="go.videolive">直播详情页</option>
<option value="go.videoreplay">重播详情页</option>
<option value="go.newyohood">new YOHOOD</option>
<option value="go.myInstalment">分期</option>
<option value="go.blkbrandcategory">BLK品牌品类页</option>
<option value="go.findgoodgoods">发现好货</option>
<option value="go.poollist">商品列表页</option>
<option value="go.gallay">xx馆落地页</option>
<option value="go.shopactivity">店铺活动页</option>
<option value="go.newarrivalsingleshop">新品到着单品</option>
<option value="go.blkhome">有货BLK首页</option>
<option value="go.family">有货 !family</option>
<option value="go.vipInfo">会员中心页</option>
<option value="go.vipexclusivepro">会员专享列表</option>
<option value="go.minealliance">联盟</option>
<option value="go.miniapp">跳转到小程序</option>
<option value="go.collagehome">拼团首页</option>
<option value="go.switchchannel">频道切换</option>
<option value="go.mineredpackage">我的红包</option>
<option value="go.ufo">UFO落地页</option>
<option value="go.bargainlist">砍价商品列表</option>
<option value="go.searchlist">搜索结果页</option>
<option value="go.guangchannel">社区</option>
</select>
</td>
</tr>
... ... @@ -256,7 +139,7 @@
obj.textValue = text.value;
}
var conItem = href.indexOf("?") > -1 ? "&" : "?";
obj._href = obj.href = href + conItem + 'openby:yohobuy=' + JSON.stringify({action: action.val(), params: {url: href.split("?")[0], param: getUrlParams(href)}});
obj._href = obj.href = href + conItem + 'openby:yohobuy=' + getOpenbyParams(action.val(), href);
editor.execCommand('link',utils.clearEmptyAttrs(obj) );
dialog.close();
... ... @@ -300,6 +183,28 @@
$G("msg").innerHTML = "<span style='color: red'>合法域名"+hrefDomain.join('、') +"</span>";
}
};
function getOpenbyParams(action, href) {
var params = {action: action};
var hrefParams = getUrlParams(href);
if (action == "go.h5") {
params.params = {url: href};
params.param = hrefParams;
}
else if (action == "go.productDetail") {
params.params = {product_skn: href.match(/product\/(\d+).html/)[1]}
}
else if (action == "go.shop") {
params.params = {
shop_id: hrefParams.shop_id,
shop_template_type: hrefParams.shop_template_type,
shop_name: hrefParams.shop_name,
}
}
return JSON.stringify(params);
}
})
</script>
... ...