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 @@