This commit is contained in:
陆柯 2021-07-05 22:54:39 +08:00
parent c21d397b99
commit e067e8f0f6

View File

@ -149,9 +149,10 @@ module.exports = {
}, },
async pickupFile2Cloud({ mediaType = 'image', count = 1, sizeType = ['original', 'compressed'], sourceType = ['album', 'camera'], maxDuration } = {}) { async pickupFile2Cloud({ mediaType = 'image', count = 1, sizeType = ['original', 'compressed'], sourceType = ['album', 'camera'], maxDuration } = {}) {
if (!uni.getStorageSync('_passtoken')) { // 有的管理后台不需要登录就允许上传,例如 cmctoy。因此不要在这里依赖登录状态。
return { _state: 'USER_OFFLINE', errMsg: 'offline user cannot upload files' } // if (!uni.getStorageSync('_passtoken')) {
} // return { _state: 'USER_OFFLINE', errMsg: 'offline user cannot upload files' }
// }
let filePath, let filePath,
cloudPath, cloudPath,