feat: 提交模板代码

This commit is contained in:
熊熊熊子路
2026-01-09 09:35:44 +08:00
parent 1ba1c0de42
commit fbab15dd2c
47 changed files with 66336 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
import request from '../utils/request'
import { StandardResponse } from './types'
/**
* 登录接口请求参数类型
*/
export interface LoginParams {
userName: string
password: string
}
/**
* 用户信息数据类型
*/
export interface UserInfoData {
id: number
username: string
nickname: string
avatar: string
email: string
phone: string
}
/**
* 登录接口
* @param params 登录参数
* @returns 返回标准响应格式的登录数据
*/
export const loginReq = (params: LoginParams) => {
return request.post<StandardResponse<UserInfoData>>('/wechatLogin/wechatLogin.action', params)
}
+8
View File
@@ -0,0 +1,8 @@
/**
* 标准响应数据格式
*/
export interface StandardResponse<T = unknown> {
code: number
data: T
message: string
}