unibest/src/typings.d.ts

29 lines
530 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
token?: string
}
}
export {} // 防止模块污染