From e067e8f0f6360ed475fd8e1ec63c7507c4ff76ba Mon Sep 17 00:00:00 2001 From: Luk Lu Date: Mon, 5 Jul 2021 22:54:39 +0800 Subject: [PATCH] u --- index.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index ba5bc33..bfefa55 100644 --- a/index.js +++ b/index.js @@ -149,9 +149,10 @@ module.exports = { }, async pickupFile2Cloud({ mediaType = 'image', count = 1, sizeType = ['original', 'compressed'], sourceType = ['album', 'camera'], maxDuration } = {}) { - if (!uni.getStorageSync('_passtoken')) { - return { _state: 'USER_OFFLINE', errMsg: 'offline user cannot upload files' } - } + // 有的管理后台不需要登录就允许上传,例如 cmctoy。因此不要在这里依赖登录状态。 + // if (!uni.getStorageSync('_passtoken')) { + // return { _state: 'USER_OFFLINE', errMsg: 'offline user cannot upload files' } + // } let filePath, cloudPath,