diff --git a/src/apis/index.ts b/src/apis/index.ts index 265216f8..e2f9666f 100644 --- a/src/apis/index.ts +++ b/src/apis/index.ts @@ -60,7 +60,6 @@ export function uploadImportData(data, onUploadProgress) { }) } -// 查询导入进度,status: 0=导入中, 1=完成, 2=失败 -export function getProgress(params?) { - return http<{ status: number; reason: string }>('dict/getProgress', null, params, 'get') +export function getProgress() { + return http<{ status: number; reason: string }>('dict/getProgress', null, null, 'get') } diff --git a/src/apis/user.ts b/src/apis/user.ts index 1332fb4d..bdad11dd 100644 --- a/src/apis/user.ts +++ b/src/apis/user.ts @@ -87,12 +87,7 @@ export function registerApi(params: RegisterParams) { } export function sendCode(params: SendCodeParams) { - return Promise.resolve({ - success: true, - code: 200, - msg: '登录成功', - }) - return http('user/sendCode', params, null, 'post') + return http('user/sendCode', null, params, 'get') } export function resetPasswordApi(params: ResetPasswordParams) { diff --git a/src/pages/user/index.vue b/src/pages/user/index.vue index d9f661d5..352cc0aa 100644 --- a/src/pages/user/index.vue +++ b/src/pages/user/index.vue @@ -1,5 +1,5 @@ @@ -120,7 +147,7 @@ const onFileSelected = async (e: Event) => {
- 头像 + 头像
{{ authStore.user?.nickname?.charAt(0) || "U" }}
@@ -135,52 +162,76 @@ const onFileSelected = async (e: Event) => {
同步数据 + + + 查看同步进度 + + 系统设置 退出登录
-
+ +
- {{ progressText }} - {{ syncReason }} + 上传中({{ uploadPercent }}%)
+ + +
+
+
+ 后台正在处理... + 已用时:{{ Math.floor(processElapsedSec / 60) }}分{{ processElapsedSec % 60 }}秒 + {{ processReason }} +
+
+ + +
导入完成
+
导入失败:{{ processReason }}
-