return new Promise((resolve, reject) => {  
        uni.uploadFile({  
            url: obj.url,  
            filePath: obj.filePath,  
            name: 'file',  
            formData: {},  
            success: e => {  
                resolve(e)  
            },  
            fail: err => {  
                reject(err)  
            }  
        })  
}) 
                                        
                                    
                                    
                                        2***@qq.com                                                                                
                                        
                                - 发布:2021-12-29 08:46
- 更新:2021-12-29 13:41
- 阅读:676
uni.uploadFile小程序上传php接收数据为空
                                分类:uni-app
                            
                            
                            
                             
             
             
             
			 
            
1 个回复
2***@qq.com (作者)
开发者工具运行不可以,必须真机运行!