Commit afeb7343 by 杨树贤

添加用户邀请统计信息接口

parent c720e609
......@@ -49,4 +49,12 @@ class InvitesController extends Controller
return $this->Export(self::INVITE_FAIL);
}
}
public function info(Request $request)
{
$userId = $request->user->user_id;
$result = $this->service->getInviteInfo(['user_id' => $userId]);
return $this->Export(0, 'ok', $result);
}
}
\ No newline at end of file
......@@ -41,4 +41,13 @@ class InviteService extends BaseService
return $result;
}
public function getInviteInfo($map = [])
{
$url = config('website.BaseUrl') . '/invites/info';
$result = reportCurl($url, $map, true);
$result = json_decode($result, true);
return $result;
}
}
\ No newline at end of file
......@@ -54,6 +54,7 @@ $router->group(['middleware' => ['web', 'login']], function () use ($router) {
//邀请好友
$router->post('invites/add', 'InvitesController@store');
$router->get('invites/list', 'InvitesController@index');
$router->get('invites/info', 'InvitesController@info');
});
$router->group(['middleware' => 'web'], function () use ($router) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment