| 1234567891011121314151617181920212223242526 |
- /*
- * @Author: fxs bjnsfxs@163.com
- * @Date: 2024-08-21 11:12:21
- * @LastEditors: fxs bjnsfxs@163.com
- * @LastEditTime: 2024-10-16 14:27:56
- * @FilePath: \Quantity-Creation-Management-System\src\utils\axios\auth.ts
- * @Description:
- *
- */
- import {ElMessage} from 'element-plus'
- import {MessageType} from '@/types/axios'
- import {getLoginState} from '../localStorage/localStorage'
- export const authLogin = (): boolean => {
- const state = getLoginState()
- if (!state) {
- ElMessage({
- type: MessageType.Warning,
- message: '请先登录',
- duration: 1500,
- })
- }
- return state
- }
|