问题模块 框架类型 问题类型 API/组件名称 终端类型 微信版本 基础库版本
API和组件 微信小程序 Bug Camera 客户端 6.7.2 v1.02.1808300
- 微信小程序Camera组件调用摄像头持续自动拍照上传,
部分手机无法按照预期自动拍照(华为手机尤其明显),
而且2~3分钟后手机发烫,电量耗费严重。
- 所有手机自动拍照上传,得到后台响应后再继续拍第二张进行上传
-
arwxAPI.taskSequence()
.then(() => arwxAPI.uploadFile({
url: app.globalData.origin + '/ar-service/api/v1/info/upload',
filePath: url,
name: 'file',
header: {
"Content-Type": "multipart/form-data"
},
formData: {
'openId': openID,
'latitude': this.data.userPoint.lat === undefined ? '' : this.data.userPoint.lat,
'longitude': this.data.userPoint.lng === undefined ? '' : this.data.userPoint.lng
}
}))
.then(res => {
//将获取的结果置入
let resultJson = JSON.parse(res.data);
if (resultJson.payload != null && resultJson.payload.infos.length > 0) {
let resultList = [];
for (let num = 0; num < resultJson.payload.infos.length; num++) {
let item = resultJson.payload.infos[num];
let isSame = this.data.resultList.some((val, key) => {
return val.itemId == item.arCode
});
if (!isSame) {
resultList.push({
itemId: item.arCode,
itemIcon: item.iconPath,
itemName: item.title,
content: item.info,
video: item.videoUrl,
dealerList: [{
name: resultJson.payload.dealerName,
addr: resultJson.payload.dealerAddr,
distance: '距离' + resultJson.payload.dealerLength + '公里',
phone: resultJson.payload.dealerTel,
isFavor: false
},
{
name: resultJson.payload.fdName,
addr: resultJson.payload.fdAddr,
distance: '距离' + resultJson.payload.fdLength + '公里',
phone: resultJson.payload.fdTel,
isFavor: true
}
]
});
//弹出扫描结果页面
this.setData({
resultLogo: resultList[0].itemIcon
});
this.setData({
resultscan: true,
scanSuccess: true,
});
this.resultRingAnimation();
}
}
setTimeout(() => {
this.setData({
resultscan: false
});
}, 3500);
let newResultList = this.data.resultList.concat(resultList);
this.setData({
resultList: newResultList.reverse()
});
}
本文网址:http://www.91bianli.com/weixinxiaochengxu/48126.html