| | |
| | | }); |
| | | } |
| | | |
| | | // 获取案例 |
| | | function getCaseApi(submitData) { |
| | | return $$.request({ |
| | | url: 'case-law/get-case', |
| | | type: 'post', |
| | | ai: true, |
| | | submitData, |
| | | service: 'mediate', |
| | | }); |
| | | } |
| | | |
| | | function caseRegisterSaveApi(submitData) { |
| | | return $$.request({ |
| | |
| | | }); |
| | | 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({ |
| | |
| | | saveStatus: true |
| | | }) |
| | | } |
| | | const res1 = await getCaseApi({ |
| | | caseDes: params.caseDes, |
| | | caseClaim: params.caseClaim, |
| | | caseId: params.id, |
| | | }); |
| | | if (res1.type) { |
| | | wx.setStorage({ |
| | | key: 'AICase', |
| | | data: { |
| | | caseDes: params.caseDes, |
| | | caseClaim: params.caseClaim, |
| | | caseId: params.id, |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | //选择纠纷类型 、跳转事项概况语音描述,跳转事项申请语音描述 |
| | |
| | | // 图片识别 |
| | | 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 |
| | | }); |
| | | } |
| | | }, |