import Taro from '@tarojs/taro'

export default ({ targetId, contentType, buildingId } = {})=> {
  if (!targetId && !buildingId) return;

  switch (contentType) {
    // 项目
    case 'project':
      Taro.navigateTo({
        url: '/pages/index/buildingDetail/index?id=' + buildingId
      })
      return;

    // 活动
    case 'activity':
      Taro.navigateTo({
        url: '/pages/index/activityDetail/index?id=' + targetId
      })
      return;

    // 资讯
    case 'news':
      Taro.navigateTo({
        url: '/pages/index/newsDetail/index?id=' + targetId
      })
      return;

    // live
    case 'live':
      Taro.navigateTo({
        url: '/pages/video/liveDetail/index?id=' + targetId
      })
      return;


    // 其他
    case 'others':
    default:
      
      return;
  }
}