瀏覽代碼

跳转增加环境变量判断

dengshaobo 1 月之前
父節點
當前提交
0458ef8d76
共有 1 個文件被更改,包括 9 次插入0 次删除
  1. 9 0
      src/views/school/index.vue

+ 9 - 0
src/views/school/index.vue

@@ -592,6 +592,15 @@ const GoTeach = (row: any) => {
     {
       let ticket = res.data;
       let url=`https://www.k12100.com/#/otherLogin?schoolId=${row.id}&ticket=${ticket}`;//正式环境
+
+      if(import.meta.env.VITE_API_BASE_URL=='https://admin.k12100.com/admin/')
+      {
+        url=`https://www.k12100.com/#/otherLogin?schoolId=${row.id}&ticket=${ticket}`;//正式环境
+      }
+      else
+      {
+        url=`https://dev3.k12100.net/#/otherLogin?schoolId=${row.id}&ticket=${ticket}`;//测试环境
+      }
       // let url=`https://dev3.k12100.net/#/otherLogin?schoolId=${row.id}&ticket=${ticket}`;//测试环境
       console.log("打印获取票据接口返回ticket",ticket)
       console.log("打印第三方登录地址",url);