wx.serviceMarket.invokeService({
service: 'wx2d1fd8562c42cebb',
api: 'analyzeFace',
data: {
"Action": "AnalyzeFace",
"Image": val
}
}).then(res => {
if (res.data.Error?.Code === 'InvalidParameterValue.NoFaceInPhoto') {
that.$msg.msg(res.data.Error.Message)
} else {
if (!res.data.FaceShapeSet) return
that.info.width = res.data.ImageWidth
that.info.height = res.data.ImageHeight
let propor = that.imgWidth / res.data.ImageWidth
let pointList = []
res.data.FaceShapeSet.forEach(face => {
Object.keys(face).forEach(item => {
pointList = pointList.concat(face[item])
})
})
}).catch(err => {
console.error('invokeService fail', err)
})
https:
看报错信息是重试超时了啊,我看你截图好像是开发者工具的呀?
是真机的网络信号不太好吗?图片太高清了?换个图片试试呢?
或者找接口服务商,问问他们怎么优化下。