import { getRequestHostname } from '/src/helpers/utils'
import qs from 'query-string'

const isManage = getRequestHostname() === '/api-backend'
// 后台管理，教学伴奏预览专用参数
const parseSearch: any = qs.parse(location.search)

export default {
  '/sysMusicScoreCategories/queryTree': (
    isManage ? '/eduMusicScore/queryTree' : '/sysMusicScoreCategories/queryTree'
  ),
  '/sysMusicScoreAccompaniment/queryPage': (
    isManage && !parseSearch.platform ? '/eduMusicScore/queryPage' : '/sysMusicScoreAccompaniment/queryPage'
  ),
  '/sysMusicScoreAccompaniment/queryPageLimit': (
    isManage ? '/eduMusicScore/queryPageLimit' : '/sysMusicScoreAccompaniment/queryPageLimit'
  ),
  '/sysMusicScoreAccompaniment/querySubjectIds': (
    isManage ? '/eduMusicScore/querySubjectIds' : '/sysMusicScoreAccompaniment/querySubjectIds'
  ),
}