| xqd
@@ -13,6 +13,7 @@
|
|
|
namespace app\wap\controller;
|
|
|
|
|
|
use app\admin\model\study\Plan;
|
|
|
+use app\admin\model\study\PlanBuy;
|
|
|
use app\admin\model\study\PlanSteps;
|
|
|
use app\admin\model\study\PlanItems;
|
|
|
use app\wap\model\special\Special as SpecialModel;
|
| xqd
@@ -57,6 +58,11 @@ class Studyplan extends AuthController{
|
|
|
$planinfo['introduction'] = htmlspecialchars_decode($planinfo['introduction']);
|
|
|
$steps = PlanSteps::where('is_del', 0)->where('pid', $id)->select();
|
|
|
$stepids = [];
|
|
|
+ $isPay = 0;
|
|
|
+ $buyinfo = PlanBuy::where('planid', $id)->where('uid', $this->uid)->where('is_del', 0)->find();
|
|
|
+ if ($buyinfo) {
|
|
|
+ $isPay = 1;
|
|
|
+ }
|
|
|
foreach($steps as $v){
|
|
|
$stepids[] = $v['id'];
|
|
|
}
|
| xqd
@@ -78,7 +84,7 @@ class Studyplan extends AuthController{
|
|
|
$user_level = !$this->uid ? 0 : $this->userInfo;
|
|
|
$this->assign('is_member', isset($user_level['level']) ? $user_level['level'] : 0);
|
|
|
|
|
|
-
|
|
|
+ $this->assign('isPay', $isPay);
|
|
|
$this->assign('steps', json_encode($steps));
|
|
|
$this->assign('itemsList', json_encode($itemsList));
|
|
|
$this->assign('planinfo', json_encode($planinfo));
|