validate.ts 515 B

123456789101112131415
  1. // 学生地址
  2. export function vaildStudentUrl() {
  3. let url = window.location.href
  4. let returnUrl = ''
  5. if (/online/.test(url)) { //线上
  6. returnUrl = 'https://mstuonline.dayaedu.com'
  7. } else if (/dev/.test(url)) { // dev 环境
  8. returnUrl = 'http://mstudev.dayaedu.com'
  9. } else if (/test/.test(url)) { // dev 环境
  10. returnUrl = 'http://mstutest.dayaedu.com'
  11. } else { // 默认dev环境
  12. returnUrl = 'http://mstudev.dayaedu.com'
  13. }
  14. return returnUrl
  15. }