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

Merge branch 'feature/zl' into 'release'

Feature/zl

See merge request !248
......@@ -16,7 +16,6 @@ export const getJumpPageStatus = ({externalOrderNo, yunOrderNo, projectEquityNo}
withCredentials: true,
});
};
// https://dev-sc.yunqueyi.com/tis/insurance/create/order
export const createOrder = (data) => {
return request({
......@@ -27,11 +26,27 @@ export const createOrder = (data) => {
});
};
// tis/insurance/makeAppointmentStatus?yunOrderNo=PCX2023021608340000000709043
export const getAppointmentStatus = (yunOrderNo) => {
export const getLanZhouFlag = (externalOrderNo) => {
return request({
method: 'get',
url: `/tis/insurance/makeAppointmentStatus?yunOrderNo=${yunOrderNo}`,
url: `/tis/insurance/common/lanZhou/flag/${externalOrderNo}`,
withCredentials: true,
});
};
export const createOrderSz = (data) => {
return request({
url: '/tis/insurance/middleware/create/order/sz',
method: 'POST',
withCredentials: true,
data,
});
};
export const createOrderSzV2 = (data) => {
return request({
url: '/tis/insurance/middleware/create/order/sz/v2',
method: 'POST',
withCredentials: true,
data,
});
};
......@@ -121,11 +121,21 @@ const routerConfig = [
name: 'sz-home',
component: () => import('@/views/sz-home/index.vue'),
},
{
path: '/lz-home',
name: 'lz-home',
component: () => import('@/views/lz-home/index.vue'),
},
{
path: '/sz-public',
name: 'sz-public',
component: () => import('@/views/sz-public/index.vue'),
},
{
path: '/sz-public-new',
name: 'sz-public-new',
component: () => import('@/views/sz-public-new/index.vue'),
},
{
path: '/entitlement',
name: 'entitlement',
......
......@@ -59,8 +59,6 @@
:path="`pagesInsurance/all-entrance/index?channelSource=insurance_channel&projectEquityNo=${item.projectEquityNo}&yunOrderNo=${item.yunOrderNoFirst_self}&detectionKind=${item.detectionKind}&tradeDetectionServiceRecordId=${item.tradeDetectionServiceRecordId}`"
:env-version="envVersion"
:extra-data="openWebAppConfig.extraData"
@error="handleErrorFn"
@launch="handleLaunchFn"
>
<script type="text/wxtag-template">
<style>.btn {color: #00bda5;text-align: center;line-height: 36px; width:100%; height: 100%;}</style> <div class="btn">{{ item.btnTxt }}</div>
......@@ -128,12 +126,6 @@
},
mounted() {
// const { query:
// {
// project_equity_no = 'RDSZ20230602011',
// external_order_no = 'SZ202306011000938751'
// }
// } = this.$route;
const {externalOrderNo, projectEquityNo} = this.$route.query;
this.externalOrderNo = externalOrderNo;
this.projectEquityNo = projectEquityNo;
......@@ -141,25 +133,6 @@
this.getEntitlementList(externalOrderNo, projectEquityNo);
this.monitorMiniProgram();
},
// updated() {
// const self = this;
// var launchBtn0 = document.getElementById('launch-btn0');
// if(launchBtn0) {
// launchBtn0.addEventListener('launch', function (e) {
// console.log('success-launch-updated0', e);
// setTimeout(() => {self.showDialog = true;}, 3000);
// });
// }
// var launchBtn1 = document.getElementById('launch-btn1');
// if(launchBtn1) {
// launchBtn1.addEventListener('launch', function (e) {
// console.log('success-launch-updated1', e);
// setTimeout(() => {self.showDialog = true;}, 3000);
// });
// }
// },
methods:{
getBanner(pageType, yunOrderNo) {
......@@ -268,11 +241,7 @@
}
}
// detectionKind 1 早早检(快检) 0 or null DNA甲基化(早筛)
r.title = r.detectionKind == 1 ? '癌症早早检权益领取' : '癌症早检权益领取';
// r.btnTxt = (r.statusCode == '0905' || r.statusCode == '0101' || r.statusCode == '0102' || r.statusCode == '0902') ? '查看结果' : r.statusCode == '0202' ? '预约详情' :
// r.statusCode == '0104' ? '去支付' : r.statusCode == '0201' ? '去预约' : '检测详情';
return r;
});
arr.map((item, index) => {
......@@ -285,16 +254,16 @@
console.log('--arr', arr);
that.entitlementList = arr;
} else {
// that.entitlementList = [];
// that.$router.push(
// {
// path: '/sz-public',
// query: {
// projectEquityNo: projectEquityNo,
// externalOrderNo: externalOrderNo
// },
// }
// );
that.entitlementList = [];
that.$router.replace(
{
path: '/sz-public',
query: {
projectEquityNo: projectEquityNo,
externalOrderNo: externalOrderNo
},
}
);
}
that.$loading.hide();
}
......
<template>
<div class="sz-appoint" />
</template>
<script>
import { getLanZhouFlag} from '@/api/question';
export default {
data() {
return {
projectEquityNo: '',
externalOrderNo: '',
};
},
computed: {
canSubmit() {
return (
this.dectionForm.beneficiaryIdNum &&
this.dectionForm.beneficiaryName &&
this.dectionForm.beneficiaryPhone
);
},
},
mounted() {
const {externalOrderNo} = this.$route.query;
if(externalOrderNo) {
this.getJumpPageStatus(externalOrderNo);
}
},
methods: {
getJumpPageStatus(externalOrderNo) {
getLanZhouFlag(externalOrderNo).then(res => {
if (res.code === '000000') {
const {externalOrderNo, flag, projectEquityNo} = res.data;
let url = '/home';
if(flag == 0) {
url = '/home';
}
if(flag == 1) {
url = '/entitlement';
}
this.$loading.hide();
console.log(externalOrderNo, flag, projectEquityNo, url);
this.$router.replace(
{
path: url,
query: {
projectEquityNo: projectEquityNo,
externalOrderNo: externalOrderNo
},
}
);
}
});
},
}
};
</script>
<style lang="scss" scoped>
.sz-appoint {
width: 100%;
height: 100vh;
overflow: auto;
box-sizing: border-box;
color: #ffffff;
background: #F3FCFF;
}
</style>
<template>
<div class="sz-appoint">
<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/2023061315234016.png"
alt="success"
>
</div>
<div class="wrap-reg">
<div
class="sz-appoint-form-tips"
>
<van-icon
name="warning-o"
class="tips-icon"
/> 请参保人填写本人相关信息
</div>
<div class="choose-section">
<van-form
ref="dectionForm"
validate-first
>
<van-field
v-model="dectionForm.name"
label="参保人姓名"
clearable
required
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.idCard"
class="appoint-form-items"
clearable
required
label="参保人身份证"
placeholder="点击此处输入"
:rules="[{ required: true, message: '请输入真实身份证号' },
{
pattern: /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/,
message: '身份证号格式填写有误',
},]"
/>
<van-field
v-model="dectionForm.mobilePhone"
class="appoint-form-items"
label="参保人手机号"
label-width="100%"
clearable
required
placeholder="点击此处输入"
:rules="[{ required: true, message: '请输入手机号' },
{
pattern: /^([1][3,4,5,6,7,8,9])\d{9}$/,
message: '手机号格式填写有误',
},]"
>
<template #label>
<div class="phone-wrap">
参保人手机号 <span class="sm-grey">该手机号将用于接收预约信息</span>
</div>
</template>
</van-field>
</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>
<van-popup
v-model="showProtocol"
:style="{ height: '230px',width: '300px', }"
:transition-appear="false"
:close-on-click-overlay="false"
>
<div
v-if="showProtocol"
class="protocol-content"
>
<div class="block70 f20">身份校验通过</div>
<div class="block70">
请点击“领取权益”按钮填写预约领取信息
</div>
<div class="submit-button submit-button-empty">
<wx-open-launch-weapp
id="launchBtn"
style="position: absolute; top: 0; left: 0; width: 100%; height: 100%"
:username="openWebAppConfigPositive.username"
:path="openWebAppConfigPositive.path"
:env-version="envVersion"
@error="handleErrorFn"
@launch="handleLaunchFn"
>
<script type="text/wxtag-template">
<style>.btn {position:absolute; top: -3px; color: #ffffff;text-align: center;line-height: 50px; font-size: 16px; font-weight: 500; left: 0; width:100%; height: 100%;}</style> <div class="btn">领取权益</div>
</script>
</wx-open-launch-weapp>
</div>
</div>
</van-popup>
</div>
</template>
<script>
import { createOrderSzV2} from '@/api/question';
let that;
export default {
data() {
return {
projectEquityNo: '',
externalOrderNo: '',
picaWechat:window._picaWechat,
headerInfo: {
title: '完善个人信息',
isBlack: true,
backMethod: 'web',
style: 'backgroundColor:#ffffff;zIndex:100;',
background: '',
},
dectionForm: {
mobilePhone: '',
idCard:'',
name: '',
},
showProtocol:false,
// envVersion: VUE_APP_ENV == 'production' ? 'release' : 'trial',
envVersion:'trial',
openWebAppConfigPositive:{
username:'gh_e92f58174364', // 小程序唯一username 1.gh_80d54796f2d5 云鹊助手 2. gh_e92f58174364 云鹊健康
path:'pagesInsurance/all-entrance/index', // 打开页面
extraData: JSON.stringify({})
},
};
},
computed: {
canSubmit() {
return (
this.dectionForm.idCard &&
this.dectionForm.name &&
this.dectionForm.mobilePhone
);
},
},
mounted() {
that = this;
const {externalOrderNo, projectEquityNo} = this.$route.query;
this.projectEquityNo = projectEquityNo;
this.externalOrderNo = externalOrderNo;
// this.$loading.show();
},
methods: {
// 创建深圳订单
createOrderSz() {
const { externalOrderNo, projectEquityNo } = this;
const data = {
...this.dectionForm,
projectEquityNo,
};
if(externalOrderNo) {
data['externalOrderNo'] = externalOrderNo;
}
createOrderSzV2(data).then((res) => {
console.log(res);
if(res.code == '000000') {
const {yunOrderNo, statusCode, externalOrderNo} = res.data;
if(statusCode == '0103') {
this.showProtocol = true;
this.openWebAppConfigPositive.path = `pagesInsurance/all-entrance/index?channelSource=insurance_channel&projectEquityNo=${projectEquityNo}&yunOrderNo=${yunOrderNo}&externalOrderNo=${externalOrderNo}`;
console.log('-openWebAppConfigPositive', this.openWebAppConfigPositive);
}else{
this.$router.replace(
{
path: '/entitlement',
query: {
projectEquityNo: projectEquityNo,
externalOrderNo: externalOrderNo
},
}
);
}
}else{
this.$toast(res.message);
}
});
},
appointment() {
this.$refs.dectionForm.validate().then(result => {
console.log('this.dectionForm', result);
this.createOrderSz();
}).catch(err => {
console.log(err);
});
},
handleErrorFn(e) {
console.log('handleErrorFn', e);
},
handleLaunchFn(e) {
console.log('handleLaunchFn', e);
that.showProtocol = false;
},
}
};
</script>
<style lang="scss" scoped>
.sz-appoint {
width: 100%;
height: 100vh;
overflow: auto;
box-sizing: border-box;
color: #ffffff;
background: #F3FCFF;
.insurance-register-bg{
width: 100%;
position: relative;
.bg-img{
width: 100%;
img{
width: 100%;
height: 100%;
}
}
.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: 93px;
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: #212121;
}
}
.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;
}
.sz-appoint-form-tips {
display: flex;
padding: 10px 15px;
background: linear-gradient(99deg, #fffbe5 0%, #fdfcf8 100%);
border-radius: 22px 22px 0px 0px;
font-size: 12px;
font-weight: 400;
color: #dc780c;
align-items: center;
.tips-icon {
margin-right: 7px;
}
}
/deep/.van-cell{
display: block;
font-weight: 300;
font-size: 14px;
}
.phone-wrap{
.sm-grey{
font-weight: 100;
color: #999999;
font-size: 12px;
}
}
.protocol-content{
padding: 20px;
border-radius: 20px;
}
.block70{
font-size: 14px;
color: #212121!important;
text-align: center;
margin-top: 15px;
}
.f20{
font-size: 20px;
}
.submit-button {
position: relative;
height: 40px;
border-radius: 20px;
color: #ffffff;
font-size: 16px;
display: flex;
align-items: center;
background: #00BDA5;
justify-content: center;
width: 130px;
margin: 0 auto;
margin-top: 30px;
}
/deep/.van-popup--center{
border-radius: 20px;
}
}
</style>
......@@ -2,7 +2,7 @@
<div class="insurance-sz">
<div class="text">
<img
src="https://files.yunqueyi.com/image/png/common/20230620135424634.png"
:src="insuranceText.logoUrl"
alt=""
>
</div>
......@@ -81,6 +81,7 @@
<script>
// const { VUE_APP_ENV } = process.env;
import {getEntitlementList} from '@/api/entitlement';
import {getDetailtxt} from '@/api/appoint';
let that;
export default {
data() {
......@@ -98,6 +99,9 @@
extraData: JSON.stringify({})
},
routerInfo:{},
insuranceText:{
logoUrl: ''
}
};
},
mounted() {
......@@ -107,18 +111,14 @@
this.openWebAppConfigPositive.path = `pagesInsurance/all-entrance/index?channelSource=insurance_channel&projectEquityNo=${projectEquityNo}&externalOrderNo=${externalOrderNo}&detectionKind=1`;
console.log('-this.openWebAppConfigPositiv', this.openWebAppConfigPositive);
this.vis();
this.getDetailtxt(projectEquityNo);
},
methods: {
vis() {
document.addEventListener('visibilitychange', function() {
console.log('--22', document.visibilityState);
if(document.visibilityState == 'visible') {
console.log('进入前台');
that.getEntitlementList();
}
if(document.visibilityState == 'hidden') {
console.log('切换到后台');
}
});
},
handleErrorFn(e) {
......@@ -147,6 +147,15 @@
}
});
},
getDetailtxt(projectEquityNo) {
const o = {
yunOrderNo: projectEquityNo,
pageType: 5
};
getDetailtxt(o).then(res => {
this.insuranceText = res.data;
});
}
}
};
</script>
......@@ -159,9 +168,6 @@
padding-bottom: 70px;
height: 712px;
background: #fff;
// .text{
// }
.bottom{
position: fixed;
bottom: 0;
......
......@@ -36,7 +36,7 @@ module.exports = {
port: 8083,
proxy: {
'/proxy': {
target: 'https://dev-sc.yunqueyi.com/',
target: 'https://test1-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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册