u
This commit is contained in:
		
							parent
							
								
									c21d397b99
								
							
						
					
					
						commit
						e067e8f0f6
					
				
							
								
								
									
										7
									
								
								index.js
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								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,
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user