Commit e38b7bfc by 冷斌

fix bug

parent 4e456b26
...@@ -100,7 +100,10 @@ ...@@ -100,7 +100,10 @@
<if condition="$vo['price'] eq 0 or $vo['is_buy'] eq 1"> <if condition="$vo['price'] eq 0 or $vo['is_buy'] eq 1">
<div @click="onStart({$vo['exams_paper_id']})" class="home_button_green layout_center">开始做题</div> <div @click="onStart({$vo['exams_paper_id']})" class="home_button_green layout_center">开始做题</div>
<else /> <else />
<!--
<div @click="onPay({$vo['exams_paper_id']})" class="home_button_orange layout_center">¥{$vo['price']}</div> <div @click="onPay({$vo['exams_paper_id']})" class="home_button_orange layout_center">¥{$vo['price']}</div>
-->
<div @click="onStart({$vo['exams_paper_id']})" class="home_button_orange layout_center">预览</div>
</if> </if>
</div> </div>
<div class="layout_h_b" style="margin-top: 0.5rem;"> <div class="layout_h_b" style="margin-top: 0.5rem;">
...@@ -205,7 +208,6 @@ ...@@ -205,7 +208,6 @@
} }
}, },
onPay: function(id) { onPay: function(id) {
console.log("Id = " + id)
if (MID <= 0) { if (MID <= 0) {
ui.confirm('请先登录', { ui.confirm('请先登录', {
yes: function() { yes: function() {
......
...@@ -63,6 +63,37 @@ $(function() { ...@@ -63,6 +63,37 @@ $(function() {
page.unbind('click'); page.unbind('click');
page.attr({'style': 'background:rgba(245,166,35,1);'}); page.attr({'style': 'background:rgba(245,166,35,1);'});
page.text('去支付'); page.text('去支付');
page.bind("click", function () {
alert(1);
});
// 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); 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