oppo r9s上小程序无法加载和预览图片
使用oppo r9s无法显示小程序组件 - 当前 Bug 的表现(可附上截图) 图片无法上传和加载 1.1 图片上传时(可复现图片截图) [图片] 1.2图片加载时(可复现图片截图) [图片] - 预期表现 1.1 预期上传图片时(使用华为,apple,三星等其他手机测试均正常)——上传过程中 [图片] 1.2 预期上传完成后的加载效果(使用华为,apple,三星等其他手机测试均正常)——加载显示 [图片] - 复现路径 微信小程序提供的原生组件wx.uploadFile - 提供一个最简复现 Demo [代码] //点击上传事件[代码][代码] [代码][代码]uploadimage: [代码][代码]function[代码] [代码]() {[代码][代码] [代码][代码]var[代码] [代码]value = wx.getStorageSync([代码][代码]'xxxxxx'[代码][代码]);[代码][代码] [代码][代码]var[代码] [代码]that = [代码][代码]this[代码][代码];[代码][代码] [代码][代码]var[代码] [代码]upload_picture_list = [代码][代码]this[代码][代码].data.upload_picture_list;[代码] [代码] [代码][代码]//循环把图片上传到服务器 并显示进度 [代码][代码] [代码][代码]for[代码] [代码]([代码][代码]var[代码] [代码]j [代码][代码]in[代码] [代码]upload_picture_list) {[代码][代码] [代码][代码]if[代码] [代码](upload_picture_list[j][[代码][代码]'upload_percent'[代码][代码]] == 0) {[代码][代码] [代码][代码]//调用函数[代码][代码] [代码][代码]// var url = urls_upload;[代码][代码] [代码][代码]var[代码] [代码]url = 'xxxxxxxx'[代码][代码];[代码][代码] [代码][代码]that.upload_file_server(url, upload_picture_list, j)[代码][代码] [代码][代码]}[代码][代码] [代码][代码]}[代码] [代码] [代码][代码]wx.hideToast();[代码] [代码] [代码][代码]},[代码] [代码] [代码] [代码] [代码][代码]//上传方法[代码][代码] [代码][代码]upload_file_server: [代码][代码]function[代码] [代码](url, upload_picture_list, j) {[代码][代码] [代码][代码]//上传返回值[代码][代码] [代码][代码]var[代码] [代码]that = [代码][代码]this[代码][代码];[代码][代码] [代码][代码]const upload_task = wx.uploadFile({[代码][代码] [代码][代码]url: url, [代码][代码]//需要用HTTPS,同时在微信公众平台后台添加服务器地址 [代码][代码] [代码][代码]filePath: upload_picture_list[j][[代码][代码]'path'[代码][代码]], [代码][代码]//上传的文件本地地址 [代码][代码] [代码][代码]name: [代码][代码]'file'[代码][代码],[代码][代码] [代码][代码]formData: {[代码][代码] [代码][代码]'num'[代码][代码]: j[代码][代码] [代码][代码]},[代码][代码] [代码][代码]//附近数据,这里为路径 [代码][代码] [代码][代码]success: [代码][代码]function[代码] [代码](res) {[代码][代码] [代码][代码]var[代码] [代码]data = JSON.parse(res.data);[代码][代码] [代码][代码]if[代码] [代码](data.err == 0) {[代码][代码] [代码][代码]var[代码] [代码]filenamePicUrl = data.rows.PicUrl [代码][代码]//存储地址 显示[代码][代码] [代码][代码]var[代码] [代码]filenameSaveUrl = data.rows.SaveUrl [代码][代码]//存储地址 显示[代码][代码] [代码][代码]upload_picture_list[j][[代码][代码]'PicUrl'[代码][代码]] = filenamePicUrl[代码][代码] [代码][代码]upload_picture_list[j][[代码][代码]'SaveUrl'[代码][代码]] = [代码][代码]'xxxxxxxxxx'[代码] [代码]+ filenameSaveUrl[代码][代码] [代码][代码]that.setData({[代码][代码] [代码][代码]upload_picture_list: upload_picture_list[代码][代码] [代码][代码]});[代码] [代码] [代码][代码]}[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码] [代码] [代码] [代码] [代码][代码]//上传 进度方法[代码][代码] [代码][代码]upload_task.onProgressUpdate((res) => {[代码][代码] [代码][代码]upload_picture_list[j][[代码][代码]'upload_percent'[代码][代码]] = res.progress[代码][代码] [代码][代码]that.setData({[代码][代码] [代码][代码]upload_picture_list: upload_picture_list[代码][代码] [代码][代码]});[代码][代码] [代码][代码]});[代码][代码] [代码][代码]},[代码] [代码] [代码] 微信小程序 appid:wx1104913fafd2287f