From 74c2fda0ef29a552846dbefb8826a96e8afea103 Mon Sep 17 00:00:00 2001 From: WindowBird <13870814+windows-bird@user.noreply.gitee.com> Date: Thu, 6 Nov 2025 16:16:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E4=B8=83=E7=89=9B=E4=BA=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/api.js | 12 ++ pages/submit-task/index.vue | 38 +++-- utils/qiniu.js | 288 ++++++++++++++++++++++++++++++++++++ 3 files changed, 325 insertions(+), 13 deletions(-) create mode 100644 utils/qiniu.js diff --git a/common/api.js b/common/api.js index 95a4a2f..69e1b00 100644 --- a/common/api.js +++ b/common/api.js @@ -85,3 +85,15 @@ export const getTaskDetail = (id) => { }); }; +/** + * 获取七牛云上传token + * @returns {Promise} 返回七牛云上传token + */ +export const getQiniuUploadToken = () => { + return uni.$uv.http.get('/common/qiniuToken', { + custom: { + auth: true // 启用 token 认证 + } + }); +}; + diff --git a/pages/submit-task/index.vue b/pages/submit-task/index.vue index 2a345ec..fd827cf 100644 --- a/pages/submit-task/index.vue +++ b/pages/submit-task/index.vue @@ -121,6 +121,7 @@