// 将window.location.search 转为对象
export const searchObj = search = decodeURIComponent(window.location.search)
  .slice(1)
  .split('&')
  .reduce((obj, item) => {
    const [key, value] = item.split('=')
    obj[key] = value
    return obj
  }, {})

console.log('search : ', search)
export const APP_TITLE = search?.appname ? (search?.appname) : '巡课系统'

document.title = APP_TITLE