|
@@ -12,7 +12,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { queryUserInfo } from "@/api/app";
|
|
|
+import { queryTeacherInfo } from "@/api/app";
|
|
|
export default {
|
|
|
name: "app",
|
|
|
async created() {
|
|
@@ -24,20 +24,22 @@ export default {
|
|
|
} else {
|
|
|
Authorization = decodeURI(Authorization)
|
|
|
}
|
|
|
- if (Authorization) {
|
|
|
+ if (Authorization && Authorization != 'null') {
|
|
|
localStorage.setItem("Authorization", Authorization);
|
|
|
localStorage.setItem("userInfo", Authorization);
|
|
|
}
|
|
|
const auth = localStorage.getItem("Authorization");
|
|
|
const userInfo = localStorage.getItem("userInfo");
|
|
|
if (userInfo || auth) {
|
|
|
- await queryUserInfo().then((res) => {
|
|
|
+ await queryTeacherInfo().then((res) => {
|
|
|
const result = res.data || null;
|
|
|
- const tenantId = result.tenantId || 0;
|
|
|
+ const tenantId = result.data.tenantId || 0;
|
|
|
sessionStorage.setItem("tenantId", tenantId);
|
|
|
});
|
|
|
}
|
|
|
- } catch(e) {}
|
|
|
+ } catch(e) {
|
|
|
+ console.log(e)
|
|
|
+ }
|
|
|
},
|
|
|
async mounted() {
|
|
|
if(document.querySelector('#m_loading')) {
|