初始化

This commit is contained in:
vben
2026-10-02 08:08:11 +08:00
parent 76031f956a
commit cd65fc9e29
2 changed files with 5 additions and 6 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ pub struct AuthCaptchaVo {
}
#[derive(Debug, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
// #[serde(rename_all = "camelCase")]
pub struct LoginVo {
//授权令牌
+2 -3
View File
@@ -9,7 +9,6 @@ use axum::{Router, debug_handler, routing};
pub fn create_auth_router() -> Router<AppState> {
Router::new().route("/code", routing::get(get_one))
.route("/login", routing::post(login))
.route("/login", routing::get(user))
}
pub fn create_pub_router() -> Router<AppState> {
@@ -33,7 +32,7 @@ pub async fn get_one() -> ApiResult<ApiResponse<AuthCaptchaVo>> {
#[debug_handler]
pub async fn login() -> ApiResult<ApiResponse<LoginVo>> {
let vo = LoginVo {
access_token: "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOiJzeXNfdXNlcjp1MSIsInJuU3RyIjoiZ1RxUHRRZmZLYm4xcmdzSzZkWTc2Qzh4cFoxV01KZUkiLCJjbGllbnRpZCI6ImU1Y2Q3ZTQ4OTFiZjk1ZDFkMTkyMDZjZTI0YTdiMzJlIiwidXNlcklkIjoidTEiLCJ1c2VyTmFtZSI6ImFkbWluIiwib3JnaWQiOiJvMTAwMCIsIm9yZ25hIjoiWFjnp5HmioAifQ.a5eDnQTXcQ5D34_FaOFsJZB_yYwRkRAKwstwhqLjpVc".to_string(),
access_token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZW5hbnRJZCI6IjEiLCJ1c2VySWQiOiIxIiwidXNlck5hbWUiOiJhZG1pbiIsIm9yZ2lkIjoxLCJvcmduYSI6Ilx1N2VmNFx1NjcyY1x1NzlkMVx1NjI4MCIsIm9yZ3R5IjoiMSIsImV4cCI6MTc5MDkwMTA0N30.qlaq3tP3pQIj0pNa9BaMfGwWaIc5BDRF2gUE2mGY2vk".to_string(),
refresh_token: "".to_string(),
expire_in: 604800,
refresh_expire_in: 604800,
@@ -58,7 +57,7 @@ pub async fn user() -> ApiResult<ApiResponse<HashMap<String, Value>>> {
monum: "13812345678".to_string(),
gender: "1".to_string(),
// avatar: Some("https://unpkg.com/@vbenjs/static-source@0.1.7/source/avatar-v1.webp".to_string()),
avatar: Some("/api/tool/oss/show?id=2015240095127236608".to_string()),
avatar: Some("https://vfadmin.insistence.tech/assets/profile-CuEt6NNf.jpg".to_string()),
avtag: None,
loip: None,
lotim: None,