jsapi签名
This commit is contained in:
@@ -38,6 +38,29 @@ class AuthController extends BaseController
|
||||
return $this->error($e->getMessage().$e->getLine().$e->getFile());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* JSAPI鉴权签名
|
||||
* @param Request $request
|
||||
* @return \support\Response
|
||||
*/
|
||||
public function signature(Request $request)
|
||||
{
|
||||
try {
|
||||
$app_id = $request->get('app_id', '');
|
||||
$url = $request->get('url', '');
|
||||
if (empty($app_id)) {
|
||||
throw new BusinessException('app_id 参数不能为空');
|
||||
}
|
||||
if (empty($url)) {
|
||||
throw new BusinessException('url 参数不能为空');
|
||||
}
|
||||
$result = (new AuthService())->feishuSignature($app_id, $url);
|
||||
return $this->success($result);
|
||||
} catch (\Throwable $e) {
|
||||
return $this->error($e->getMessage().$e->getLine().$e->getFile());
|
||||
}
|
||||
}
|
||||
|
||||
public function login(Request $request)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user