uni-app使用IPhone X上传照片时无反应
uni-app使用IPhone X上传照片时无反应
| 开发环境 | 版本号 | 项目创建方式 |
|---|---|---|
| Windows | win10 | HBuilderX |
产品分类:uniapp/App
PC开发环境操作系统:Windows
HBuilderX类型:正式
HBuilderX版本号:3.2.9
手机系统:iOS
手机系统版本号:iOS 11.4
手机厂商:苹果
手机机型:MQA82CH/A
页面类型:vue
vue版本:vue2
打包方式:云端
示例代码:
uni.uploadFile({ url: uni.getStorageSync(‘serviceUrl’) + ‘fixedPlacePatrol/add’, name: ‘files’, fileType: “image”, files: […this.userInfo.map((item, index) => ({ name: “” + index, uri: item })), …this.checkInfo.map(item => item.imgList.map((img, index) => ({ name: item.id + “-” + index, uri: img }))).flat(2)], formData: { userId: uni.getStorageSync(“USERBEAN”).id, placeId: this.id, …(this.taskId ? { taskId: this.taskId } : {}), placeName: this.name, placeType: this.placeType, checkUser: uni.getStorageSync(“USERBEAN”).name, checkResult: JSON.stringify(this.checkInfo.map(item => ({ id: item.id, inspection: item.inspection, result: item.result }))), suggestion: this.remark, startCheckTime: this.strtime, inspection: this.slectCheckDirection }, header: { “Authorization”: uni.getStorageSync(‘user_token’), “content-type”: “multipart/form-data” }, method: ‘POST’, success: (uploadFileRes) => { uni.resInterceptor(uploadFileRes); uni.hideLoading(); if (uploadFileRes.statusCode == 200) { var res = JSON.parse(uploadFileRes.data); if (res.code == 200) { uni.showToast({ title: ‘成功’, duration: 2000, complete:() => { setTimeout(() => { uni.navigateBack({ delta: this.taskId ? 2 : 1 }) }, 1000) } }) _this.dateProceed(4) } else { uni.showToast({ title: res.msg, icon: ‘none’ }) this.isEnd = false; } } else { uni.showToast({ title: uploadFileRes.errMsg, icon: ‘none’ }) this.isEnd = false; } }, fail: (err) => { uni.hideLoading(); uni.showToast({ title: ‘网络异常,请稍候再试’, icon: ‘none’ }) this.isEnd = false; }, complete: () => { setTimeout(() => { uni.hideLoading() }, 1000) } })
更多关于uni-app使用IPhone X上传照片时无反应的实战教程也可以访问 https://www.itying.com/category-93-b0.html
问题定位到最新位置,是因为IPHONE X手机拍照后加了水印后上传提交无反应
更多关于uni-app使用IPhone X上传照片时无反应的实战教程也可以访问 https://www.itying.com/category-93-b0.html
使用新版本测试i一下,问题是否解决?
兄弟,问题解决了嘛

