Files
aiot-uniapp/src/typings.d.ts
Hygge d9e16baca9 feat: 添加 token 刷新功能及相关类型定义
- 在 typings.d.ts 中新增 IUserToken 接口
- 在 login.ts 中添加 refreshToken 函数以支持 token 刷新
- 在 types/login.ts 中新增 IUserTokenVo 接口
- 更新 http.ts 以处理 token 刷新逻辑
- 修改 interceptor.ts 以使用新的 token 类型
- 在 user.ts 中整合 token 状态管理
2025-08-21 15:49:14 +08:00

34 lines
612 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// 全局要用的类型放到这里
declare global {
interface IResData<T> {
code: number
msg: string
data: T
}
// uni.uploadFile文件上传参数
interface IUniUploadFileOptions {
file?: File
files?: UniApp.UploadFileOptionFiles[]
filePath?: string
name?: string
formData?: any
}
interface IUserInfo {
nickname?: string
avatar?: string
/** 微信的 openid非微信没有这个字段 */
openid?: string
}
interface IUserToken {
token: string
refreshToken?: string
refreshExpire?: number
}
}
export {} // 防止模块污染