提交 b7a6ca65 编写于 作者: zhongyao.qiao's avatar zhongyao.qiao

feat 入口增加跳转页面

上级 80ff5bfb
......@@ -28,3 +28,11 @@ export const getCardTypes = () => {
withCredentials: true,
});
};
export const projectMaterial = () => {
return request({
url: 'basic-data/constants/app/no-chars/P336',
method: 'get',
withCredentials: true,
});
};
import { router, } from '@pica-cli/vue-cli-plugin-pica-cli-plugin/auto';
import insuranceBindCode from '@/views/insurance-bind-code/insurance-bind-code';
import insuranceDetectionDetail from '@/views/insurance-detection-detail/insurance-detection-detail';
import insuranceBindCodeSuccess from '@/views/insurance-bindCode-success/insurance-bindCode-success';
import handleAllRouter from '../public_uat';
import insuranceDetectionDetail from '@/views/insurance-detection-detail/insurance-detection-detail';
import { router, } from '@pica-cli/vue-cli-plugin-pica-cli-plugin/auto';
import { headerConfigByMeta } from 'mn-template/util/routerUtil';
import handleAllRouter from '../public_uat';
const routerConfig = [
{
path: '/insuranceBindCode',
......@@ -165,6 +165,11 @@ const routerConfig = [
name: 'protocol',
component: () => import('@/views/login/protocol.vue'),
},
{
path: '/notice',
name: 'notice',
component: () => import('@/views/notice/index.vue'),
},
];
router.beforeEach(async (to, from, next) => {
headerConfigByMeta(to);
......
<template>
<div class="page-wrapper">
<img
v-if="image"
class="image"
:src="image"
/>
</div>
</template>
<script>
export default {
data() {
return {
projectEquityNo: '',
rightsNo: '',
image: '',
};
},
created() {
const { projectEquityNo, rightsNo, image } = this.$route.query;
this.projectEquityNo = projectEquityNo;
this.rightsNo = rightsNo;
this.image = image ? decodeURIComponent(image) : '';
},
mounted() {
this.$sendBuriedData(
{
action: 'ACTION_WEB_ENTER',
component_tag: '7802964#0#0#保险公告',
web_data: {
projectEquityNo: this.projectEquityNo,
rightsNo: this.rightsNo,
},
},
'enter'
);
},
methods: {},
};
</script>
<style lang="scss" scoped>
.page-wrapper {
width: 100%;
.image {
display: block;
width: 100%;
}
}
</style>
......@@ -220,7 +220,7 @@
</template>
<script>
import { getBanner, getCardTypes } from '@/api/entitlement';
import { getBanner, getCardTypes, projectMaterial } from '@/api/entitlement';
import {
createOrderSzV2,
taiBaoUserInfo,
......@@ -272,6 +272,8 @@ export default {
inherentUserInfo: null,
openWebAppConfig_without_yunorder:
'pagesInsurance/all-entrance/index?insurance_without_yunorder=insurance_without_yunorder',
nextConfig: null,
};
},
computed: {
......@@ -341,6 +343,7 @@ export default {
this.userInfo = userInfo || '';
// this.$loading.show();
this.getBanner(7, rightsNo || projectEquityNo);
this.getProjectMaterial();
this.loadCardTypes();
if (
this.projectEquityNo === 'TB202309151004000001' &&
......@@ -393,7 +396,20 @@ export default {
console.log(err);
});
},
getProjectMaterial() {
projectMaterial().then((res) => {
const list = res.data || [];
const target = this.rightsNo || this.projectEquityNo;
const item = list.find((i) => i.no_char === target);
if (item) {
this.nextConfig = {
projectEquityNo: this.projectEquityNo,
rightsNo: this.rightsNo,
image: encodeURIComponent(item.value),
};
}
});
},
isReadonly(fieldName) {
if (!this.inherentUserInfo) return false;
return (
......@@ -439,64 +455,76 @@ export default {
if (rightsNo) {
data['rightsNo'] = rightsNo;
}
createOrderSzV2(data).then((res) => {
console.log(res);
if (res.code == '000000') {
const {
yunOrderNo,
statusCode,
externalOrderNo,
versionNumber,
projectEquityNo,
lanZhouOldflag,
projectEquityNoNext,
yunOrderNoNext,
rightsNo,
encryptPatientId,
} = res.data;
if (rightsNo) {
this.showProtocol = true;
const yo = yunOrderNoNext || yunOrderNo;
const po = projectEquityNoNext || projectEquityNo;
this.openWebAppConfigPositive.path = `pagesInsurance/my-right/index?encryptPatientId=${encryptPatientId}&projectEquityNo=${po}&yunOrderNo=${yo}&externalOrderNo=${externalOrderNo}&rightsNo=${rightsNo}`;
console.log(
'-this.openWebAppConfigPositive.path',
versionNumber,
this.openWebAppConfigPositive.path
);
} else if (lanZhouOldflag) {
const url = '/home';
const l = window.location.origin;
const hr =
l +
`/pica-insurance${url}?projectEquityNo=${projectEquityNo}&externalOrderNo=${externalOrderNo}`;
window.location.href = hr;
} else if (
statusCode == '0103' ||
[4, 5, 6].includes(versionNumber)
) {
this.showProtocol = true;
const yo = yunOrderNo;
const po = projectEquityNo;
this.openWebAppConfigPositive.path = `pagesInsurance/all-entrance/index?channelSource=insurance_channel&projectEquityNo=${po}&yunOrderNo=${yo}&externalOrderNo=${externalOrderNo}`;
console.log(
'-this.openWebAppConfigPositive.path',
this.$loading.show();
createOrderSzV2(data)
.then((res) => {
this.$loading.hide();
console.log(res);
if (res.code == '000000') {
const {
yunOrderNo,
statusCode,
externalOrderNo,
versionNumber,
this.openWebAppConfigPositive.path
);
projectEquityNo,
lanZhouOldflag,
projectEquityNoNext,
yunOrderNoNext,
rightsNo,
encryptPatientId,
} = res.data;
if (this.nextConfig) {
this.$router.replace({
path: '/notice',
query: this.nextConfig,
});
} else if (rightsNo) {
this.showProtocol = true;
const yo = yunOrderNoNext || yunOrderNo;
const po = projectEquityNoNext || projectEquityNo;
this.openWebAppConfigPositive.path = `pagesInsurance/my-right/index?encryptPatientId=${encryptPatientId}&projectEquityNo=${po}&yunOrderNo=${yo}&externalOrderNo=${externalOrderNo}&rightsNo=${rightsNo}`;
console.log(
'-this.openWebAppConfigPositive.path',
versionNumber,
this.openWebAppConfigPositive.path
);
} else if (lanZhouOldflag) {
const url = '/home';
const l = window.location.origin;
const hr =
l +
`/pica-insurance${url}?projectEquityNo=${projectEquityNo}&externalOrderNo=${externalOrderNo}`;
window.location.href = hr;
} else if (
statusCode == '0103' ||
[4, 5, 6].includes(versionNumber)
) {
this.showProtocol = true;
const yo = yunOrderNo;
const po = projectEquityNo;
this.openWebAppConfigPositive.path = `pagesInsurance/all-entrance/index?channelSource=insurance_channel&projectEquityNo=${po}&yunOrderNo=${yo}&externalOrderNo=${externalOrderNo}`;
console.log(
'-this.openWebAppConfigPositive.path',
versionNumber,
this.openWebAppConfigPositive.path
);
} else {
this.$router.replace({
path: '/entitlement',
query: {
projectEquityNo: projectEquityNo,
externalOrderNo: externalOrderNo,
},
});
}
} else {
this.$router.replace({
path: '/entitlement',
query: {
projectEquityNo: projectEquityNo,
externalOrderNo: externalOrderNo,
},
});
this.$toast(res.message);
}
} else {
this.$toast(res.message);
}
});
})
.catch((err) => {
console.log(err);
this.$loading.hide();
});
},
appointment() {
this.$refs.dectionForm
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册