| | |
| | | }); |
| | | return; |
| | | } |
| | | if (!this.data.fileList?.length <= 0) { |
| | | // 附件上传提示 |
| | | this.setData({ |
| | | showFileTip: true |
| | | }) |
| | | return; |
| | | } |
| | | // if (!this.data.fileList?.length <= 0) { |
| | | // // 附件上传提示 |
| | | // this.setData({ |
| | | // showFileTip: true |
| | | // }) |
| | | // return; |
| | | // } |
| | | // 提交AI接口 |
| | | this.getaw(newData); |
| | | this.setData({ |
| | |
| | | // 图片识别 |
| | | ocrClick(e) { |
| | | let key = e.currentTarget.dataset.key; |
| | | let keyNum = e.currentTarget.dataset.keyNum; |
| | | let keyNum = e.currentTarget.dataset.keynum; |
| | | let that = this; |
| | | wx.chooseMedia({ |
| | | count: 1, |
| | |
| | | } |
| | | let wordsResult = data?.ocrResult?.wordsResult.join(''); |
| | | let wordsResultNum = data?.ocrResult?.wordsResultNum; |
| | | console.log('wordsResult', wordsResult); |
| | | that.setData({ |
| | | submitData: { |
| | | ...that.data.submitData, |
| | | [key]: wordsResult |
| | | }, |
| | | [keyNum]: wordsResultNum |
| | | [keyNum]: wordsResult.length |
| | | }); |
| | | } |
| | | }, |