diff --git a/src/modules/auth/captcha/model.rs b/src/modules/auth/captcha/model.rs index bedb3e8..73fbf18 100644 --- a/src/modules/auth/captcha/model.rs +++ b/src/modules/auth/captcha/model.rs @@ -10,7 +10,7 @@ pub struct AuthCaptchaVo { } #[derive(Debug, Deserialize, Serialize)] -#[serde(rename_all = "camelCase")] +// #[serde(rename_all = "camelCase")] pub struct LoginVo { //授权令牌 @@ -27,10 +27,10 @@ pub struct LoginVo { //应用id pub client_id: String, - + //令牌权限 pub scope: String, - + //用户 openid pub openid: String, } diff --git a/src/modules/auth/captcha/router.rs b/src/modules/auth/captcha/router.rs index f90b690..da20af1 100644 --- a/src/modules/auth/captcha/router.rs +++ b/src/modules/auth/captcha/router.rs @@ -9,7 +9,6 @@ use axum::{Router, debug_handler, routing}; pub fn create_auth_router() -> Router { Router::new().route("/code", routing::get(get_one)) .route("/login", routing::post(login)) - .route("/login", routing::get(user)) } pub fn create_pub_router() -> Router { @@ -33,7 +32,7 @@ pub async fn get_one() -> ApiResult> { #[debug_handler] pub async fn login() -> ApiResult> { 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>> { 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,