提交 cb9dabc2 编写于 作者: 张磊's avatar 张磊

init

上级 b76d43c2
...@@ -35,9 +35,7 @@ export const getDetailByYunOrderNo = async (yunOrderNo) => { ...@@ -35,9 +35,7 @@ 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,
headers: { hasLoading:false,
noLoading:true,
},
}); });
}; };
export const getHospitalList = async(data) => { export const getHospitalList = async(data) => {
......
...@@ -104,7 +104,7 @@ export const detectionRecordInfo = (data) => { ...@@ -104,7 +104,7 @@ export const detectionRecordInfo = (data) => {
url: `/trade/detection/record/record/infoV2?detectionRecordId=${data.detectionRecordId}&detectionKind=${data.detectionKind}`, url: `/trade/detection/record/record/infoV2?detectionRecordId=${data.detectionRecordId}&detectionKind=${data.detectionKind}`,
withCredentials: true, withCredentials: true,
headers: { headers: {
noLoading:true, hasLoading:false,
}, },
}); });
}; };
......
...@@ -13,7 +13,6 @@ const loading = { ...@@ -13,7 +13,6 @@ const loading = {
document.body.appendChild(instance.$el); document.body.appendChild(instance.$el);
// 在Vue的原型链上注册方法,控制组件 // 在Vue的原型链上注册方法,控制组件
Vue.prototype.$loading = { Vue.prototype.$loading = {
show: (text) => { show: (text) => {
instance.show = true; instance.show = true;
......
...@@ -12,7 +12,7 @@ $http.setOptions({ ...@@ -12,7 +12,7 @@ $http.setOptions({
console.log('我重写了默认的loading1', opt); console.log('我重写了默认的loading1', opt);
const globalLoading = document.getElementById('globalLoading'); const globalLoading = document.getElementById('globalLoading');
if (!globalLoading && !noLoading) { if (!globalLoading && !noLoading) {
vueApp.$loading.show(); // vueApp.$loading.show();
} }
} }
}); });
...@@ -22,7 +22,7 @@ $http.addBeforeHook(config => console.log('我是新增的前置钩子', config) ...@@ -22,7 +22,7 @@ $http.addBeforeHook(config => console.log('我是新增的前置钩子', config)
// 新增后置钩子 // 新增后置钩子
$http.addAfterHook(response => { $http.addAfterHook(response => {
vueApp.$loading.hide(); // vueApp.$loading.hide();
if (response.data.code !== '000000') { if (response.data.code !== '000000') {
console.log('我是新增的后置钩子111', response); console.log('我是新增的后置钩子111', response);
vueApp.$toast(response.data.message ); vueApp.$toast(response.data.message );
......
...@@ -487,6 +487,8 @@ export default { ...@@ -487,6 +487,8 @@ export default {
this.$toast(errorMessage); this.$toast(errorMessage);
this.init(); this.init();
}); });
}else {
this.$loading.hide();
} }
console.log('--showFlagForReport', showFlagForReport); console.log('--showFlagForReport', showFlagForReport);
}); });
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册