🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
# token验证 支持url传参 `token` 和 `bearer token` 两种验证方式。 token默认3天候过期(可按需更变) ### 1. url传参 示例: `{{letaoapi}}/auth/logout?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczpcL1wvbGV0YW8ubm9vYmNvZGVyLmNuXC9hcGlcL2F1dGhcL2xvZ2luIiwiaWF0IjoxNjQxNDQ1MTA4LCJleHAiOjE2NDE0NDg3MDgsIm5iZiI6MTY0MTQ0NTEwOCwianRpIjoiQXU0amdmQmNGajVtQzFSdSIsInN1YiI6MSwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.HyHEaTjKyygSRSLlwLcj7nG3X2JjfhIgDJVA6nvKy\_g` ### 2. bearer token 示例: ```js axios.post( IP, obj, { headers: { Authorization: `Bearer ${Base.token}` } } ).then() ```