提交 e9352d3d 编写于 作者: zhongyao.qiao's avatar zhongyao.qiao 提交者: 张磊

feat 太保权益领取页用户信息逻辑修改

上级 b4f0fb53
{
"singleQuote": true,
"singleAttributePerLine": true,
"bracketSameLine": false
}
......@@ -9,7 +9,7 @@ export const getButtonStatus = (id) => {
};
// 根据订单号获取跳转页状态/
// /tis/insurance/jumpPageStatus?orderNo=1&projectEquityNo=1
export const getJumpPageStatus = ({externalOrderNo, yunOrderNo, projectEquityNo}) => {
export const getJumpPageStatus = ({ externalOrderNo, yunOrderNo, projectEquityNo }) => {
return request({
method: 'get',
url: `/tis/insurance/jumpPageStatus?externalOrderNo=${externalOrderNo}&projectEquityNo=${projectEquityNo}&yunOrderNo=${yunOrderNo}`,
......@@ -51,7 +51,7 @@ export const createOrderSzV2 = (data) => {
});
};
export const uploadPointData = data => {
export const uploadPointData = (data) => {
return request({
url: '/tis/insurance/promotion_channel/report_data',
method: 'POST',
......@@ -59,3 +59,16 @@ export const uploadPointData = data => {
data,
});
};
/**
* 根据外部单号查询用户信息(太保项目使用)
* TB202309151004000001
* @returns
*/
export const taiBaoUserInfo = (externalOrderNo) => {
return request({
url: `/tis/insurance/common/taiBao/TB202309151004000001/${externalOrderNo}`,
method: 'get',
withCredentials: true,
});
};
......@@ -8,11 +8,7 @@
class="appoint-form-items"
@click="handleOpenPopup"
/>
<van-popup
v-model="visible"
position="bottom"
:transition-appear="false"
>
<van-popup v-model="visible" position="bottom" :transition-appear="false">
<van-datetime-picker
type="date"
title="选择年月日"
......@@ -34,6 +30,10 @@ export default {
type: String,
default: '',
},
readonly: {
type: Boolean,
default: false,
},
},
data() {
return {
......@@ -46,6 +46,7 @@ export default {
methods: {
handleOpenPopup() {
if (this.readonly) return;
this.visible = true;
},
......
......@@ -7,14 +7,14 @@
/>
<div class="insurance-register-bg">
<div class="bg-img back-img">
<img :src="bgPath">
<img :src="bgPath" />
</div>
<div class="wrap-reg">
<div class="choose-section">
<div class="sz-appoint-form-tips">
<img
src="https://files.yunqueyi.com/image/png/common/20230628155802981.png"
>
/>
</div>
<van-form
ref="dectionForm"
......@@ -34,6 +34,7 @@
message: '参保人姓名请填写2-40位',
},
]"
:readonly="isReadonly('name')"
/>
<van-field
:value="cardTypeName"
......@@ -41,8 +42,11 @@
required
disabled
class="appoint-form-items"
right-icon="arrow"
@click="showCardTypeVisible = true"
:right-icon="isReadonly('cardTypeName') ? '' : 'arrow'"
:readonly="isReadonly('cardTypeName')"
@click="
!isReadonly('cardTypeName') && (showCardTypeVisible = true)
"
/>
<van-field
v-model="dectionForm.idCard"
......@@ -52,6 +56,7 @@
label="参保人证件号"
placeholder="点击此处输入"
:rules="rules"
:readonly="isReadonly('idCard')"
/>
<van-field
v-if="dectionForm.idType != 1"
......@@ -63,13 +68,10 @@
<van-radio-group
v-model="dectionForm.sex"
direction="horizontal"
:disabled="isReadonly('sex')"
>
<van-radio :name="1">
</van-radio>
<van-radio :name="2">
</van-radio>
<van-radio :name="1"></van-radio>
<van-radio :name="2"></van-radio>
</van-radio-group>
</template>
</van-field>
......@@ -78,10 +80,14 @@
class="appoint-form-items"
required
label="参保人出生日期"
right-icon="arrow"
:right-icon="isReadonly('birthTime') ? '' : 'arrow'"
:readonly="isReadonly('birthTime')"
>
<template #input>
<DatePicker v-model="dectionForm.birthTime" />
<DatePicker
v-model="dectionForm.birthTime"
:readonly="isReadonly('birthTime')"
/>
</template>
</van-field>
<van-field
......@@ -99,6 +105,7 @@
message: '手机号格式填写有误',
},
]"
:readonly="isReadonly('mobilePhone')"
>
<template #label>
<div class="phone-wrap">
......@@ -114,7 +121,7 @@
:key="ind"
class="bg-img mt20"
>
<img :src="i">
<img :src="i" />
</div>
<!-- <div class="bg-img mt20">-->
<!-- <img-->
......@@ -156,9 +163,7 @@
</van-popup>
<!-- 校验通过弹框 -->
<van-overlay
:show="showProtocol"
>
<van-overlay :show="showProtocol">
<div class="check-popup-wrapper">
<van-icon
name="close"
......@@ -166,9 +171,7 @@
size="25"
@click="showProtocol = false"
/>
<p class="title">
身份校验通过
</p>
<p class="title">身份校验通过</p>
<span class="content">请点击“下一步”进入权益领取流程</span>
<div class="submit-button submit-button-empty">
<wx-open-launch-weapp
......@@ -197,7 +200,11 @@
</template>
<script>
import { createOrderSzV2, uploadPointData } from '@/api/question';
import {
createOrderSzV2,
uploadPointData,
taiBaoUserInfo,
} from '@/api/question';
import { getBanner, getCardTypes } from '@/api/entitlement';
import DatePicker from './date-picker.vue';
let that;
......@@ -237,6 +244,8 @@ export default {
staticINFO: {
logoUrlList: [],
},
// 太保项目用户信息
inherentUserInfo: null,
};
},
computed: {
......@@ -277,7 +286,7 @@ export default {
document.title = '癌筛权益领取';
that = this;
const { externalOrderNo, projectEquityNo, channelCode } = this.$route.query;
if(channelCode) {
if (channelCode) {
this.uploadPointData(channelCode);
}
this.projectEquityNo = projectEquityNo;
......@@ -285,16 +294,60 @@ export default {
// this.$loading.show();
this.getBanner(7, projectEquityNo);
this.loadCardTypes();
if (
this.projectEquityNo === 'TB202309151004000001' &&
this.externalOrderNo
) {
this.getTaiBaoUserInfo();
}
this.$sendBuriedData({
action: 'ACTION_WEB_ENTER',
component_tag: '7802964#0#0#保险入口页面',
web_data:{projectEquityNo: projectEquityNo, externalOrderNo: externalOrderNo, channelCode: channelCode || ''},
web_data: {
projectEquityNo: projectEquityNo,
externalOrderNo: externalOrderNo,
channelCode: channelCode || '',
},
});
},
methods: {
getTaiBaoUserInfo() {
taiBaoUserInfo(this.externalOrderNo)
.then((res) => {
console.log('taibao userinfo', res);
if (!res?.data) return;
const { data } = res;
// const data = {
// mobilePhone: '17621344556',
// idCard: '411302199009092234',
// idType: 2 /** 默认为1:身份证 */,
// name: '乔先生',
// sex: 1,
// birthTime: '1990-09-09',
// };
this.inherentUserInfo = data;
data.mobilePhone && (this.dectionForm.mobilePhone = data.mobilePhone);
data.idCard && (this.dectionForm.idCard = data.idCard);
data.idType && (this.dectionForm.idType = data.idType);
data.name && (this.dectionForm.name = data.name);
data.sex && (this.dectionForm.sex = data.sex);
data.birthTime && (this.dectionForm.birthTime = data.birthTime);
})
.catch((err) => {
console.log(err);
});
},
isReadonly(fieldName) {
if (!this.inherentUserInfo) return false;
return (
this.inherentUserInfo[fieldName] !== null &&
this.inherentUserInfo[fieldName] !== ''
);
},
uploadPointData(channelCode) {
uploadPointData({channelCode});
uploadPointData({ channelCode });
},
async loadCardTypes() {
......@@ -338,7 +391,6 @@ export default {
versionNumber,
projectEquityNo,
lanZhouOldflag,
} = res.data;
if (lanZhouOldflag) {
const url = '/home';
......@@ -347,10 +399,14 @@ export default {
l +
`/pica-insurance${url}?projectEquityNo=${projectEquityNo}&externalOrderNo=${externalOrderNo}`;
window.location.href = hr;
}else if (statusCode == '0103' || versionNumber == 4) {
} else if (statusCode == '0103' || versionNumber == 4) {
this.showProtocol = true;
this.openWebAppConfigPositive.path = `pagesInsurance/all-entrance/index?channelSource=insurance_channel&projectEquityNo=${projectEquityNo}&yunOrderNo=${yunOrderNo}&externalOrderNo=${externalOrderNo}`;
console.log('-this.openWebAppConfigPositive.path', versionNumber, this.openWebAppConfigPositive.path);
console.log(
'-this.openWebAppConfigPositive.path',
versionNumber,
this.openWebAppConfigPositive.path
);
} else {
this.$router.replace({
path: '/entitlement',
......@@ -534,7 +590,6 @@ export default {
justify-content: center;
width: 242px;
margin: 0px auto;
}
/deep/.van-popup--center {
border-radius: 20px;
......@@ -569,17 +624,18 @@ export default {
margin-top: 10px;
background-color: #bee2fd;
}
.check-popup-wrapper{
.check-popup-wrapper {
width: 295px;
height: 227px;
position: fixed;
background: url("https://files.yunqueyi.com/image/png/common/20230830115339979.png") no-repeat center;
background: url('https://files.yunqueyi.com/image/png/common/20230830115339979.png')
no-repeat center;
background-size: 100% 100%;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
.delete-icon{
.delete-icon {
// width: 25px;
// height: 25px;
position: absolute;
......@@ -588,15 +644,15 @@ export default {
top: -36px;
}
.title{
.title {
font-size: 18px;
font-weight: 800;
color: #3C877D;
color: #3c877d;
margin-top: 36px;
padding: 0 24px;
}
.content{
.content {
display: inline-block;
font-size: 16px;
color: #212121;
......@@ -604,11 +660,11 @@ export default {
padding: 0 24px;
}
.next-btn{
.next-btn {
width: 247px;
height: 39px;
margin: 0 auto;
background: #00BDA5;
background: #00bda5;
border-radius: 23px;
color: #fff;
font-size: 18px;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册