Ver código fonte

确认登录局域网评测

XW 4 meses atrás
pai
commit
75fba83324

+ 2 - 1
TEAMModelOS/ClientApp/src/api/http.js

@@ -33,7 +33,8 @@ const NO_ACCESS_API = [
     '/student/login-open',
     '/student/add-open-stu',
     '/xunfei-jjy/gen-sso',
-    '/xunfei-jjy/bind'
+    '/xunfei-jjy/bind',
+    '/core/qrcode/login',
 ]
 // 需要携带access_token 不需要携带auth-token
 const NO_AUTH_API = [

+ 19 - 2
TEAMModelOS/ClientApp/src/view/joinSchool/qrcodeLogin.vue

@@ -7,7 +7,9 @@
         </span>
       </p>
       <div style="width:fit-content;margin: auto;" v-show="!isJoin">
-        <p style="font-size:16px;color:#fff">正在通过扫码登录</p>
+        <p style="font-size:16px;color:#fff">正在通过扫码登录
+          <span v-if="systemInfo.ip">{{ systemInfo.ip }}({{ systemInfo.region }})</span>
+        </p>
       </div>
 
       <div class="join-btn" @click="toLogin()" v-show="!isJoin && !isRep">
@@ -32,7 +34,11 @@ export default {
       isLogin: false,
       isJoin: false,
       code: '',
-      id_token: ''
+      id_token: '',
+      systemInfo: {
+        ip: '',
+        region: '',
+      },
     }
   },
   computed: {
@@ -66,6 +72,16 @@ export default {
         this.$Message.error(this.$t('cusMgt.join.joinErr'))
       })
     },
+    getSystemInfo() {
+      this.$api.login.getSystemInfo({}).then(
+          res => {
+              if (res.version) {
+                  this.systemInfo.ip = res.ip
+                  this.systemInfo.region = res.region
+              }
+          }
+      )
+    },
     toLogin() {
       // let type = process.env.NODE_ENV //product | development
       let accUrl = this.curSiteConfig.accAPIUrl
@@ -115,6 +131,7 @@ export default {
     // 判断移动端还是PC端
     this.isPC = !(/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent))
     console.log('pc', this.isPC)
+    this.getSystemInfo()
   }
 }
 </script>