提交 83b4ab95 编写于 作者: 张磊's avatar 张磊

Merge branch 'feature/zl' into 'release'

Feature/zl

See merge request !140
......@@ -49,3 +49,20 @@ export const getHospitalList = async(data) => {
withCredentials: true,
});
};
export const getDetailHospital = async (id) => {
return request({
method: 'get',
url: `hospital/hospitals/hospital/${id}/encrypt`,
withCredentials: true,
});
};
export const getCheckInUserInfo = async(data) => {
return request({
method: 'post',
data,
url: '/tis/marketing/checkInUserInfo',
withCredentials: true,
});
};
......@@ -53,6 +53,16 @@ const routerConfig = [
path: '/pdf-preview',
name: 'pdfPreview',
component: () => import('@/views/pdf-preview/index.vue'),
}, //
{
path: '/insurance-register',
name: 'insuranceregister',
component: () => import('@/views/insurance-register/index.vue'),
},
{
path: '/insurance-register-success',
name: 'insuranceregistersuccess',
component: () => import('@/views/insurance-register/register-success.vue'),
},
];
// // 无问卷-0001 有问卷未填写-0101 已填写问卷未出结果-0102 已出结果无需领用-0401 已出结果未预约-0201 已预约未采样-0301 已预约已采样-0302
......
<template>
<div class="insurance-register">
<page-model
v-if="picaWechat != 'wechat'"
ref="PageModel"
:header-info="headerInfo"
/>
<div class="insurance-register-bg">
<div class="bg-img">
<img
src="https://files.yunqueyi.com/image/png/common/20230302151152742.png"
alt="success"
>
</div>
<div class="text">
<span class="text-icon">
<img
src="https://files.yunqueyi.com/image/png/common/20230302152425130.png"
alt="success"
>
</span>
<span class="text-border">&nbsp;&nbsp;&nbsp;&nbsp;{{ hospitalName }} &nbsp;&nbsp;</span>
</div>
<div class="wrap-reg">
<div class="choose-section">
<van-form
ref="dectionForm"
validate-first
>
<van-field
label="被保险人信息"
required
disabled
class="appoint-form-title"
/>
<van-field
v-model="dectionForm.beneficiaryName"
label="被保险人"
clearable
class="appoint-form-items"
placeholder="请输入被保险人姓名"
:rules="[{ required: true, message: '请输入被保险人姓名' },{
pattern: /^[\u4e00-\u9fa5_a-zA-Z0-9]+$/,
message: '请输入正确格式',
},
{
pattern: /^.{2,20}$/,
message: '被保险人姓名请填写2-20位',
},]"
/>
<van-field
v-model="dectionForm.beneficiaryPhone"
class="appoint-form-items"
label="手 机 号"
clearable
placeholder="请输入手机号"
:rules="[{ required: true, message: '请输入手机号' },
{
pattern: /^([1][3,4,5,6,7,8,9])\d{9}$/,
message: '手机号格式填写有误',
},]"
/>
<van-field
v-model="dectionForm.beneficiaryIdNum"
class="appoint-form-items"
clearable
label="身份证号"
placeholder="请输入真实身份证号"
:rules="[{ required: true, message: '请输入真实身份证号' },
{
pattern: /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/,
message: '身份证号格式填写有误',
},]"
/>
</van-form>
</div>
<van-button
round
block
type="info"
:disabled="!canSubmit"
class="appoint-form-submit "
:class="canSubmit ? 'appoint-form-submit-active':''"
@click="appointment"
>
免费领取
</van-button>
</div>
</div>
</div>
</template>
<script>
import { getDetailHospital, getCheckInUserInfo} from '@/api/appoint';
export default {
components: {
},
data() {
return {
picaWechat:window._picaWechat,
headerInfo: {
title: '肠癌早筛权益优先领取登记',
isBlack: true,
backMethod: 'web',
style: 'backgroundColor:#ffffff;zIndex:100;',
background: '',
},
dectionForm: {
beneficiaryPhone: '',
beneficiaryIdNum:'',
beneficiaryName: '',
},
hospitalName:''
};
},
computed: {
canSubmit() {
return (
this.dectionForm.beneficiaryIdNum &&
this.dectionForm.beneficiaryName &&
this.dectionForm.beneficiaryPhone
);
},
},
mounted() {
document.title = '肠癌早筛权益优先领取登记';
// this.$loading.show();
this.getID();
},
methods: {
getID() {
console.log('--res', this.$route);
const {hospitalId} = this.$route.query;
if(hospitalId) {
getDetailHospital(hospitalId).then(res => {
console.log('--res', res);
if (res.code === '000000') {
const {name} = res.data;
this.hospitalName = name;
}
});
}
},
appointment() {
const {projectEquityNo, hospitalId} = this.$route.query;
this.$refs.dectionForm.validate().then(result => {
console.log('this.dectionForm', result);
const data = {
idCard: this.dectionForm.beneficiaryIdNum,
mobilePhone: this.dectionForm.beneficiaryPhone,
patientName: this.dectionForm.beneficiaryName,
hospitalId: hospitalId,
projectEquityNo: projectEquityNo,
idType: 1,
};
getCheckInUserInfo(data).then(res => {
console.log('this.dectionForm', res);
if (res.code === '000000') {
this.$router.push({
path: '/insurance-register-success',
});
}else {
this.$toast(res.message);
}
});
}).catch(err => {
console.log(err);
});
},
},
};
</script>
<style lang="scss" scoped>
.insurance-register {
width: 100%;
height: 100vh;
overflow: auto;
box-sizing: border-box;
color: #ffffff;
background: #F3FCFF;
.insurance-register-bg{
width: 100%;
//height: 350px;
position: relative;
.bg-img{
width: 100%;
//height: 350px;
img{
width: 100%;
height: 100%;
}
}
.text{
position: absolute;
font-size: 10px;
font-weight: 400;
color: #08A588;
top: 131px;
left: 23px;
display: flex;
align-items: center;
.text-icon{
display: inline-block;
width: 17px;
height: 15px;
img{
width: 100%;
height: 100%;
}
}
.text-border{
height: 13px;
line-height: 13px;
display: inline-block;
border-radius: 5px;
border: 1px solid #08A588;
border-left: none;
position: relative;
left: -5px;
box-sizing: content-box;
}
}
.wrap-reg{
width: 350px;
background: linear-gradient(180deg, #FFFFFF 0%, #FFFFFF 100%);
box-shadow: 0px 18px 12px 0px #EBF9F8;
border-radius: 20px;
position: absolute;
top: 170px;
left: 13px;
}
}
.choose-section {
padding: 10px 12px;
background: #ffffff;
border-radius: 11px;
font-weight: 600;
/deep/ .van-field__label{
color: #212121;
}
/deep/ .van-field__control:disabled{
color: #323233;
-webkit-text-fill-color: #323233;
}
.item {
color: #212121;
font-size: 14px;
display: flex;
height: 60px;
align-items: center;
position: relative;
.input-key {
font-weight: 300;
margin-left: 10px;
}
.input-value {
margin-left: 18px;
font-weight: 500;
overflow: visible;
}
.right {
position: absolute;
right: 10px;
top: 25px;
}
}
.height60 {
height: 30px;
}
.required {
position: relative;
}
.required::after {
position: absolute;
content: '*';
display: block;
left: -10px;
top: 0;
text-align: center;
color: rgba(255, 56, 56, 1);
}
}
.appoint-form-items{
/deep/ .van-field__label{
color: #999999;
}
}
.appoint-form-placeholder{
color: #999999;
}
.appoint-form-title::after{
display: none;
}
.appoint-form-submit{
margin-top: 30px;
height: 40px;
background: #D9D9D9;
border-radius: 20px;
border: none;
position: absolute;
font-size: 16px;
font-weight: 600;
}
.appoint-form-submit-active{
background: #00BDA5;
}
}
</style>
<template>
<div class="register-success">
<div class="icon-item">
<img src="https://files.yunqueyi.com/image/png/common/20221213135338128.png">
</div>
<div class="font-big">
信息登记成功
</div>
<div class="font-normal">
请点击下方按钮,完成投保缴费
</div>
<div
class="custom-style"
@click="tomx"
>
立即投保
</div>
</div>
</template>
<script>
export default {
data() {
return {
};
},
created() {
},
methods: {
tomx() {
window.location.href = 'https://yahyb.airiskeys.com/?t=1677741338534';
},
},
};
</script>
<style lang="scss" scoped>
.register-success {
width: 100%;
height: 100vh;
background: #ffffff;
box-sizing: border-box;
padding: 20px 16px;
color: #676869;
text-align: center;
.icon-item {
width: 57px;
height: 65px;
margin: 0 auto;
margin-top: 83px;
image {
width: 100%;
height: 100%;
}
}
.font-big {
margin-top: 22px;
font-size: 20px;
font-weight: 700;
color: #02120f;
}
.font-normal {
margin-top: 12px;
font-size: 15px;
font-weight: 400;
color: #666666;
}
.custom-style {
width: 350px;
height: 40px;
background: #00BDA5;
font-size: 16px;
color: #ffffff;
font-weight: 600;
line-height: 40px;
border-radius: 40px;
border: none;
margin-top: 108px;
}
}
</style>
......@@ -35,7 +35,7 @@ module.exports = {
port: 8083,
proxy: {
'/proxy': {
target: 'https://test1-sc.yunqueyi.com/',
target: 'https://dev-sc.yunqueyi.com/',
// target: 'https://test1-sc.yunqueyi.com/',
// target: 'https://uat-sc.yunqueyi.com/',
// http://10.241.65.90:3000/mock/1071/cs/route/removeUser
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册