|
@@ -8,6 +8,7 @@ namespace app\index\controller;
|
|
|
|
|
|
|
|
|
use app\common\service\CommonService;
|
|
|
+use app\index\exception\ApiException;
|
|
|
use think\facade\Session;
|
|
|
|
|
|
class Index {
|
|
@@ -18,6 +19,9 @@ class Index {
|
|
|
$visitorId = input('visitorId');
|
|
|
$notifyUrl = input('notify_url');
|
|
|
$channelId = input('channelId');
|
|
|
+ if (empty($channelId)){
|
|
|
+ throw new ApiException('渠道id不为空');
|
|
|
+ }
|
|
|
$data = CommonService::getSetData($channelId);
|
|
|
if (empty(Session::get('wxId'))){
|
|
|
header("Location:".CommonService::getAuthUrl($channelId));
|