...
|
...
|
@@ -15,6 +15,7 @@ use cmf\lib\Storage; |
|
|
use think\Db;
|
|
|
use anerg\OAuth2\OAuth;
|
|
|
use think\Config;
|
|
|
use app\portal\model\PortalPostModel;
|
|
|
|
|
|
class LoginController extends HomeBaseController
|
|
|
{
|
...
|
...
|
@@ -450,6 +451,7 @@ class LoginController extends HomeBaseController |
|
|
$token = session('token');
|
|
|
$title = $this->request->post('title');//分享标题
|
|
|
$share_url = $this->request->post('share_url');//分享url
|
|
|
$article_id = $this->request->post('article_id');//分享文章id
|
|
|
$url = 'https://api.weibo.com/2/statuses/share.json';
|
|
|
$data = [
|
|
|
'access_token' => $token,
|
...
|
...
|
@@ -460,6 +462,8 @@ class LoginController extends HomeBaseController |
|
|
if(isset($json_arr['error_code'])&&!empty($json_arr['error_code'])){
|
|
|
$this->apiResponse(0,$json_arr['error']);
|
|
|
}
|
|
|
$postModel = new PortalPostModel();
|
|
|
$postModel->where('id',$article_id)->setInc('post_share_wb',1);
|
|
|
$this->apiResponse(1,'分享成功!');
|
|
|
}
|
|
|
|
...
|
...
|
|