Browse Source

登录时机构code获取调整

zhangjie 1 năm trước cách đây
mục cha
commit
66140571df
2 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 1 1
      src/modules/login/router.js
  2. 1 1
      src/modules/login/views/Login.vue

+ 1 - 1
src/modules/login/router.js

@@ -8,7 +8,7 @@ export default {
   component: LoginHome,
   children: [
     {
-      path: "/login",
+      path: "/login/:code?",
       name: "Login",
       component: Login,
       meta: {

+ 1 - 1
src/modules/login/views/Login.vue

@@ -208,7 +208,7 @@ export default {
   },
   methods: {
     async getSchool() {
-      this.loginModel.schoolCode = getOrgCode();
+      this.loginModel.schoolCode = this.$route.params.code || getOrgCode();
       const data = await getSchoolInfo(this.loginModel.schoolCode);
       this.$ls.set("schoolLogo", data.logo);
       this.$ls.set("schoolName", data.name);