|
@@ -143,7 +143,7 @@ class ChapterController extends BaseController
|
|
|
// }
|
|
|
//
|
|
|
// }
|
|
|
- $v->next_chapter_status = $v->is_need_charge == true ? 2:1;
|
|
|
+ $v->next_chapter_status = $this->isSubscribe($v->id,$rules);
|
|
|
$v->next_price = $v->price;
|
|
|
|
|
|
//拆章
|
|
@@ -1085,4 +1085,25 @@ class ChapterController extends BaseController
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ /*****
|
|
|
+ * 是否订阅
|
|
|
+ * name: isSubscribe
|
|
|
+ * @param $cid
|
|
|
+ * @param $rules
|
|
|
+ * @return int
|
|
|
+ * date 2022/11/02 17:19
|
|
|
+ */
|
|
|
+ private function isSubscribe($cid,$rules): int
|
|
|
+ {
|
|
|
+ if($rules['check'] != 1){
|
|
|
+ return 1;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (empty($rules['paycid']) || !in_array($cid,$rules['paycid'])){
|
|
|
+ return 2;
|
|
|
+ }else{
|
|
|
+ return 1;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|