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

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

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