diff --git a/src/store/user.ts b/src/store/user.ts index b5eca5f..82bd873 100644 --- a/src/store/user.ts +++ b/src/store/user.ts @@ -1,6 +1,5 @@ import { defineStore } from 'pinia' import { ref } from 'vue' -import { IUserInfo } from '../typings' const initState = { nickname: '', avatar: '' } diff --git a/src/typings.d.ts b/src/typings.d.ts index 910b23a..d6140cd 100644 --- a/src/typings.d.ts +++ b/src/typings.d.ts @@ -1,13 +1,22 @@ /* eslint-disable no-unused-vars */ // 全局要用的类型放到这里 -export type IResData = { +type IResData = { code: number msg: string result: T } -export type IUserInfo = { +// uni.uploadFile文件上传参数 +type IUniUploadFileOptions = { + file?: File + files?: UniApp.UploadFileOptionFiles[] + filePath?: string + name?: string + formData?: any +} + +type IUserInfo = { nickname?: string avatar?: string /** 微信的 openid,非微信没有这个字段 */ @@ -15,7 +24,7 @@ export type IUserInfo = { token?: string } -export enum TestEnum { +enum TestEnum { A = 'a', B = 'b', } diff --git a/src/utils/index.ts b/src/utils/index.ts index 6cf3d2b..bb36bc9 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -1,5 +1,5 @@ -import pagesJson from '@/pages.json' import { translate as t } from '@/locale/index' +import pagesJson from '@/pages.json' console.log(pagesJson)