mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-10 12:46:43 +08:00
根据姓名以及身份证号码获取用户信息后 根据出参添加后续代码逻辑
This commit is contained in:
@@ -6,12 +6,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div style="margin-top: 120px;">
|
<div style="margin-top: 120px;">
|
||||||
<van-cell-group>
|
<van-cell-group>
|
||||||
<van-field v-model="name" v-validate="'required|salename'" label="姓名" />
|
<van-field v-model="name" v-validate="'required|salename'" label="姓名" name="姓名"/>
|
||||||
<van-field v-model="idNo" v-validate="'required|idNo'" label="身份证号" maxlength="18"/>
|
<van-field v-model="idNo" v-validate="'required|idNo'" label="身份证号" name="身份证号" maxlength="18"/>
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
</div>
|
</div>
|
||||||
<van-button type="danger" class="bottom-btn" @click="nextStep" v-no-more-click="1000">确定</van-button>
|
<van-button type="danger" class="bottom-btn" @click="nextStep" v-no-more-click="1000">确定</van-button>
|
||||||
<van-dialog class="text-center" v-model="isCaptchaModalShow" title="请输入验证码" :before-close="onCaptchaConfirm">
|
<van-dialog class="text-center" v-model="isCaptchaModalShow" title="请输入验证码">
|
||||||
<div style="margin-top: 20px;margin-bottom: 20px;">
|
<div style="margin-top: 20px;margin-bottom: 20px;">
|
||||||
<van-field v-model="mobile" label="手机号码" readonly/>
|
<van-field v-model="mobile" label="手机号码" readonly/>
|
||||||
<van-field v-model="code" type="number" v-validate="'required|onlyNumber'" maxlength="6" center clearable label="短信验证码" placeholder="请输入短信验证码">
|
<van-field v-model="code" type="number" v-validate="'required|onlyNumber'" maxlength="6" center clearable label="短信验证码" placeholder="请输入短信验证码">
|
||||||
@@ -22,6 +22,9 @@
|
|||||||
</template>
|
</template>
|
||||||
</van-field>
|
</van-field>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="bottom">
|
||||||
|
<van-button type="danger" @click="onCaptchaConfirm" style="width:80%;margin-bottom: 20px;">确定</van-button>
|
||||||
|
</div>
|
||||||
</van-dialog>
|
</van-dialog>
|
||||||
<van-dialog class="text-center nobutton" v-model="isNoButtonModalShow" title="提示">
|
<van-dialog class="text-center nobutton" v-model="isNoButtonModalShow" title="提示">
|
||||||
<div style="margin-top: 20px;margin-bottom: 70px;margin-top: 50px;">
|
<div style="margin-top: 20px;margin-bottom: 70px;margin-top: 50px;">
|
||||||
@@ -33,7 +36,9 @@
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
import {Field, CellGroup} from "vant";
|
import {Field, CellGroup} from "vant";
|
||||||
import { getAuthCode } from '@/api/ebiz/sale/sale'
|
import { getAuthCode, autchCodeCheck } from '@/api/ebiz/sale/sale'
|
||||||
|
import { getContractInfo, putContractInfo } from '@/api/ebiz/YB_agentSign/YB_agentSign'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'YB_agentSign_step1',
|
name: 'YB_agentSign_step1',
|
||||||
components: {
|
components: {
|
||||||
@@ -47,25 +52,53 @@ export default {
|
|||||||
isCaptchaModalShow:false,
|
isCaptchaModalShow:false,
|
||||||
isNoButtonModalShow: false,
|
isNoButtonModalShow: false,
|
||||||
mobile:'',
|
mobile:'',
|
||||||
oldmobile:'15924432886',
|
oldmobile:'',
|
||||||
code:'',
|
code:'',
|
||||||
countDownNum: 0,
|
countDownNum: 0,
|
||||||
|
uuid: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.mobile = this.dataMaskingMobile(this.oldmobile)
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async nextStep(){
|
async nextStep(){
|
||||||
let valid = await this.$validator.validate()
|
let valid = await this.$validator.validate()
|
||||||
if (true === valid) {
|
if (true === valid) {
|
||||||
this.isCaptchaModalShow = true
|
let params = {
|
||||||
|
idType: "0",
|
||||||
|
idNo: this.idNo,
|
||||||
|
name: this.name
|
||||||
|
}
|
||||||
|
getContractInfo(params).then(res => {
|
||||||
|
if (res.result == 0) {
|
||||||
|
if(res.content.uuid){
|
||||||
|
this.isCaptchaModalShow = true
|
||||||
|
this.uuid = res.content.uuid
|
||||||
|
if(res.content.phone){
|
||||||
|
this.oldmobile = res.content.phone
|
||||||
|
this.mobile = this.dataMaskingMobile(this.oldmobile)
|
||||||
|
}else{
|
||||||
|
this.$toast('当前代理人没有手机号码信息')
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
this.$toast(res.content.message)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.$toast(res.resultMessage)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
})
|
||||||
// this.isNoButtonModalShow = true
|
// this.isNoButtonModalShow = true
|
||||||
} else {
|
} else {
|
||||||
return this.$toast(this.$validator.errors.all()[0])
|
return this.$toast(this.$validator.errors.all()[0])
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async getCaptcha() {
|
async getCaptcha() {
|
||||||
|
if(!this.oldmobile){
|
||||||
|
this.$toast('当前代理人没有手机号码信息,不能获取验证码');
|
||||||
|
return false
|
||||||
|
}
|
||||||
let data = {
|
let data = {
|
||||||
operateType: 'appntInfoEntry',
|
operateType: 'appntInfoEntry',
|
||||||
type: 'H5',
|
type: 'H5',
|
||||||
@@ -90,9 +123,24 @@ export default {
|
|||||||
this.$toast(res.resultMessage)
|
this.$toast(res.resultMessage)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onCaptchaConfirm(){
|
async onCaptchaConfirm(){
|
||||||
this.isCaptchaModalShow = false
|
if (!this.sid) {
|
||||||
this.$router.push({ path: '/YB_agentSign/step2' })
|
return this.$toast('请先获取验证码')
|
||||||
|
}
|
||||||
|
if (!this.code.trim()) {
|
||||||
|
return this.$toast('请输入验证码')
|
||||||
|
}
|
||||||
|
let res = await autchCodeCheck({
|
||||||
|
smsId: this.sid,
|
||||||
|
code: this.code
|
||||||
|
})
|
||||||
|
if (res.result === '0') {
|
||||||
|
this.code = ''
|
||||||
|
this.isCaptchaModalShow = false
|
||||||
|
this.$router.push({ path: '/YB_agentSign/step2',query:{uuid:this.uuid} })
|
||||||
|
} else {
|
||||||
|
this.$toast(res.resultMessage)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
dataMaskingMobile(mobile) {
|
dataMaskingMobile(mobile) {
|
||||||
let str = ''
|
let str = ''
|
||||||
@@ -140,4 +188,7 @@ export default {
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/deep/ .van-dialog__footer{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -88,36 +88,27 @@
|
|||||||
}, 1000)
|
}, 1000)
|
||||||
},
|
},
|
||||||
sign() {
|
sign() {
|
||||||
// this.$toast.loading({
|
this.toAirSign('0', '签字日期', '-150', '2')
|
||||||
// duration: 0, // 持续展示 toast
|
|
||||||
// forbidClick: true, // 禁用背景点击
|
|
||||||
// loadingType: 'spinner',
|
|
||||||
// message: '加载中……'
|
|
||||||
// })
|
|
||||||
EWebBridge.webCallAppInJs('ca_sign', {
|
|
||||||
//身份证号码
|
|
||||||
number: '150429199106185911',
|
|
||||||
//姓名
|
|
||||||
name: '刘晓峰',
|
|
||||||
type: '1',
|
|
||||||
keyword: '签字日期',
|
|
||||||
pageNo: '1',
|
|
||||||
index: '1',
|
|
||||||
offset: '-150',
|
|
||||||
pos: '3',
|
|
||||||
signatureWidth: this.$utils.signParams().signatureWidth,
|
|
||||||
signatureHeight: this.$utils.signParams().signatureHeight
|
|
||||||
}).then(data => {
|
|
||||||
// this.$toast.clear()
|
|
||||||
if (JSON.parse(data).state == '1') {
|
|
||||||
this.base64 = decodeURI(JSON.parse(data).sign)
|
|
||||||
this.isDisabledComplite = false
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
goNext(){
|
goNext(){
|
||||||
|
|
||||||
}
|
},
|
||||||
|
toAirSign(status, keyword, offset, originStatus) {
|
||||||
|
localStorage.setItem(
|
||||||
|
'signInfo',
|
||||||
|
JSON.stringify({
|
||||||
|
originStatus: originStatus,
|
||||||
|
idNo: this.saleInsuredInfo.idNo,
|
||||||
|
name: this.saleInsuredInfo.name,
|
||||||
|
type: this.saleInsuredInfo.idType,
|
||||||
|
keyword: keyword,
|
||||||
|
status: status,
|
||||||
|
offset: offset,
|
||||||
|
originUrl: location.href
|
||||||
|
})
|
||||||
|
)
|
||||||
|
window.location.href = this.$mainUrl + '/sign/index.html'
|
||||||
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
listenChange() {
|
listenChange() {
|
||||||
|
|||||||
Reference in New Issue
Block a user