Commit bbc69a3d by 冷斌

fix bug

parent 25f2b51f
...@@ -69,10 +69,10 @@ ...@@ -69,10 +69,10 @@
<span class="text_14_600 color_FF3B3B">¥{{item['pay_price']}}</span> <span class="text_14_600 color_FF3B3B">¥{{item['pay_price']}}</span>
</div> </div>
<div class="layout_h_r"> <div class="layout_h_r">
<div v-if="showSolid(index)" @click="onPay(item, 2, opt)" class="order_action_solid self_center" <div v-if="showSolid(index)" @click="onPay(item, opt)" class="order_action_solid self_center"
style="margin-left: 0.75rem;">去支付 style="margin-left: 0.75rem;">去支付
</div> </div>
<div v-if="showHollow(index)" @click="onCancel(item, 'exams')" class="order_action_hollow self_center"> <div v-if="showHollow(index)" @click="onCancel(item, opt')" class="order_action_hollow self_center">
{{hollowText(index)}} {{hollowText(index)}}
</div> </div>
</div> </div>
...@@ -227,9 +227,7 @@ ...@@ -227,9 +227,7 @@
} }
return true; return true;
}, },
onPay: function (item, type, opt) { onPay: function (item, opt) {
console.log(opt, this.getOptions(opt));
return false;
if (!this.isLogin()) { if (!this.isLogin()) {
return false; return false;
} }
...@@ -241,10 +239,14 @@ ...@@ -241,10 +239,14 @@
let url = ''; let url = '';
let formData2 = {}; let formData2 = {};
if (type === 1) {
let option = this.getOptions(opt);
let type = option.v;
if (type === 'course') {
} }
if (type === 2) { if (type === 'exams') {
url = "/pay/exams_"+item['order']+".html"; url = "/pay/exams_"+item['order']+".html";
formData2 = { formData2 = {
vid: item['course_id'], vid: item['course_id'],
...@@ -275,7 +277,9 @@ ...@@ -275,7 +277,9 @@
} }
},'json'); },'json');
}, },
onCancel: function (item, type) { onCancel: function (item, opt) {
let option = this.getOptions(opt);
let type = option.v;
ui.confirm('你确定要删除这个订单?', { ui.confirm('你确定要删除这个订单?', {
yes: function () { yes: function () {
$.ajax({ $.ajax({
......
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