Browse Source

20250312 调整

贾小兵 1 tháng trước cách đây
mục cha
commit
d03d08e38b

+ 7 - 1
public/assets/js/backend/student/exercise.js

@@ -103,7 +103,13 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                     },
                     success: function (data) {
                         if(data.code==1){
-                            window.location.reload();
+                            Layer.alert(data.msg, {
+                                btn: ['确定'], // 或者直接使用默认的确定按钮
+                                yes: function(index, layero){
+                                    // 刷新页面
+                                    window.location.reload();
+                                }
+                            });
                         }
                         if(data.code==0){
                             Layer.alert(data.msg);

+ 7 - 1
public/assets/js/backend/student/practice.js

@@ -177,7 +177,13 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                     },
                     success: function (data) {
                         if(data.code==1){
-                            window.location.reload();
+                            Layer.alert(data.msg, {
+                                btn: ['确定'], // 或者直接使用默认的确定按钮
+                                yes: function(index, layero){
+                                    // 刷新页面
+                                    window.location.reload();
+                                }
+                            });
                         }
                         if(data.code==0){
                             Layer.alert(data.msg);