urlUtils.ts 483 B

1234567891011121314151617
  1. export function vaildUrl() {
  2. const url: string = window.location.href;
  3. let returnUrl = '';
  4. if (/192/.test(url) || /localhost/.test(url)) {
  5. //本地环境
  6. returnUrl = 'https://test.lexiaoya.cn';
  7. } else if (/test/.test(url)) {
  8. // dev 环境
  9. returnUrl = 'https://test.lexiaoya.cn';
  10. } else if (/dev/.test(url)) {
  11. returnUrl = 'https://dev.kt.colexiu.com';
  12. } else {
  13. // 默认dev环境
  14. returnUrl = 'https://kt.colexiu.com';
  15. }
  16. return returnUrl;
  17. }