export const useRouterDetail = (item: { reportsId: string; type: number }) => {
  // type=0  兴趣测评报告
  // =1 性格测评报告
  // =2 能力测评
  // =3 学生考试考虑
  // =4 学习风格
  // =5 学习技能
  // =6 SAS
  // =7 SDS
  // =8 SCL-90
  // =9 MHT
  /// =-1 价值观
  /// =-2 留学咨询
  let url = ''

  if (item.type === 0) {
    url = `/pages-evaluation-sub/evaluate/academicReport/interestReport?id=${item.reportsId}&type=${item.type}`
  } else if (item.type === 1) {
    url = `/pages-evaluation-sub/evaluate/academicReport/characterReport?id=${item.reportsId}&type=${item.type}`
  } else if (item.type === 2) {
    url = `/pages-evaluation-sub/evaluate/academicReport/capabilityReport?id=${item.reportsId}&type=${item.type}`
  } else if (item.type === -1) {
    url = `/pages-evaluation-sub/evaluate/academicReport/opinionAboutReport?id=${item.reportsId}&type=${item.type}`
  } else if (item.type === 6) {
    url = `/pages-evaluation-sub/evaluate/psychologicalReport/sasReport?id=${item.reportsId}&type=${item.type}`
  } else if (item.type === 7) {
    url = `/pages-evaluation-sub/evaluate/psychologicalReport/sdsReport?id=${item.reportsId}&type=${item.type}`
  } else if (item.type === 9) {
    // url = `/pages-evaluation-sub/evaluate/psychologicalReport/mhtReport?id=${item.reportsId}&type=${item.type}`
    uni.showToast({
      title: '开发中....',
      icon: 'none',
    })
    return
  } else if (item.type === 4) {
    url = `/pages-evaluation-sub/evaluate/studyReport/learnStudyReport?id=${item.reportsId}&type=${item.type}`
  } else if (item.type === 5) {
    url = `/pages-evaluation-sub/evaluate/studyReport/learnSkillReport?id=${item.reportsId}&type=${item.type}`
  } else if (item.type === 3) {
    url = `/pages-evaluation-sub/evaluate/studyReport/anxietyReport?id=${item.reportsId}&type=${item.type}`
  } else {
    uni.showToast({
      title: '开发中....',
      icon: 'none',
    })
    return
  }
  uni.navigateTo({
    url,
  })
}
