jest 单元测试 export const jumpInteractionType = (modulesInfo, router) => {
  if (
    INTERACTION_TYPE.ROUTE_PAGE_TYPE.INTERNAL ===
    getInteractionPageType(modulesInfo.interactionTypeId1)
  ) {
    if (
      INTERACTION_TYPE.SECONDARY_INTERNAL_PAGE_TYPE.PRODUCT_LIST ===
      getInteractionPageType(modulesInfo.interactionTypeId2)
    ) {
      router?.push({
        name: modulesInfo.interactionTypePath,
        params: {
          keyword: modulesInfo.conditionMatch,
          type: 'search'
        }
      });
    } else if (
      INTERACTION_TYPE.SECONDARY_INTERNAL_PAGE_TYPE.CATEGORIZE ===
      getInteractionPageType(modulesInfo.interactionTypeId2)
    ) {
      const categoryIdList = [];
      // eslint-disable-next-line guard-for-in
      for (const categoryItem in modulesInfo.category) {
        if (categoryItem.indexOf('categoryId') !== -1) {
          categoryIdList.push(modulesInfo.category[categoryItem]);
        }
      }
      router?.push({
        name: modulesInfo.interactionTypePath,
        params: {
          keyword: JSON.stringify({
            value: categoryIdList[categoryIdList.length - 1],
            id: 'n'
          }),
          type: 'fromCategory'
        }
      });
    } else if (
      INTERACTION_TYPE.SECONDARY_INTERNAL_PAGE_TYPE.SECONDARY_ACTIVITIES ===
      getInteractionPageType(modulesInfo.interactionTypeId2)
    ) {
      router?.push({
        name: 'landingPage',
        query: {
          templateId: `${modulesInfo.selectedPage?.pageId}_${modulesInfo.selectedPage?.pageName}`
        }
      });
    } else if (
      TABBAR_PAGE_APP_CODE?.[modulesInfo.interactionTypePath.toUpperCase()] >= 0
    ) {
      Bridge.callFn('getWebViewOriginalPagePath', {}, ({ path }) => {
        router?.push({
          path
        });
      });
      changeTabbarSelectItem(modulesInfo.interactionTypePath);
    } else {
      router?.push({
        name: modulesInfo.interactionTypePath
      });
    }
  } else if (
    INTERACTION_TYPE.ROUTE_PAGE_TYPE.CUSTOM ===
    getInteractionPageType(modulesInfo.interactionTypeId1)
  ) {
    if (modulesInfo.pageUrl.indexOf(WEBAPP_PROD_SUBDOMAIN) === -1) {
      Bridge.callFn('openNativePage', {
        url: modulesInfo.pageUrl,
        animated: false
      });
    } else {
      const isTabbarPage = Object.keys(TABBAR_PAGE_APP_CODE).some(
        tabBarPagePathItem => {
          return (
            modulesInfo.pageUrl
              .toUpperCase()
              .indexOf(`/${tabBarPagePathItem}`) !== -1
          );
        }
      );
      if (isTabbarPage) {
        Bridge.callFn('getWebViewOriginalPagePath', {}, ({ path }) => {
          router?.push({
            path
          });
        });
        changeTabbarSelectItem(modulesInfo.interactionTypePath);
      } else {
        const params = getUrlParams(modulesInfo.pageUrl);
        router?.push({
          path: new URL(modulesInfo.pageUrl).pathname,
          query: {
            ...params
          }
        });
      }
    }
  } else if (
    INTERACTION_TYPE.ROUTE_PAGE_TYPE.PROMOTION_CUSTOMIZATION ===
    getInteractionPageType(modulesInfo.interactionTypeId1)
  ) {
    router?.push({
      name: modulesInfo.interactionTypePath
    });
  }
};
export function convertListToQueryParameter(listQueryParameter, parameterName) {
  return listQueryParameter
    .map(listElement => `${parameterName}=${encodeURIComponent(listElement)}`)
    .join('&');
}