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

Merge branch 'feature/qiao' into 'release'

Feature/qiao

See merge request !297
import request from 'mn-template/plugins/http'; import request from 'mn-template/plugins/http';
// 根据订单号获取检测名称 // 根据订单号获取检测名称
...@@ -35,15 +34,15 @@ export const getDetailByYunOrderNo = async (yunOrderNo) => { ...@@ -35,15 +34,15 @@ export const getDetailByYunOrderNo = async (yunOrderNo) => {
method: 'get', method: 'get',
url: `/tis/insurance/getDetailByYunOrderNo?yunOrderNo=${yunOrderNo}`, url: `/tis/insurance/getDetailByYunOrderNo?yunOrderNo=${yunOrderNo}`,
withCredentials: true, withCredentials: true,
hasLoading:false, hasLoading: false,
}); });
}; };
export const getHospitalList = async(data) => { export const getHospitalList = async (data) => {
return request({ return request({
method: 'post', method: 'post',
data, data,
headers: { headers: {
noLoading:true, noLoading: true,
}, },
url: '/tis/insurance/hospitalList', url: '/tis/insurance/hospitalList',
withCredentials: true, withCredentials: true,
...@@ -58,7 +57,7 @@ export const getDetailHospital = async (id) => { ...@@ -58,7 +57,7 @@ export const getDetailHospital = async (id) => {
}); });
}; };
export const getCheckInUserInfo = async(data) => { export const getCheckInUserInfo = async (data) => {
return request({ return request({
method: 'post', method: 'post',
data, data,
...@@ -68,7 +67,7 @@ export const getCheckInUserInfo = async(data) => { ...@@ -68,7 +67,7 @@ export const getCheckInUserInfo = async(data) => {
}; };
// /tis/insurance / save / order / detection / result // /tis/insurance / save / order / detection / result
export const saveOrder = async(data) => { export const saveOrder = async (data) => {
return request({ return request({
method: 'post', method: 'post',
data, data,
...@@ -84,3 +83,11 @@ export const getDetailtxt = async (data) => { ...@@ -84,3 +83,11 @@ export const getDetailtxt = async (data) => {
withCredentials: true, withCredentials: true,
}); });
}; };
// 博斯腾判断订单是否完成
export const bestcoveredStatusCheck = async (data) => {
return request({
method: 'get',
url: `/trade/detection/bestcovered/checkComplete/${data.orderNo}/${data.source}`,
withCredentials: true,
});
};
...@@ -190,6 +190,14 @@ const routerConfig = [ ...@@ -190,6 +190,14 @@ const routerConfig = [
name: 'notice', name: 'notice',
component: () => import('@/views/notice/index.vue'), component: () => import('@/views/notice/index.vue'),
}, },
{
path: '/bestcovered',
name: 'bestcovered',
component: () => import('@/views/bestcovered/index.vue'),
meta: {
title: '脑健康测评',
},
},
]; ];
router.beforeEach(async (to, from, next) => { router.beforeEach(async (to, from, next) => {
headerConfigByMeta(to); headerConfigByMeta(to);
......
<template>
<div class="page-wrapper">
<iframe
id="iframe"
class="iframe-wrapper"
:src="url"
frameborder="0"
></iframe>
<div
v-if="showBtn"
class="footer-box"
>
<div class="btn-box">
<div
class="btn"
@click="handleNavBack"
>
<span>立即预约</span>
</div>
</div>
</div>
</div>
</template>
<script>
import { bestcoveredStatusCheck } from '@/api/appoint';
export default {
data() {
return {
url: '',
showBtn: false,
content: '',
timer: null,
yunOrderNo: '',
};
},
created() {
const { url, yunOrderNo } = this.$route.query;
this.url = decodeURIComponent(url);
this.yunOrderNo = yunOrderNo;
this.loopStatus();
},
mounted() {
document.title = this.$route.meta.title;
},
beforeDestroy() {
if (this.timer) clearInterval(this.timer);
},
methods: {
loopStatus() {
const params = {
orderNo: this.yunOrderNo,
source: 1,
};
if (this.timer) clearInterval(this.timer);
this.timer = setInterval(() => {
bestcoveredStatusCheck(params).then((res) => {
if (res.code === '000000' && res.data) {
this.showBtn = true;
clearInterval(this.timer);
}
});
}, 1000);
},
handleNavBack() {
if (window._miniprogram) {
this.$rocNative.WXInstance.miniProgram.navigateBack();
} else {
this.$toast('请在小程序中查看');
}
},
},
};
</script>
<style lang="scss" scoped>
.page-wrapper {
min-height: 100vh;
}
.iframe-wrapper {
display: block;
width: 100vw;
height: 100vh;
}
.footer-box {
position: fixed;
left: 0;
right: 0;
bottom: 0;
padding-bottom: calc(constant(safe-area-inset-bottom) / 2);
padding-bottom: calc(env(safe-area-inset-bottom) / 2);
box-sizing: content-box;
.btn-box {
padding: 10px 20px;
.btn {
display: flex;
justify-content: center;
align-items: center;
height: 40px;
border-radius: 20px;
background: linear-gradient(0deg, #d581e0, #8f79f7) no-repeat, #f8f8f8;
span {
color: #fff;
font-size: 16px;
}
}
}
}
</style>
因为 它太大了无法显示 源差异 。您可以改为 查看blob
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册