Commit e72611ec by 冷斌

fix bug

parent e65614cf
...@@ -902,10 +902,12 @@ class PayVideoAction extends CommonAction ...@@ -902,10 +902,12 @@ class PayVideoAction extends CommonAction
if ($pay_status == 3) { if ($pay_status == 3) {
$this->mzError("已购买此课时"); $this->mzError("已购买此课时");
} else if (in_array($pay_status, [2, 5, 7, 8]) || !$pay_status) { } else if (in_array($pay_status, [2, 5, 7, 8]) || !$pay_status) {
var_dump('log: 1');
$i = D('ZyService', 'classroom')->buyOnlineVideoHour(intval($this->mid), $vid, $course_hour_id, [$mount_mhm_id, $agent_mhm_id]); $i = D('ZyService', 'classroom')->buyOnlineVideoHour(intval($this->mid), $vid, $course_hour_id, [$mount_mhm_id, $agent_mhm_id]);
} else if ($pay_status == 4) { } else if ($pay_status == 4) {
$this->mzError("该课时正在申请退款"); $this->mzError("该课时正在申请退款");
} else if ($pay_status == 1) { } else if ($pay_status == 1) {
var_dump('log: 2');
$i = true; $i = true;
} }
} else { } else {
...@@ -919,12 +921,14 @@ class PayVideoAction extends CommonAction ...@@ -919,12 +921,14 @@ class PayVideoAction extends CommonAction
if ($cid !== $coupon_id) { if ($cid !== $coupon_id) {
D('Coupon', 'classroom')->cancelExchangeCard($cid); D('Coupon', 'classroom')->cancelExchangeCard($cid);
} }
var_dump('log: 3');
$i = D('ZyService', 'classroom')->buyOnlineVideo(intval($this->mid), $vid, $ext_data, [$mount_mhm_id, $agent_mhm_id], $ext_asb); $i = D('ZyService', 'classroom')->buyOnlineVideo(intval($this->mid), $vid, $ext_data, [$mount_mhm_id, $agent_mhm_id], $ext_asb);
} else if (in_array($pay_status, [1, 2, 5, 7, 8]) || !$pay_status) { } else if (in_array($pay_status, [1, 2, 5, 7, 8]) || !$pay_status) {
$cid = M('zy_order_course')->where(array('uid' => intval($this->mid), 'video_id' => $vid))->getField('coupon_id'); $cid = M('zy_order_course')->where(array('uid' => intval($this->mid), 'video_id' => $vid))->getField('coupon_id');
if ($cid !== $coupon_id) { if ($cid !== $coupon_id) {
D('Coupon', 'classroom')->cancelExchangeCard($cid); D('Coupon', 'classroom')->cancelExchangeCard($cid);
} }
var_dump('log: 4');
$i = D('ZyService', 'classroom')->buyOnlineVideo(intval($this->mid), $vid, $ext_data, [$mount_mhm_id, $agent_mhm_id], $ext_asb); $i = D('ZyService', 'classroom')->buyOnlineVideo(intval($this->mid), $vid, $ext_data, [$mount_mhm_id, $agent_mhm_id], $ext_asb);
} else if ($pay_status == 4) { } else if ($pay_status == 4) {
$this->mzError("该课程正在申请退款"); $this->mzError("该课程正在申请退款");
......
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