Commit 48ab019d by 冷斌

fix bug

parent 451d54e2
...@@ -259,9 +259,35 @@ ...@@ -259,9 +259,35 @@
} else { } else {
isCollect = 1; isCollect = 1;
} }
console.log(isCollect);
if (MID <= 0) {
ui.confirm('请先登录', {
yes: function () {
window.location.href = "{:U('basic/Passport/login')}";
}
});
return false;
}
$.ajax({
type: 'POST',
url: "{:U('exams/Index/collect')}",
data: {
action: isCollect,
source_id: "{$paper.exams_paper_id}",
},
dataType: "json",
cache: false,
success: function (data) {
if (data.status == '0') {
ui.error(data.info);
} else {
ui.success(data.info);
iscollect(isCollect); iscollect(isCollect);
} }
},
});
}
function iscollect(type) function iscollect(type)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment