2105关注7136浏览
以下是我的方法,请问是怎么回事呢?
doWordIndentify: function () {
var that = this
that.setData({
showOcrResult: false
})
data: {
ocrImgUrl: null
}
wx.chooseImage({
count: 1,
sizeType: ['compressed'],
sourceType: ['album', 'camera'],
success: function (res) {
var tempfilePath = res.tempFilePaths[0]
that.setData({
ocrImgUrl: tempfilePath,
})
console.log(tempfilePath)
wx.uploadFile({
url: 'https://zs.nxxxjs.top/API/getImage',
filePath: tempfilePath,
name: 'file',
formData: {
'user': 'test'
},
success: function (res) {
wx.showToast({
title: '解析成功',
icon: 'succes',
duration: 1000,
mask: true
})
var carN = res.data
console.log(carN)
console.log(carN[0])
var carN1 = carN.slice(15,-4)
console.log(carN1)
that.setData({
inputTxt1: carN1,
})
//do something
}, fail: function (err) {
console.log(err)
}
})
},
fail: function (res) {
// fail
},
complete: function (res) {
// complete
}
})
},
-
至过去的我
2044人对此回答表示赞同
我是未来的你,你现在是不是在年找寻小程序答案。你不要感觉诧异,给你来信原因,就是让你不在后悔。今天去学习如何推广小程序,相信......点击查看更多> -
Elijah
4人对此回答表示赞同
这是个遗留很久的问题了。。
展开41回复分享发布于 5年前评论(1)
收起评论
我知道!我看过那个帖子,然鹅这都九月了。。