Authored by 周少峰

Merge branch 'hotfix/yohoLink' into test6.9.10

@@ -23,128 +23,11 @@ @@ -23,128 +23,11 @@
23 23
24 <option value="">请选择跳转列表</option> 24 <option value="">请选择跳转列表</option>
25 25
26 - <option value="go.brand">品牌列表页</option>  
27 -  
28 <option value="go.productDetail">商品详情页</option> 26 <option value="go.productDetail">商品详情页</option>
29 27
30 - <option value="go.coupon">优惠券页</option>  
31 -  
32 - <option value="go.fav">收藏列表页</option>  
33 -  
34 - <option value="go.mine">我的页面</option>  
35 -  
36 - <option value="go.list">列表或搜索页</option>  
37 -  
38 - <option value="go.attention">关注页</option>  
39 -  
40 - <option value="go.plus">plus页</option>  
41 -  
42 - <option value="go.star">star页</option>  
43 -  
44 - <option value="go.new">新品到着页</option>  
45 -  
46 - <option value="go.sale">折扣页</option>  
47 -  
48 - <option value="go.share">分享</option>  
49 -  
50 <option value="go.h5">h5网页</option> 28 <option value="go.h5">h5网页</option>
51 29
52 - <option value="go.weblogin">h5网页调用本地登录</option>  
53 -  
54 - <option value="go.gender">男女首页</option>  
55 -  
56 - <option value="go.activity">app活动页</option>  
57 -  
58 - <option value="go.home">频道首页</option>  
59 -  
60 - <option value="go.yohood">YOHOOD</option>  
61 -  
62 - <option value="go.top100">热销排行</option>  
63 -  
64 - <option value="go.activitytemplate">活动模板</option>  
65 -  
66 - <option value="go.globalpurchase">全球购</option>  
67 -  
68 - <option value="go.subchannel">二级频道</option>  
69 -  
70 - <option value="go.showgoods">去晒单</option>  
71 -  
72 - <option value="go.limitpurchase">尖货频道</option>  
73 -  
74 - <option value="go.vippro">会员商品</option>  
75 -  
76 - <option value="go.shortsize">断码页</option>  
77 -  
78 - <option value="go.discountmarket">折扣专区</option>  
79 -  
80 - <option value="go.discountmarketpro">折扣专区详情页</option>  
81 -  
82 - <option value="go.signin">签到页</option>  
83 -  
84 - <option value="go.playvideo">视频播放</option>  
85 -  
86 <option value="go.shop">店铺</option> 30 <option value="go.shop">店铺</option>
87 -  
88 - <option value="go.outletactivity">奥莱活动详情页</option>  
89 -  
90 - <option value="go.newoutlet">奥莱频道页</option>  
91 -  
92 - <option value="go.category">选择一级品类</option>  
93 -  
94 - <option value="go.comm.postdetail">社区帖子详情页</option>  
95 -  
96 - <option value="go.comm.forum">社区版块首页</option>  
97 -  
98 - <option value="go.comm.h5">社区H5</option>  
99 -  
100 - <option value="go.comm.productDetail">社区商品详情页</option>  
101 -  
102 - <option value="go.videolive">直播详情页</option>  
103 -  
104 - <option value="go.videoreplay">重播详情页</option>  
105 -  
106 - <option value="go.newyohood">new YOHOOD</option>  
107 -  
108 - <option value="go.myInstalment">分期</option>  
109 -  
110 - <option value="go.blkbrandcategory">BLK品牌品类页</option>  
111 -  
112 - <option value="go.findgoodgoods">发现好货</option>  
113 -  
114 - <option value="go.poollist">商品列表页</option>  
115 -  
116 - <option value="go.gallay">xx馆落地页</option>  
117 -  
118 - <option value="go.shopactivity">店铺活动页</option>  
119 -  
120 - <option value="go.newarrivalsingleshop">新品到着单品</option>  
121 -  
122 - <option value="go.blkhome">有货BLK首页</option>  
123 -  
124 - <option value="go.family">有货 !family</option>  
125 -  
126 - <option value="go.vipInfo">会员中心页</option>  
127 -  
128 - <option value="go.vipexclusivepro">会员专享列表</option>  
129 -  
130 - <option value="go.minealliance">联盟</option>  
131 -  
132 - <option value="go.miniapp">跳转到小程序</option>  
133 -  
134 - <option value="go.collagehome">拼团首页</option>  
135 -  
136 - <option value="go.switchchannel">频道切换</option>  
137 -  
138 - <option value="go.mineredpackage">我的红包</option>  
139 -  
140 - <option value="go.ufo">UFO落地页</option>  
141 -  
142 - <option value="go.bargainlist">砍价商品列表</option>  
143 -  
144 - <option value="go.searchlist">搜索结果页</option>  
145 -  
146 - <option value="go.guangchannel">社区</option>  
147 -  
148 </select> 31 </select>
149 </td> 32 </td>
150 </tr> 33 </tr>
@@ -256,7 +139,7 @@ @@ -256,7 +139,7 @@
256 obj.textValue = text.value; 139 obj.textValue = text.value;
257 } 140 }
258 var conItem = href.indexOf("?") > -1 ? "&" : "?"; 141 var conItem = href.indexOf("?") > -1 ? "&" : "?";
259 - obj._href = obj.href = href + conItem + 'openby:yohobuy=' + JSON.stringify({action: action.val(), params: {url: href.split("?")[0], param: getUrlParams(href)}}); 142 + obj._href = obj.href = href + conItem + 'openby:yohobuy=' + getOpenbyParams(action.val(), href);
260 143
261 editor.execCommand('link',utils.clearEmptyAttrs(obj) ); 144 editor.execCommand('link',utils.clearEmptyAttrs(obj) );
262 dialog.close(); 145 dialog.close();
@@ -300,6 +183,28 @@ @@ -300,6 +183,28 @@
300 $G("msg").innerHTML = "<span style='color: red'>合法域名"+hrefDomain.join('、') +"</span>"; 183 $G("msg").innerHTML = "<span style='color: red'>合法域名"+hrefDomain.join('、') +"</span>";
301 } 184 }
302 }; 185 };
  186 +
  187 + function getOpenbyParams(action, href) {
  188 + var params = {action: action};
  189 + var hrefParams = getUrlParams(href);
  190 + if (action == "go.h5") {
  191 + params.params = {url: href};
  192 + params.param = hrefParams;
  193 + }
  194 +
  195 + else if (action == "go.productDetail") {
  196 + params.params = {product_skn: href.match(/product\/(\d+).html/)[1]}
  197 + }
  198 + else if (action == "go.shop") {
  199 + params.params = {
  200 + shop_id: hrefParams.shop_id,
  201 + shop_template_type: hrefParams.shop_template_type,
  202 + shop_name: hrefParams.shop_name,
  203 + }
  204 + }
  205 +
  206 + return JSON.stringify(params);
  207 + }
303 }) 208 })
304 209
305 </script> 210 </script>