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

feat 嵌入博斯腾问卷

上级 75183b0d
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,
});
};
...@@ -11,30 +11,55 @@ ...@@ -11,30 +11,55 @@
class="footer-box" class="footer-box"
> >
<div class="btn-box"> <div class="btn-box">
{{ content }} <div class="btn">
<!-- <div class="btn">
<span>开始训练</span> <span>开始训练</span>
</div> --> </div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { bestcoveredStatusCheck } from '@/api/appoint';
export default { export default {
data() { data() {
return { return {
url: '', url: '',
showBtn: false, showBtn: false,
content: '', content: '',
timer: null,
yunOrderNo: '',
}; };
}, },
created() { created() {
const { const {
url = 'https://cps-test.bestcovered.com/bst-ld/pages/product-factory/product-factory?clientId=yunque&productCode=G3&userId=123&orderNo=123456&sign=a9da8758984231988537860ca827fac0&timestamp=1724119418352&surveyorInfo=SoJcAg9ABYlg3gooqLSn5l5Ut4nCsrZ5K93pUxLfWEol9sXDBdo7r9RlpaBySrISZ38K%252FFb5bYoXYYQFAjsdnLMAMLn5DXCux0Pf0omaaiI5ZgWVgQIupw%253D%253D', url = 'https://cps-test.bestcovered.com/bst-ld/pages/product-factory/product-factory?clientId=yunque&productCode=G3&userId=123&orderNo=123456&sign=a9da8758984231988537860ca827fac0&timestamp=1724119418352&surveyorInfo=SoJcAg9ABYlg3gooqLSn5l5Ut4nCsrZ5K93pUxLfWEol9sXDBdo7r9RlpaBySrISZ38K%252FFb5bYoXYYQFAjsdnLMAMLn5DXCux0Pf0omaaiI5ZgWVgQIupw%253D%253D',
yunOrderNo,
} = this.$route.query; } = this.$route.query;
this.url = decodeURIComponent(url); this.url = decodeURIComponent(url);
this.yunOrderNo = yunOrderNo;
this.loopStatus();
},
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') {
this.showBtn = res.data;
clearInterval(this.timer);
}
});
}, 1000);
},
}, },
mounted() {},
}; };
</script> </script>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册