mo 2 年之前
父节点
当前提交
54bae10f48
共有 2 个文件被更改,包括 27 次插入26 次删除
  1. 4 3
      src/helpers/utils.ts
  2. 23 23
      src/helpers/validate.ts

+ 4 - 3
src/helpers/utils.ts

@@ -130,13 +130,14 @@ export const dateFormat = (
 export function vaildTeachingUrl() {
   let url = window.location.href
   let returnUrl = ''
-  if ( /dev/.test(url)) {
+  if (/dev/.test(url)) {
     //线上
-    returnUrl = 'https://online.colexiu.com'
+    returnUrl = 'https://dev.colexiu.com'
     return returnUrl
   } else if (/colexiu/.test(url)) {
     // dev 环境
-    returnUrl = 'https://test.colexiu.com'
+    returnUrl = 'https://online.colexiu.com'
+
     return returnUrl
   } else if (/test/.test(url)) {
     // dev 环境

+ 23 - 23
src/helpers/validate.ts

@@ -1,26 +1,26 @@
-// 学生地址
-export function vaildStudentUrl() {
-  const url = window.location.href
-  let returnUrl = ''
-  if (/dev/.test(url)) {
-    // dev 环境
-    returnUrl = 'https://dev.colexiu.com'
-    return returnUrl
-  } else if (/online/.test(url)) {
-    //线上
-    returnUrl = 'https://dev.colexiu.com'
-    return returnUrl
-  } else if (/test/.test(url)) {
-    // dev 环境
-    returnUrl = 'https://dev.colexiu.com'
-    return returnUrl
-  } else {
-    // 默认dev环境
-    returnUrl = 'https://dev.colexiu.com'
-    return returnUrl
-  }
-  return returnUrl
-}
+// // 学生地址
+// export function vaildStudentUrl() {
+//   const url = window.location.href
+//   let returnUrl = ''
+//   if (/dev/.test(url)) {
+//     // dev 环境
+//     returnUrl = 'https://dev.colexiu.com'
+//     return returnUrl
+//   } else if (/online/.test(url)) {
+//     //线上
+//     returnUrl = 'https://dev.colexiu.com'
+//     return returnUrl
+//   } else if (/test/.test(url)) {
+//     // dev 环境
+//     returnUrl = 'https://dev.colexiu.com'
+//     return returnUrl
+//   } else {
+//     // 默认dev环境
+//     returnUrl = 'https://dev.colexiu.com'
+//     return returnUrl
+//   }
+//   return returnUrl
+// }
 
 export function checkPhone(phone: string) {
   const phoneRule = /^1[3456789]\d{9}$/