新增:token登录方式
This commit is contained in:
16
src/views/passport/loginToken/index.vue
Normal file
16
src/views/passport/loginToken/index.vue
Normal file
@@ -0,0 +1,16 @@
|
||||
<template>
|
||||
<div></div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { getIdBySpm, getTokenBySpm, push } from '@/utils/common';
|
||||
import { setToken } from '@/utils/token-util';
|
||||
|
||||
if (getTokenBySpm()) {
|
||||
setToken(getTokenBySpm(), true);
|
||||
localStorage.setItem('TenantId', String(getIdBySpm(2)));
|
||||
localStorage.setItem('UserId', String(getIdBySpm(1)));
|
||||
push('/');
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less"></style>
|
||||
Reference in New Issue
Block a user