Authored by 李奇

fixed:banner跳转拼团详情页

import queryString from '../vendors/query-string';
import jumpMiniApp from '../router/jump-to-miniapp';
const GO_LIST = 'go.list';
const GO_PRODUCTPOOL = 'go.poollist';
... ... @@ -59,7 +58,20 @@ function jumpByUrl(jumpUrl,pageName){
} else if (GO_SHOP === action) {
path = "../goodsList/brandStore";
} else if (GO_DETAIL === action) {
path = "../goodsDetail/goodsDetail";
let actionType = '';
if (json.params && json.params.activity_type){
actionType = json.params.activity_type;
}
if (actionType && actionType === 'groupPurchase'){
return jumpMiniApp({
app: 'groupBuy',
page: 'detail',
data: {
activityId: json.params.activity_id,
productSkn: json.params.product_skn
}
});
}
} else if (GO_COUPON === action) {
path = "../page/subPackage/pages/couponList/couponList";
}else if (GO_NEW === action) {
... ...
import wx from '../utils/wx';
import {stringify} from '../vendors/query-string';
const appData = {
yohobuyLimitChannel: {
appId: 'wxed31f9e8705fb8d1',
page: {
limitProductList: 'pages/index/index'
}
},
groupBuy: { // 拼团
appId: 'wx207f18be42db9028',
page: {
home: '/pages/group/home',
detail: '/pages/group/detail',
}
}
};
export default function(params) {
let navigateToMiniParams = {
appId: appData[params.app].appId,
path: params.path || `${appData[params.app].page[params.page]}?${stringify(params.data)}`
};
return wx.navigateToMiniProgram(navigateToMiniParams);
}
... ...