Authored by 郭成尧

detail-done

@@ -40,7 +40,17 @@ class LinkHandle { @@ -40,7 +40,17 @@ class LinkHandle {
40 * 转换为小程序页面地址 40 * 转换为小程序页面地址
41 */ 41 */
42 transToPath(href) { 42 transToPath(href) {
43 - let path = href; 43 + let path = '';
  44 +
  45 + let hrefArr = href.split('?openby:yohobuy=');
  46 + let paramsStr = hrefArr[hrefArr.length - 1];
  47 + let paramsObj = JSON.parse(paramsStr);
  48 +
  49 + if (paramsObj.action === 'go.productDetail') {
  50 + path = `/pages/goodsDetail/goodsDetail?productSkn=${paramsObj.params.product_skn}&page_name=home`;
  51 + } else {
  52 + // TODO
  53 + }
44 54
45 return path; 55 return path;
46 } 56 }