Commit c6d852a4 by 冷斌

fix bug

parent 620721df
......@@ -72,7 +72,7 @@
<span class="text_14_600 color_FF3B3B">¥{{item['pay_price']}}</span>
</div>
<div class="layout_h_r">
<div v-if="showSolid(index)" @click="onPay(item)" class="order_action_solid self_center"
<div v-if="showSolid(index)" @click="onPay(item, 2)" class="order_action_solid self_center"
style="margin-left: 0.75rem;">去支付
</div>
<div v-if="showHollow(index)" class="order_action_hollow self_center">
......@@ -214,7 +214,7 @@
}
return 0;
},
onPay: function (item) {
onPay: function (item, type) {
var uid = '{$uid}';
if(MID<=0){
ui.confirm('请先登录', {
......@@ -225,13 +225,48 @@
return false;
}
if(item['money'] <= 0){
ui.error('此课程不需要您购买');
if(item['price'] <= 0){
ui.error('不需要您购买');
return false;
}
let url = "/pay/exams_"+item['order']+".html";
console.log(item, url, "{$check_type}");
let url = '';
let formData2 = {};
if (type === 1) {
}
if (type === 2) {
url = "/pay/exams_"+item['order']+".html";
formData2 = {
vid: item['course_id'],
check_type: "{$check_type}",
type: "ConPay",
money: item['price'],
};
}
if (type === 3) {
}
if (url === '') {
ui.error('参数错误');
return false;
}
$.post(U("course/PayVideo/checkPay"), formData2,function(data){
console.log(data);
// if(data.status == 1){
// window.location.href = url;
// } else if(data.status == 9){
// ui.error(data.info);
// window.location.reload();
// } else {
// ui.error(data.info);
// return false;
// }
},'json');
}
},
created: function () {
......
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