|
@@ -83,6 +83,8 @@ class ChapterController extends BaseController
|
|
|
|
|
|
private $is_first_book_order = 0;
|
|
private $is_first_book_order = 0;
|
|
|
|
|
|
|
|
+ private $domain;
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* @apiVersion 1.0.0
|
|
* @apiVersion 1.0.0
|
|
* @apiDescription 章节列表不分页
|
|
* @apiDescription 章节列表不分页
|
|
@@ -317,6 +319,7 @@ class ChapterController extends BaseController
|
|
*/
|
|
*/
|
|
public function index(Request $request, $t, $domain, $bid, $cid)
|
|
public function index(Request $request, $t, $domain, $bid, $cid)
|
|
{
|
|
{
|
|
|
|
+ $this->domain = $domain;
|
|
$special_user_log = env('SPECIAL_USER_LOG');
|
|
$special_user_log = env('SPECIAL_USER_LOG');
|
|
//注意:内部约定用 有此参数不需要强关
|
|
//注意:内部约定用 有此参数不需要强关
|
|
$inter_not_need_sub = $request->has('inter_not_need_sub') ? true : false;
|
|
$inter_not_need_sub = $request->has('inter_not_need_sub') ? true : false;
|
|
@@ -875,6 +878,8 @@ class ChapterController extends BaseController
|
|
$this->chapter->push_title = [];
|
|
$this->chapter->push_title = [];
|
|
//分享
|
|
//分享
|
|
$this->chapter->is_show_share_button = 0;
|
|
$this->chapter->is_show_share_button = 0;
|
|
|
|
+ //6985的分享配置
|
|
|
|
+ $this->chapter->share_config = '';
|
|
//阅读底部强关图片 只有123有
|
|
//阅读底部强关图片 只有123有
|
|
$this->chapter->is_had_subscribe = 0;
|
|
$this->chapter->is_had_subscribe = 0;
|
|
//广告
|
|
//广告
|
|
@@ -1048,6 +1053,21 @@ class ChapterController extends BaseController
|
|
if ($this->is_had_subscribe && in_array($this->distribution_channel_id, [2, 14, 211,4025,4147,691,123]) && $this->user) {//,4147,691,123,4025
|
|
if ($this->is_had_subscribe && in_array($this->distribution_channel_id, [2, 14, 211,4025,4147,691,123]) && $this->user) {//,4147,691,123,4025
|
|
$this->chapter->is_show_share_button = 1;
|
|
$this->chapter->is_show_share_button = 1;
|
|
}
|
|
}
|
|
|
|
+ if($this->distribution_channel_id == 6985 && $this->domain == 'leyuee'){
|
|
|
|
+ $appid = 'wx126331d1732978b0';
|
|
|
|
+ $appSecret = '76231c41c24d4363243866f5f9dee55f';
|
|
|
|
+ $config = new ChapterShareWechatConfigService($appid,$appSecret);
|
|
|
|
+ //$config->setAccessToken('');
|
|
|
|
+ $config->requestAccessToken();
|
|
|
|
+ $config->requestJsApiTicket();
|
|
|
|
+ $url = sprintf(
|
|
|
|
+ 'https://site%s.leyuee.com/reader?bid=%s&cid=%s',
|
|
|
|
+ $this->en_distribution_channel_id,
|
|
|
|
+ $this->en_bid,
|
|
|
|
+ $this->cid
|
|
|
|
+ );
|
|
|
|
+ $this->chapter->share_config = $config->getJssdkConfig($url);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|