文章目录
-
-
- 登录页面布局
- JWT 令牌鉴权
- 用户功能实现
-
- 用户查询页面
- 用户更改状态
- 用户添加页面
- 用户添加页面表单构建
- 用户编辑页面
- 用户编辑表单页面
登录页面布局
import React, { useEffect, useState } from 'react'
import { Button, Form, Input, message } from 'antd'
import style from './login.module.scss'
import initBackground from './init.ts'
// 引入请求api
import api from '@/api'
// 引入跳转路由的hooks
import { useNavigate } from 'react-router-dom'
export default function index() {
let navigate = useNavigate()
// 点击登录按钮
const onFinish = async (values: any) => {
let { username, password } = values
// 获取验证码参数
let data = {
username,
password
}
let res = awa