|
@@ -296,17 +296,36 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
title: '提示'
|
|
|
}, function (index) {
|
|
|
if(Config.is_fault){
|
|
|
- Fast.api.ajax({
|
|
|
+ var indexnew = Layer.load(2, {
|
|
|
+ shade: [0.5,'#393D49'],
|
|
|
+ content: '正在交卷中,请稍后...', // 这里是加载的文字
|
|
|
+ });
|
|
|
+ $.ajax({
|
|
|
url: Config.url_type+"/sim/real-exam/student/exam/submit/"+Config.exam_id+"?ip="+Config.server_ip,
|
|
|
- }, function (data) {
|
|
|
- console.log(data);
|
|
|
- if(data.code==200){
|
|
|
- $("#update-form").submit();
|
|
|
- }else{
|
|
|
- Layer.closeAll();
|
|
|
- Layer.alert(data.msg);
|
|
|
+ type: 'get',
|
|
|
+ success: function (data) {
|
|
|
+ console.log(data);
|
|
|
+ console.log(data.code);
|
|
|
+ if(data.code==200){
|
|
|
+ $("#update-form").submit();
|
|
|
+ }else{
|
|
|
+ Layer.closeAll();
|
|
|
+ Layer.alert(data.msg);
|
|
|
+ }
|
|
|
+ Layer.close(indexnew);
|
|
|
}
|
|
|
});
|
|
|
+ // Fast.api.ajax({
|
|
|
+ // url: Config.url_type+"/sim/real-exam/student/exam/submit/"+Config.exam_id+"?ip="+Config.server_ip,
|
|
|
+ // }, function (data) {
|
|
|
+ // console.log(data);
|
|
|
+ // if(data.code==200){
|
|
|
+ // $("#update-form").submit();
|
|
|
+ // }else{
|
|
|
+ // Layer.closeAll();
|
|
|
+ // Layer.alert(data.msg);
|
|
|
+ // }
|
|
|
+ // });
|
|
|
}else{
|
|
|
$("#update-form").submit();
|
|
|
}
|