|
|
@ -194,7 +194,7 @@ class Special extends AuthController |
|
|
|
if ($order->total_num == $order->gift_count) return JsonService::fail('礼物已被领取完'); |
|
|
|
if ($order->total_num == $order->gift_count) return JsonService::fail('礼物已被领取完'); |
|
|
|
} |
|
|
|
} |
|
|
|
$special = SpecialModel::getOneSpecial($this->uid, $id); |
|
|
|
$special = SpecialModel::getOneSpecial($this->uid, $id); |
|
|
|
|
|
|
|
|
|
|
|
if ($special === false) return JsonService::fail(SpecialModel::getErrorInfo('无法访问')); |
|
|
|
if ($special === false) return JsonService::fail(SpecialModel::getErrorInfo('无法访问')); |
|
|
|
$is_member = isset($this->userInfo['level']) ? $this->userInfo['level'] : 0; |
|
|
|
$is_member = isset($this->userInfo['level']) ? $this->userInfo['level'] : 0; |
|
|
|
if (!isset($special['special'])) $this->failed('专题信息未获得', Url::build('index/index')); |
|
|
|
if (!isset($special['special'])) $this->failed('专题信息未获得', Url::build('index/index')); |
|
|
@ -1108,16 +1108,18 @@ class Special extends AuthController |
|
|
|
{ |
|
|
|
{ |
|
|
|
return $model->where(['order_id' => $orderId, 'paid' => 1, 'uid' => $this->uid])->count(); |
|
|
|
return $model->where(['order_id' => $orderId, 'paid' => 1, 'uid' => $this->uid])->count(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 阅卷订单 |
|
|
|
* 阅卷订单 |
|
|
|
* [create_marking_papers_order description] |
|
|
|
* [create_marking_papers_order description] |
|
|
|
* @param [type] $data_id [description] |
|
|
|
* @param [type] $data_id [description] |
|
|
|
* @param [type] $payType [description] |
|
|
|
* @param [type] $payType [description] |
|
|
|
* @param string $from [description] |
|
|
|
* @param string $from [description] |
|
|
|
* @param [type] $returnUrl [description] |
|
|
|
* @param [type] $returnUrl [description] |
|
|
|
* @return [type] [description] |
|
|
|
* @return [type] [description] |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public function create_marking_papers_order($data_id, $payType, $from = 'weixin', $returnUrl){ |
|
|
|
public function create_marking_papers_order($data_id, $payType, $from = 'weixin', $returnUrl) |
|
|
|
|
|
|
|
{ |
|
|
|
$testPaper = TestPaper::PreExercisesWhere()->find($test_id); |
|
|
|
$testPaper = TestPaper::PreExercisesWhere()->find($test_id); |
|
|
|
if (!$testPaper) return JsonService::status('ORDER_ERROR', '购买的试卷不存在'); |
|
|
|
if (!$testPaper) return JsonService::status('ORDER_ERROR', '购买的试卷不存在'); |
|
|
|
$order = TestPaperOrder::createTestPaperOrder($testPaper, $this->uid, $payType); |
|
|
|
$order = TestPaperOrder::createTestPaperOrder($testPaper, $this->uid, $payType); |
|
|
@ -1201,6 +1203,7 @@ class Special extends AuthController |
|
|
|
return JsonService::fail(TestPaperOrder::getErrorInfo('订单生成失败!')); |
|
|
|
return JsonService::fail(TestPaperOrder::getErrorInfo('订单生成失败!')); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/**创建试卷支付订单 |
|
|
|
/**创建试卷支付订单 |
|
|
|
* @param $test_id |
|
|
|
* @param $test_id |
|
|
|
* @param $payType |
|
|
|
* @param $payType |
|
|
@ -1950,7 +1953,7 @@ class Special extends AuthController |
|
|
|
$is_member = isset($this->userInfo['level']) ? $this->userInfo['level'] : 0; |
|
|
|
$is_member = isset($this->userInfo['level']) ? $this->userInfo['level'] : 0; |
|
|
|
$my = SpecialModel::getMyGradeList(1, 4, $this->uid, $is_member, 0); |
|
|
|
$my = SpecialModel::getMyGradeList(1, 4, $this->uid, $is_member, 0); |
|
|
|
//$offlineCourse = (new \app\wap\model\special\OfflineCourse)->order('id desc')->limit(4)->select(); |
|
|
|
//$offlineCourse = (new \app\wap\model\special\OfflineCourse)->order('id desc')->limit(4)->select(); |
|
|
|
$activity = EventRegistration::eventRegistrationList(1, 4, "", 0 ,0); |
|
|
|
$activity = EventRegistration::eventRegistrationList(1, 4, "", 0, 0); |
|
|
|
|
|
|
|
|
|
|
|
$uid = $this->uid; |
|
|
|
$uid = $this->uid; |
|
|
|
$hot = SpecialModel::getSpecialList(['grade_id' => 0, 'subject_id' => 0, 'search' => '', 'page' => 1, 'limit' => 4, 'type' => 0, 'uid' => $uid, 'is_hot' => 1]); |
|
|
|
$hot = SpecialModel::getSpecialList(['grade_id' => 0, 'subject_id' => 0, 'search' => '', 'page' => 1, 'limit' => 4, 'type' => 0, 'uid' => $uid, 'is_hot' => 1]); |
|
|
@ -2650,11 +2653,12 @@ class Special extends AuthController |
|
|
|
try { |
|
|
|
try { |
|
|
|
switch ($from) { |
|
|
|
switch ($from) { |
|
|
|
case 'weixinh5': |
|
|
|
case 'weixinh5': |
|
|
|
$jsConfig = StoreOrder::h5Pay($order); |
|
|
|
$jsConfig = StoreOrder::h5Pay($order); |
|
|
|
break; |
|
|
|
// $jsConfig = StoreOrder::jsPay($order); |
|
|
|
case 'weixin': |
|
|
|
|
|
|
|
$jsConfig = StoreOrder::jsPay($order); |
|
|
|
|
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
// case 'weixin': |
|
|
|
|
|
|
|
// $jsConfig = StoreOrder::jsPay($order); |
|
|
|
|
|
|
|
// break; |
|
|
|
case 'mpweixing': |
|
|
|
case 'mpweixing': |
|
|
|
$jsConfig = StoreOrder::WeixinMiniPay($order); |
|
|
|
$jsConfig = StoreOrder::WeixinMiniPay($order); |
|
|
|
break; |
|
|
|
break; |
|
|
@ -2664,7 +2668,9 @@ class Special extends AuthController |
|
|
|
$info['jsConfig'] = $jsConfig; |
|
|
|
$info['jsConfig'] = $jsConfig; |
|
|
|
switch ($from) { |
|
|
|
switch ($from) { |
|
|
|
case 'weixinh5': |
|
|
|
case 'weixinh5': |
|
|
|
return JsonService::status('wechat_h5_pay', '订单创建成功', $info); |
|
|
|
//11 |
|
|
|
|
|
|
|
return JsonService::status('wechat_pay', '订单创建成功', $info); |
|
|
|
|
|
|
|
// return JsonService::status('wechat_h5_pay', '订单创建成功', $info); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 'mpweixing': |
|
|
|
case 'mpweixing': |
|
|
|
return JsonService::status('WECHAT_ROUTINE_PAY', '订单创建成功', $info); |
|
|
|
return JsonService::status('WECHAT_ROUTINE_PAY', '订单创建成功', $info); |
|
|
|