Commit ae0daad4 by 陈超

A

parent b53d1d8c
...@@ -315,6 +315,14 @@ ...@@ -315,6 +315,14 @@
}, },
//点击真题 //点击真题
onTapQuestion: function(item) { onTapQuestion: function(item) {
if(MID <= 0) {
ui.confirm('请先登录', {
yes: function () {
window.location.href = "{:U('basic/Passport/login')}";
}
})
return
}
if(item.price == 0) { if(item.price == 0) {
let url = "{:U('exams/index/examsroom')}" + "&paper_id=" + item.id + "&joinType=1" let url = "{:U('exams/index/examsroom')}" + "&paper_id=" + item.id + "&joinType=1"
window.location.href = url window.location.href = url
......
...@@ -174,6 +174,44 @@ ...@@ -174,6 +174,44 @@
methods: { methods: {
onChange: function(tab) { onChange: function(tab) {
},
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)
}
}
})
},
onStart: function(id) {
if(MID<=0) {
ui.confirm('请先登录', {
yes: function () {
window.location.href = "{:U('basic/Passport/login')}";
}
})
return
}
let url = "{:U('exams/index/examsroom')}" + "&paper_id=" + id + "&joinType=1"
window.location.href = url
} }
} }
}) })
......
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