Authored by 李奇

fixed:banner跳转拼团详情页

1 -  
2 -  
3 import queryString from '../vendors/query-string'; 1 import queryString from '../vendors/query-string';
  2 +import jumpMiniApp from '../router/jump-to-miniapp';
4 3
5 const GO_LIST = 'go.list'; 4 const GO_LIST = 'go.list';
6 const GO_PRODUCTPOOL = 'go.poollist'; 5 const GO_PRODUCTPOOL = 'go.poollist';
@@ -59,7 +58,20 @@ function jumpByUrl(jumpUrl,pageName){ @@ -59,7 +58,20 @@ function jumpByUrl(jumpUrl,pageName){
59 } else if (GO_SHOP === action) { 58 } else if (GO_SHOP === action) {
60 path = "../goodsList/brandStore"; 59 path = "../goodsList/brandStore";
61 } else if (GO_DETAIL === action) { 60 } else if (GO_DETAIL === action) {
62 - path = "../goodsDetail/goodsDetail"; 61 + let actionType = '';
  62 + if (json.params && json.params.activity_type){
  63 + actionType = json.params.activity_type;
  64 + }
  65 + if (actionType && actionType === 'groupPurchase'){
  66 + return jumpMiniApp({
  67 + app: 'groupBuy',
  68 + page: 'detail',
  69 + data: {
  70 + activityId: json.params.activity_id,
  71 + productSkn: json.params.product_skn
  72 + }
  73 + });
  74 + }
63 } else if (GO_COUPON === action) { 75 } else if (GO_COUPON === action) {
64 path = "../page/subPackage/pages/couponList/couponList"; 76 path = "../page/subPackage/pages/couponList/couponList";
65 }else if (GO_NEW === action) { 77 }else if (GO_NEW === action) {
  1 +import wx from '../utils/wx';
  2 +import {stringify} from '../vendors/query-string';
  3 +
  4 +const appData = {
  5 + yohobuyLimitChannel: {
  6 + appId: 'wxed31f9e8705fb8d1',
  7 + page: {
  8 + limitProductList: 'pages/index/index'
  9 + }
  10 + },
  11 + groupBuy: { // 拼团
  12 + appId: 'wx207f18be42db9028',
  13 + page: {
  14 + home: '/pages/group/home',
  15 + detail: '/pages/group/detail',
  16 + }
  17 + }
  18 +};
  19 +
  20 +export default function(params) {
  21 + let navigateToMiniParams = {
  22 + appId: appData[params.app].appId,
  23 + path: params.path || `${appData[params.app].page[params.page]}?${stringify(params.data)}`
  24 + };
  25 +
  26 + return wx.navigateToMiniProgram(navigateToMiniParams);
  27 +}