Commit 41f8c3ea by 冷斌

fix bug

parent e38b7bfc
......@@ -283,6 +283,7 @@
var isCollect = "{$paper['iscollect']}" > 0 ? 1 : 0;
var limit = parseInt("{$limit}");
var id = "{$paper.exams_paper_id}";
function changeCollect() {
if (isCollect) {
......
......@@ -65,35 +65,31 @@ $(function() {
page.text('去支付');
page.bind("click", function () {
alert(1);
if (MID <= 0) {
ui.confirm('请先登录', {
yes: function() {
window.location.href = "{:U('basic/Passport/login')}";
}
})
return
}
$.ajax({
type: "POST",
url: "{:U('exams/index/getPayUrl')}",
data: {
paper_id: id,
},
dataType: "json",
success: function(res) {
var res = getResponseData(res)
if (res.status == 1) {
window.location.href = res.data
} else {
ui.error(res.message)
}
}
})
});
// onPay: function(id) {
// if (MID <= 0) {
// ui.confirm('请先登录', {
// yes: function() {
// window.location.href = "{:U('basic/Passport/login')}";
// }
// })
// return
// }
// $.ajax({
// type: "POST",
// url: "{:U('exams/index/getPayUrl')}",
// data: {
// paper_id: id,
// },
// dataType: "json",
// success: function(res) {
// var res = getResponseData(res)
// if (res.status == 1) {
// window.location.href = res.data
// } else {
// ui.error(res.message)
// }
// }
// })
// }
}
console.log(limit, question_num);
......
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