Authored by wangtao

fix: 优化展示loadding

@@ -68,7 +68,9 @@ let http = { @@ -68,7 +68,9 @@ let http = {
68 data: JSON.stringify(data), 68 data: JSON.stringify(data),
69 error: function (xhr, textStatus) { 69 error: function (xhr, textStatus) {
70 if (showLoadding && showLoadding == true) { 70 if (showLoadding && showLoadding == true) {
71 - loading.close(); 71 + setTimeout(() => {
  72 + loading.close();
  73 + }, 1000)
72 } 74 }
73 if (errFunc) { 75 if (errFunc) {
74 errFunc(); 76 errFunc();
@@ -81,7 +83,9 @@ let http = { @@ -81,7 +83,9 @@ let http = {
81 callback(data); 83 callback(data);
82 } 84 }
83 if (showLoadding && showLoadding == true) { 85 if (showLoadding && showLoadding == true) {
84 - loading.close(); 86 + setTimeout(() => {
  87 + loading.close();
  88 + }, 1000)
85 } 89 }
86 //console.log("==>", requestUrl, jqXHR, textStatus) 90 //console.log("==>", requestUrl, jqXHR, textStatus)
87 91
@@ -120,7 +124,9 @@ let http = { @@ -120,7 +124,9 @@ let http = {
120 data: data, 124 data: data,
121 error: function (xhr, textStatus) { 125 error: function (xhr, textStatus) {
122 if (showLoadding && showLoadding == true) { 126 if (showLoadding && showLoadding == true) {
123 - loading.close(); 127 + setTimeout(() => {
  128 + loading.close();
  129 + }, 1000)
124 } 130 }
125 // console.log("==>", requestUrl, xhr, textStatus) 131 // console.log("==>", requestUrl, xhr, textStatus)
126 http.reqErr(xhr); 132 http.reqErr(xhr);
@@ -135,7 +141,9 @@ let http = { @@ -135,7 +141,9 @@ let http = {
135 callback(data); 141 callback(data);
136 } 142 }
137 if (showLoadding && showLoadding == true) { 143 if (showLoadding && showLoadding == true) {
138 - loading.close(); 144 + setTimeout(() => {
  145 + loading.close();
  146 + }, 1000)
139 } 147 }
140 //console.log("==>", requestUrl, jqXHR, textStatus) 148 //console.log("==>", requestUrl, jqXHR, textStatus)
141 } 149 }
@@ -165,7 +173,9 @@ let http = { @@ -165,7 +173,9 @@ let http = {
165 async: false, 173 async: false,
166 data: formData, 174 data: formData,
167 error: function (xhr, textStatus) { 175 error: function (xhr, textStatus) {
168 - loading.close(); 176 + setTimeout(() => {
  177 + loading.close();
  178 + }, 1000)
169 // console.log("==>", requestUrl, xhr, textStatus) 179 // console.log("==>", requestUrl, xhr, textStatus)
170 http.reqErr(xhr); 180 http.reqErr(xhr);
171 __global.showMsg("上传失败,请您确认文件是否存在!", "error"); 181 __global.showMsg("上传失败,请您确认文件是否存在!", "error");