Browse Source

身份证识别姓名

epass
mk 1 month ago
parent
commit
6b45da6b5a
  1. 7
      subpages/OCRCard/pages/OCR/OCR.js
  2. 3
      subpages/index/checkInUser/checkInUser.js
  3. 3
      subpages/mine/checkInEvaluate/checkInEvaluate.js
  4. 4
      utils/config.js

7
subpages/OCRCard/pages/OCR/OCR.js

@ -115,12 +115,11 @@ import {
ocrAction(res.tempFiles[0].tempFilePath).then(res=>{ ocrAction(res.tempFiles[0].tempFilePath).then(res=>{
console.log(res); console.log(res);
wx.navigateTo({ wx.navigateTo({
url: `/subpages/index/checkInUser/checkInUser?idCard=${res.result.data.idcard_res.id.text}&type=${this.data.type}`, url: `/subpages/index/checkInUser/checkInUser?idCard=${res.result.data.idcard_res.id.text}&type=${this.data.type}&name=${res.result.data.idcard_res.name.text}`,
}) })
}).catch(err=>{ }).catch(err=>{
wx.navigateTo({ wx.navigateTo({
url: `/subpages/index/checkInUser/checkInUser?idCard=${res.result.data.idcard_res}&type=${this.data.type}`, url: `/subpages/index/checkInUser/checkInUser?idCard=${res.result.data.idcard_res}&type=${this.data.type}&name=${res.result.data.idcard_res.name.text}`,
}) })
}) })
}, },
@ -221,7 +220,7 @@ import {
success(e) { success(e) {
console.log(e); console.log(e);
wx.navigateTo({ wx.navigateTo({
url: `/subpages/index/checkInUser/checkInUser?idCard=${e.result.data.idcard_res.id.text}&type=${this.data.type}`, url: `/subpages/index/checkInUser/checkInUser?idCard=${e.result.data.idcard_res.id.text}&type=${this.data.type}&name=${e.result.data.idcard_res.name.text}`,
}) })
}, },
}) })

3
subpages/index/checkInUser/checkInUser.js

@ -29,7 +29,8 @@ Page({
if (options) { if (options) {
this.setData({ this.setData({
'form.idCard': options.idCard, 'form.idCard': options.idCard,
'form.telephone':app.globalData.userInfo.phone, 'form.telephone':app.globalData.userInfo.phone || '',
'form.graduateName': options.name,
type: options.type || '' type: options.type || ''
}) })
} }

3
subpages/mine/checkInEvaluate/checkInEvaluate.js

@ -27,6 +27,9 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {
this.setData({
list:[]
})
this.getList() this.getList()
}, },

4
utils/config.js

@ -13,8 +13,8 @@ module.exports = {
}; };
function BASEURL() { function BASEURL() {
// return 'https://zsbz.qdcfy.com/mz-api' return 'https://zsbz.qdcfy.com/mz-api'
return 'http://219.146.91.110:30801/mz-api' // return 'http://219.146.91.110:30801/mz-api'
// return 'https://epmet-test.elinkservice.cn/api/' // return 'https://epmet-test.elinkservice.cn/api/'
} }

Loading…
Cancel
Save