From 31e3890c2a6a81bcc22b6f68c129d580df8e1f0c Mon Sep 17 00:00:00 2001
From: liuwh <964324856@qq.com>
Date: Tue, 10 Sep 2024 18:27:40 +0800
Subject: [PATCH] 修改小程序
---
gz-wxparty/pages/register/index.js | 48 +++++++++++++++++++++++++++++++++++++-----------
1 files changed, 37 insertions(+), 11 deletions(-)
diff --git a/gz-wxparty/pages/register/index.js b/gz-wxparty/pages/register/index.js
index 676c490..51f7e56 100644
--- a/gz-wxparty/pages/register/index.js
+++ b/gz-wxparty/pages/register/index.js
@@ -41,6 +41,16 @@
});
}
+// 获取案例
+function getCaseApi(submitData) {
+ return $$.request({
+ url: 'case-law/get-case',
+ type: 'post',
+ ai: true,
+ submitData,
+ service: 'mediate',
+ });
+}
function caseRegisterSaveApi(submitData) {
return $$.request({
@@ -382,13 +392,13 @@
});
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({
@@ -455,6 +465,21 @@
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,
+ }
+ });
+ }
},
//选择纠纷类型 、跳转事项概况语音描述,跳转事项申请语音描述
@@ -468,7 +493,7 @@
// 图片识别
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,
@@ -498,13 +523,12 @@
}
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
});
}
},
@@ -673,7 +697,9 @@
perTypeName: '申请方当事人',
perClass: '09_01001-1',
perClassName: '自然人',
- certiNo: data.idcard || ''
+ certiNo: data.idcard || '',
+ certiType: data.certiType || '09_00015-1',
+ certiTypeName: data.certiTypeName || '身份证',
}]
})
};
--
Gitblit v1.8.0