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

feat 入口增加跳转页面

上级 80ff5bfb
...@@ -28,3 +28,11 @@ export const getCardTypes = () => { ...@@ -28,3 +28,11 @@ export const getCardTypes = () => {
withCredentials: true, 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 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 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 { headerConfigByMeta } from 'mn-template/util/routerUtil';
import handleAllRouter from '../public_uat';
const routerConfig = [ const routerConfig = [
{ {
path: '/insuranceBindCode', path: '/insuranceBindCode',
...@@ -165,6 +165,11 @@ const routerConfig = [ ...@@ -165,6 +165,11 @@ const routerConfig = [
name: 'protocol', name: 'protocol',
component: () => import('@/views/login/protocol.vue'), component: () => import('@/views/login/protocol.vue'),
}, },
{
path: '/notice',
name: 'notice',
component: () => import('@/views/notice/index.vue'),
},
]; ];
router.beforeEach(async (to, from, next) => { router.beforeEach(async (to, from, next) => {
headerConfigByMeta(to); 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 @@ ...@@ -220,7 +220,7 @@
</template> </template>
<script> <script>
import { getBanner, getCardTypes } from '@/api/entitlement'; import { getBanner, getCardTypes, projectMaterial } from '@/api/entitlement';
import { import {
createOrderSzV2, createOrderSzV2,
taiBaoUserInfo, taiBaoUserInfo,
...@@ -272,6 +272,8 @@ export default { ...@@ -272,6 +272,8 @@ export default {
inherentUserInfo: null, inherentUserInfo: null,
openWebAppConfig_without_yunorder: openWebAppConfig_without_yunorder:
'pagesInsurance/all-entrance/index?insurance_without_yunorder=insurance_without_yunorder', 'pagesInsurance/all-entrance/index?insurance_without_yunorder=insurance_without_yunorder',
nextConfig: null,
}; };
}, },
computed: { computed: {
...@@ -341,6 +343,7 @@ export default { ...@@ -341,6 +343,7 @@ export default {
this.userInfo = userInfo || ''; this.userInfo = userInfo || '';
// this.$loading.show(); // this.$loading.show();
this.getBanner(7, rightsNo || projectEquityNo); this.getBanner(7, rightsNo || projectEquityNo);
this.getProjectMaterial();
this.loadCardTypes(); this.loadCardTypes();
if ( if (
this.projectEquityNo === 'TB202309151004000001' && this.projectEquityNo === 'TB202309151004000001' &&
...@@ -393,7 +396,20 @@ export default { ...@@ -393,7 +396,20 @@ export default {
console.log(err); 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) { isReadonly(fieldName) {
if (!this.inherentUserInfo) return false; if (!this.inherentUserInfo) return false;
return ( return (
...@@ -439,64 +455,76 @@ export default { ...@@ -439,64 +455,76 @@ export default {
if (rightsNo) { if (rightsNo) {
data['rightsNo'] = rightsNo; data['rightsNo'] = rightsNo;
} }
createOrderSzV2(data).then((res) => { this.$loading.show();
console.log(res); createOrderSzV2(data)
if (res.code == '000000') { .then((res) => {
const { this.$loading.hide();
yunOrderNo, console.log(res);
statusCode, if (res.code == '000000') {
externalOrderNo, const {
versionNumber, yunOrderNo,
projectEquityNo, statusCode,
lanZhouOldflag, externalOrderNo,
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',
versionNumber, 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 { } else {
this.$router.replace({ this.$toast(res.message);
path: '/entitlement',
query: {
projectEquityNo: projectEquityNo,
externalOrderNo: externalOrderNo,
},
});
} }
} else { })
this.$toast(res.message); .catch((err) => {
} console.log(err);
}); this.$loading.hide();
});
}, },
appointment() { appointment() {
this.$refs.dectionForm this.$refs.dectionForm
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册