提交 7a5159b3 编写于 作者: 张敬贤's avatar 张敬贤

add

上级 4223868a
......@@ -17,7 +17,8 @@ $http.addBeforeHook(config => console.log('我是新增的前置钩子', config)
// 新增后置钩子
$http.addAfterHook(response => {
if (response.data.code !== '000000') {
if (response.code !== '000000' ) {
Toast(response.data.message);
}
console.log('我是新增的后置钩子', response);
......
......@@ -3,7 +3,6 @@ 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';
const routerConfig = [
{
path: '/insuranceBindCode',
......@@ -56,9 +55,24 @@ const routerConfig = [
component: () => import('@/views/pdf-preview/index.vue'),
},
];
// 无问卷-0001 有问卷未填写-0101 已填写问卷未出结果-0102 已出结果无需领用-0401 已出结果未预约-0201 已预约未采样-0301 已预约已采样-0302
const routerMap = {
'0001': null,
'0101': null,
'0102': null,
'0401': null,
'0201': '/appoint',
'0301': null,
'0302': null,
};
router.beforeEach(async (to, from, next) => {
console.log(to, from, next);
if (to.name === 'home') {
console.log(to.name, routerMap);
} else {
next();
}
});
router.addRoutes(routerConfig);
......
<template>
<div>111</div>
</template>
<script>
export default {
data() {
return {
};
},
};
</script>
<style>
</style>
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册