新增:token登录方式

This commit is contained in:
2024-09-06 17:09:36 +08:00
parent 9438021a08
commit 42730a4429
3 changed files with 42 additions and 1 deletions

View 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>