File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -275,18 +275,30 @@ export default {
275275 }
276276 },
277277 refreshCourse : async function () {
278+ this .show = true ;
278279 let resp = await checkLogin ()
279280 if (resp .data .code === 3401 ) {
280281 showFailToast (" 登录状态失效, 请登录后重试" );
281282 this .$router .push (' /login' );
282283 } else {
283- this .show = true ;
284- refreshExpCourse (() => {
285- refreshNormalCourse (() => {
286- this .get ();
287- this .show = false ;
288- showSuccessToast (" 更新成功" );
289- });
284+ refreshExpCourse ((response ) => {
285+ if (response .status !== 200 ) {
286+ showFailToast (" 后端服务器错误" );
287+ } else if (response .data .code !== 0 ) {
288+ this .handleErrorCode (response .data .code , " 实验课表" )
289+ } else {
290+ refreshNormalCourse (() => {
291+ if (response .status !== 200 ) {
292+ showFailToast (" 后端服务器错误" );
293+ } else if (response .data .code !== 0 ) {
294+ this .handleErrorCode (response .data .code , " 普通课表" )
295+ } else {
296+ this .get ();
297+ showSuccessToast (" 更新成功" );
298+ }
299+ this .show = false ;
300+ });
301+ }
290302 });
291303 }
292304 }
You can’t perform that action at this time.
0 commit comments