diff --git a/api/index.js b/api/index.js index b28762b..ea0f229 100644 --- a/api/index.js +++ b/api/index.js @@ -28,4 +28,9 @@ export function evaluateAdd(data) { export function evaluateInfo(id) { return fly.get(`/bysmp/evaluate/${id}`) } +//获取毕业生详细信息 +export function selectMzGraduateInfo(pamars) { + return fly.get(`/bysmp/user/selectMzGraduateInfo`,pamars) +} + diff --git a/app.json b/app.json index 103a571..5ca8e48 100644 --- a/app.json +++ b/app.json @@ -5,7 +5,8 @@ "pages/life/life", "pages/serve/serve", "pages/mine/mine", - "pages/register/register" + "pages/register/register", + "pages/webView/webView" ], "subPackages": [ { @@ -35,7 +36,9 @@ "policy/index/index", "policy/detail/detail", "checkOutConfirm/index/index", - "checkOutConfirm/sign/sign" + "checkOutConfirm/sign/sign", + "checkInUser/checkInUser", + "checkInWait/checkInWait" ] }, { diff --git a/pages/index/index.js b/pages/index/index.js index 497f5f4..ec92eab 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -134,4 +134,28 @@ Page({ * 用户点击右上角分享 */ onShareAppMessage() {}, + getUserInfo(){ + getUserInfo().then(res=>{ + // 有身份证号直接去信息确认没有的话就去识别身份证信息 + if(res.data.idCard){ + wx.navigateTo({ + url: `/subpages/index/checkInUser/checkInUser?idCard=${res.data.idCard}`, + }) + }else{ + wx.navigateTo({ + url: `/subpages/OCRCard/pages/index/index`, + }) + + } + }) + }, + navigateTo(e){ + if(e.currentTarget.dataset.url && e.currentTarget.dataset.url != '/subpages/OCRCard/pages/index/index'){ + wx.navigateTo({ + url: e.currentTarget.dataset.url, + }) + }else if(e.currentTarget.dataset.url){ + this.getUserInfo() + } + } }); \ No newline at end of file diff --git a/pages/index/index.wxml b/pages/index/index.wxml index eb56566..350ab01 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -19,8 +19,8 @@ 青岛人彩棉租住房申请条件的先骨干说明 - + {{item.name}} diff --git a/pages/webView/webView.js b/pages/webView/webView.js new file mode 100644 index 0000000..7560ee9 --- /dev/null +++ b/pages/webView/webView.js @@ -0,0 +1,66 @@ +// pages/webView/webView.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/pages/webView/webView.json b/pages/webView/webView.json new file mode 100644 index 0000000..3928faa --- /dev/null +++ b/pages/webView/webView.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/webView/webView.wxml b/pages/webView/webView.wxml new file mode 100644 index 0000000..0b0ee71 --- /dev/null +++ b/pages/webView/webView.wxml @@ -0,0 +1,2 @@ + +pages/webView/webView.wxml \ No newline at end of file diff --git a/pages/webView/webView.wxss b/pages/webView/webView.wxss new file mode 100644 index 0000000..baae063 --- /dev/null +++ b/pages/webView/webView.wxss @@ -0,0 +1 @@ +/* pages/webView/webView.wxss */ \ No newline at end of file diff --git a/project.private.config.json b/project.private.config.json index 62d79b9..8e92420 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -14,12 +14,19 @@ "condition": { "miniprogram": { "list": [ + { + "name": "确认信息", + "pathName": "subpages/index/checkInUser/checkInUser", + "query": "", + "scene": null, + "launchMode": "default" + }, { "name": "新增评价", "pathName": "subpages/mine/evaluate/evaluate", "query": "id=6", - "scene": null, - "launchMode": "default" + "launchMode": "default", + "scene": null }, { "name": "入住记录", @@ -98,13 +105,6 @@ "launchMode": "default", "scene": null }, - { - "name": "subpages/index/checkInUser/checkInUser", - "pathName": "subpages/index/checkInUser/checkInUser", - "query": "", - "launchMode": "default", - "scene": null - }, { "name": "subpages/index/renewalApplication/renewalApplication", "pathName": "subpages/index/renewalApplication/renewalApplication", diff --git a/subpages/OCRCard/pages/OCR/OCR.js b/subpages/OCRCard/pages/OCR/OCR.js index 4f6e422..aa76e34 100644 --- a/subpages/OCRCard/pages/OCR/OCR.js +++ b/subpages/OCRCard/pages/OCR/OCR.js @@ -1,7 +1,8 @@ import { ocrAction, } from '../../../../ocr.js' - import {bindIdCard} from "../../../../api/user" + import {selectMzGraduateInfo} from "../../../../api/index" + const chooseImage = async () => { return new Promise((resolve, reject) => { @@ -24,7 +25,8 @@ import { top: 386, left: 24, width: 666, - height: 464 + height: 464, + info:{} }, onLoad(opt) { wx.setNavigationBarTitle({ @@ -106,7 +108,7 @@ import { success: (res) => { ocrAction(res.tempFiles[0].tempFilePath).then(res=>{ if(res.success){ - that.bindIdCard(res.result.data.idcard_res) + that.selectMzGraduateInfo(res.result.data.idcard_res) } }) }, @@ -116,11 +118,7 @@ import { }) }, - bindIdCard(data){ - bindIdCard({name:data.name.text,idCard:data.id.text}).then(res=>{ - console.log(res); - }) - }, + takePhotoAction(e) { this.setData({ isShowImage: true, @@ -178,7 +176,7 @@ import { success: function (res) { that.setData({ image: res.tempFilePath, - isShowImage: false + isShowImage: true }) wx.hideLoading() ocrAction(res.tempFilePath) @@ -186,6 +184,7 @@ import { that.success(result) }) .catch((e) => { + console.log(e); that.setData({ isShowImage: true }) @@ -208,8 +207,19 @@ import { }) }, success(e) { - if(res.success){ - this.bindIdCard(res.result.data) + if(e.success){ + this.selectMzGraduateInfo(e.result.data.idcard_res) } }, + selectMzGraduateInfo(data){ + selectMzGraduateInfo({idCard:data.id.text}).then(res=>{ + if(res.code === 200){ + wx.navigateTo({ + url: `/subpages/index/checkInUser/checkInUser?idCard=${data.id.text}`, + }) + } + }).catch(err=>{ + console.log(err); + }) + } }) \ No newline at end of file diff --git a/subpages/OCRCard/pages/OCR/OCR.wxml b/subpages/OCRCard/pages/OCR/OCR.wxml index 38190ae..15b8c93 100644 --- a/subpages/OCRCard/pages/OCR/OCR.wxml +++ b/subpages/OCRCard/pages/OCR/OCR.wxml @@ -58,6 +58,7 @@ + @@ -67,6 +68,15 @@ + + + + + + + + + diff --git a/subpages/index/checkInUser/checkInUser.js b/subpages/index/checkInUser/checkInUser.js index face4e7..9afed06 100644 --- a/subpages/index/checkInUser/checkInUser.js +++ b/subpages/index/checkInUser/checkInUser.js @@ -1,19 +1,31 @@ // subpages/index/checkInUser/checkInUser.js +import {bindIdCard} from "../../../api/user" +import {selectMzGraduateInfo} from "../../../api/index" + Page({ /** * 页面的初始数据 */ data: { - + form:{ + graduateName:'', + idCard:'', + telephone:'' + } }, /** * 生命周期函数--监听页面加载 */ onLoad(options) { - - }, + if(options.idCard){ + this.setData({ + 'form.idCard':options.idCard + }) + this.selectMzGraduateInfo() + } + }, /** * 生命周期函数--监听页面初次渲染完成 @@ -62,5 +74,46 @@ Page({ */ onShareAppMessage() { - } + }, + submit(){ + selectMzGraduateInfo({idCard:this.data.form.idCard}).then(res=>{ + if(res.code === 200){ + this.bindIdCard() + if(res.data.signType === 0){ + //线上支付去跳转签合同 + wx.navigateTo({ + url: '/pages/webView/webView', + }) + }else if(res.data.signType === 1){ + // 线下签订去支付 + wx.navigateTo({ + url: '/subpages/OCRCard/pages/deposit/deposit', + }) + }else{ + wx.navigateTo({ + url: `/subpages/index/checkInWait/checkInWait?idCard=${this.data.form.idCard}`, + }) + } + + } + }).catch(err=>{ + console.log(err); + }) + }, + bindIdCard(){ + bindIdCard({idCard:this.data.form.idCard,name:this.data.form.graduateName}).then(res=>{ + console.log(res); + }) + }, + selectMzGraduateInfo(){ + selectMzGraduateInfo({idCard:this.data.form.idCard}).then(res=>{ + if(res.code === 200){ + this.setData({ + form:res.data + }) + } + }).catch(err=>{ + console.log(err); + }) + } }) \ No newline at end of file diff --git a/subpages/index/checkInUser/checkInUser.json b/subpages/index/checkInUser/checkInUser.json index aababa9..e9abe7a 100644 --- a/subpages/index/checkInUser/checkInUser.json +++ b/subpages/index/checkInUser/checkInUser.json @@ -5,6 +5,7 @@ "van-image": "@vant/weapp/image/index", "van-button": "@vant/weapp/button/index", "van-cell": "@vant/weapp/cell/index", - "van-cell-group": "@vant/weapp/cell-group/index" + "van-cell-group": "@vant/weapp/cell-group/index", + "van-field": "@vant/weapp/field/index" } } \ No newline at end of file diff --git a/subpages/index/checkInUser/checkInUser.wxml b/subpages/index/checkInUser/checkInUser.wxml index 4b37733..0cef122 100644 --- a/subpages/index/checkInUser/checkInUser.wxml +++ b/subpages/index/checkInUser/checkInUser.wxml @@ -10,12 +10,10 @@ - - - - + + + - diff --git a/subpages/index/checkInWait/checkInWait.js b/subpages/index/checkInWait/checkInWait.js new file mode 100644 index 0000000..ab905fc --- /dev/null +++ b/subpages/index/checkInWait/checkInWait.js @@ -0,0 +1,98 @@ +// subpages/index/checkInWait/checkInWait.js +import {selectMzGraduateInfo} from "../../../api/index" +Page({ + + /** + * 页面的初始数据 + */ + data: { + idCard:'' + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + if(options.idCard){ + this.setData({ + idCard:options.idCard + }) + } + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + }, + + submit(){ + selectMzGraduateInfo({idCard:this.data.idCard}).then(res=>{ + if(res.code === 200){ + // 线上签订合同跳转信息确认 + if(res.data.signType === 0){ + wx.navigateTo({ + url: '/pages/webView/webView', + }) + }else if(res.data.signType === 1){ + // 线下签订 + wx.navigateTo({ + url: '/subpages/OCRCard/pages/deposit/deposit', + }) + }else{ + // 没有合同信息 + wx.showToast({ + title: '合同准备中,请稍后...', + icon:'none' + }) + } + + } + }).catch(err=>{ + console.log(err); + }) + } +}) \ No newline at end of file diff --git a/subpages/index/checkInWait/checkInWait.json b/subpages/index/checkInWait/checkInWait.json new file mode 100644 index 0000000..3fdc810 --- /dev/null +++ b/subpages/index/checkInWait/checkInWait.json @@ -0,0 +1,10 @@ +{ + + "navigationStyle": "custom", + "usingComponents": { + "navigationBar": "/components/navigationBar/navigationBar", + "van-image": "@vant/weapp/image/index", + "van-button": "@vant/weapp/button/index" + + } +} \ No newline at end of file diff --git a/subpages/index/checkInWait/checkInWait.wxml b/subpages/index/checkInWait/checkInWait.wxml new file mode 100644 index 0000000..820ff4f --- /dev/null +++ b/subpages/index/checkInWait/checkInWait.wxml @@ -0,0 +1,12 @@ + + + + + + 合同准备中,请稍后... + + + + 下一步 + + \ No newline at end of file diff --git a/subpages/index/checkInWait/checkInWait.wxss b/subpages/index/checkInWait/checkInWait.wxss new file mode 100644 index 0000000..8d78c2a --- /dev/null +++ b/subpages/index/checkInWait/checkInWait.wxss @@ -0,0 +1,51 @@ +/* subpages/index/renewalApplication/renewalApplication.wxss */ +page{ + background: #f8f8f8; + +} +.cont { + position: relative; + background: #f8f8f8; + padding: 36rpx; + height: 87vh; +} + +.tip-cont { + position: absolute; + width: 678rpx; + height: 624rpx; + display: flex; + align-items: center; + flex-direction: column; + z-index: 999; + background-color: #fff; + border-radius: 10rpx; + top: 214rpx; + + +} + +.cusImage { + margin-top: 90rpx; +} + +.txt { + margin-top: 100rpx; + padding: 0 32rpx; +} + +.des { + margin-top: 38rpx; + line-height: 46rpx; + font-size: 32rpx; + +} + + +.btn { + position: absolute; + top: 390px; + max-width: 440rpx; + width: calc(100% - 10rpx); + height: 80rpx; +} \ No newline at end of file diff --git a/subpages/index/checkOutConfirm/index/index.wxml b/subpages/index/checkOutConfirm/index/index.wxml index 256a1ef..87aea03 100644 --- a/subpages/index/checkOutConfirm/index/index.wxml +++ b/subpages/index/checkOutConfirm/index/index.wxml @@ -3,7 +3,7 @@ - 身份证识别 + 退房确认