|
@@ -136,20 +136,17 @@ export const toChinesNum = (num: any) => {
|
|
|
|
|
|
// 教务地址
|
|
|
export function vaildTeachingUrl() {
|
|
|
- let url = window.location.href;
|
|
|
+ let url = window.location.hostname;
|
|
|
let returnUrl = '';
|
|
|
- if (/online/.test(url)) {
|
|
|
- //线上
|
|
|
- returnUrl = 'https://gym.lexiaoya.cn';
|
|
|
- } else if (/dev/.test(url)) {
|
|
|
+ if (/dev/.test(url)) {
|
|
|
// dev 环境
|
|
|
returnUrl = 'http://dev.gym.lexiaoya.cn';
|
|
|
} else if (/test/.test(url)) {
|
|
|
// dev 环境
|
|
|
returnUrl = 'http://test.gym.lexiaoya.cn';
|
|
|
} else {
|
|
|
- // 默认dev环境
|
|
|
- returnUrl = 'http://test.gym.lexiaoya.cn';
|
|
|
+ // 默认线上环境
|
|
|
+ returnUrl = 'https://gym.lexiaoya.cn';
|
|
|
}
|
|
|
return returnUrl;
|
|
|
}
|