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,