|
@@ -209,9 +209,10 @@ class BeanRepository
|
|
//获取每日新闻
|
|
//获取每日新闻
|
|
function getNews($request) {
|
|
function getNews($request) {
|
|
try {
|
|
try {
|
|
|
|
+ $sign = generateSign([], config('customer.app_secret'));
|
|
$url = config("customer.app_service_url").'/config/v2/starNews/lists';
|
|
$url = config("customer.app_service_url").'/config/v2/starNews/lists';
|
|
$array = [
|
|
$array = [
|
|
- 'json' => [], 'query' => [], 'http_errors' => false,'headers'=>['Authorization'=>"Bearer ".JWTAuth::getToken()]
|
|
|
|
|
|
+ 'json' => ['sign' => $sign], 'query' => [], 'http_errors' => false
|
|
];
|
|
];
|
|
return http($url,$array,'get');
|
|
return http($url,$array,'get');
|
|
} catch (\Exception $e) {
|
|
} catch (\Exception $e) {
|
|
@@ -250,7 +251,7 @@ class BeanRepository
|
|
Log::debug($exchange);
|
|
Log::debug($exchange);
|
|
|
|
|
|
$post_detail = new Post();
|
|
$post_detail = new Post();
|
|
- if (isset($request['post_id'])){
|
|
|
|
|
|
+ if (isset($request['post_id']) && $request['post_id']){
|
|
$post = $post_detail->
|
|
$post = $post_detail->
|
|
join('post_data', 'post_data.post_id', '=', 'post.id')
|
|
join('post_data', 'post_data.post_id', '=', 'post.id')
|
|
->select('post.*','post_data.pv')
|
|
->select('post.*','post_data.pv')
|
|
@@ -265,6 +266,9 @@ class BeanRepository
|
|
$post->imgs = $imgs;
|
|
$post->imgs = $imgs;
|
|
$post->topic = $post->topic();
|
|
$post->topic = $post->topic();
|
|
$star_detail['post'] = $post;
|
|
$star_detail['post'] = $post;
|
|
|
|
+ }else{
|
|
|
|
+ Log::debug($request['post_id']);
|
|
|
|
+ return jsonError('该帖子已被删除');
|
|
}
|
|
}
|
|
}
|
|
}
|
|
$user_info = $this->getUserInfo($invite_code = $request['invite_code']);
|
|
$user_info = $this->getUserInfo($invite_code = $request['invite_code']);
|