59ded045 by 任超

style:loading

1 parent dca5777f
...@@ -12,11 +12,6 @@ const service = axios.create({ ...@@ -12,11 +12,6 @@ const service = axios.create({
12 headers: { 12 headers: {
13 'Content-Type': 'application/json; charset=utf-8', 13 'Content-Type': 'application/json; charset=utf-8',
14 'Authorization': 'bearer AT-4-MxSrO29Coe7VTazx8uuixtqqgO-hvCB6' 14 'Authorization': 'bearer AT-4-MxSrO29Coe7VTazx8uuixtqqgO-hvCB6'
15 //token列表
16 //'Authorization': 'bearer AT-12-eRKHta5I8ZWftIU86sSyJ8rUkPhMvMJU'
17 //renc:bearer AT-30-KHB4LXc8-CZXwBEyaFJa9lRmMTc5sHVI
18 //tianh:bearer AT-33-3zFTGkhQ4eUv4nXvzAmbgN5RPZppzEY6
19 //zhangh:bearer AT-7-Tx8dlZH0LNRc33UjD1CX1xwa-1D7kQmQ
20 }, 15 },
21 timeout: 15000 16 timeout: 15000
22 }) 17 })
...@@ -24,7 +19,8 @@ const service = axios.create({ ...@@ -24,7 +19,8 @@ const service = axios.create({
24 // request interceptor 19 // request interceptor
25 service.interceptors.request.use( 20 service.interceptors.request.use(
26 config => { 21 config => {
27 if (config.headers.showLoading !== false) { 22 // config.headers.showLoading !== false
23 if (config.headers.target) {
28 startLoadingAddCount(config.headers.loadingTarget ? config.headers.loadingTarget : '正在加载中...', 24 startLoadingAddCount(config.headers.loadingTarget ? config.headers.loadingTarget : '正在加载中...',
29 config.headers.target ? config.headers.target : 'body'); 25 config.headers.target ? config.headers.target : 'body');
30 } 26 }
...@@ -34,7 +30,8 @@ service.interceptors.request.use( ...@@ -34,7 +30,8 @@ service.interceptors.request.use(
34 return config 30 return config
35 }, 31 },
36 error => { 32 error => {
37 if (error.headers.showLoading !== false) { 33 // error.headers.showLoading !== false
34 if (error.headers.target) {
38 endLoadingSubCount(config.headers.loadingTarget ? config.headers.loadingTarget : '正在加载中...', 35 endLoadingSubCount(config.headers.loadingTarget ? config.headers.loadingTarget : '正在加载中...',
39 config.headers.target ? config.headers.target : 'body'); 36 config.headers.target ? config.headers.target : 'body');
40 } 37 }
......
...@@ -61,7 +61,6 @@ export default { ...@@ -61,7 +61,6 @@ export default {
61 queryClick () { 61 queryClick () {
62 this.fetchData(); 62 this.fetchData();
63 }, 63 },
64
65 // 初始化数据 64 // 初始化数据
66 fetchData () { 65 fetchData () {
67 66
...@@ -74,7 +73,6 @@ export default { ...@@ -74,7 +73,6 @@ export default {
74 handleSort (name, sort) { 73 handleSort (name, sort) {
75 console.log(name, sort); 74 console.log(name, sort);
76 }, 75 },
77
78 // 查看 76 // 查看
79 handleViewClick (scope) { 77 handleViewClick (scope) {
80 var sqcxBsm = scope.row.bsmSqcx; 78 var sqcxBsm = scope.row.bsmSqcx;
...@@ -91,10 +89,10 @@ export default { ...@@ -91,10 +89,10 @@ export default {
91 confirm: function () { 89 confirm: function () {
92 // that.loadBdcdylist(); 90 // that.loadBdcdylist();
93 }, //确认事件的回调 91 }, //确认事件的回调
94 }); 92 })
95 }, 93 }
96 }, 94 }
97 }; 95 }
98 </script> 96 </script>
99 <style scoped lang="scss"> 97 <style scoped lang="scss">
100 @import "~@/styles/public.scss"; 98 @import "~@/styles/public.scss";
......