|
@@ -117,7 +117,8 @@ class UserController extends BaseController {
|
|
|
$rules = [
|
|
|
'account' => ['string', 'reg' => '/^[a-z0-9\.]{1,13}$/', 'desc' => 'eos账号'],
|
|
|
'access_token' => ['string', 'len' => 36, 'desc' => 'access_token'],
|
|
|
- 'trx_id' => ['string', 'desc' => '交易id']
|
|
|
+ 'trx_id' => ['string', 'desc' => '交易id'],
|
|
|
+ 'group_id' => ['int', 'nullable' => true, 'desc' => '群id'],
|
|
|
];
|
|
|
Param::checkParam2($rules, $args);
|
|
|
|
|
@@ -162,6 +163,16 @@ class UserController extends BaseController {
|
|
|
Response::error($e->getCode(), $e->getMessage());
|
|
|
}
|
|
|
|
|
|
+ // 带群id检测是否加入群
|
|
|
+ if ($args['group_id']) {
|
|
|
+ try {
|
|
|
+ (new GroupInfo())->joinGroup($data['user_id'], $args['group_id']);
|
|
|
+ } catch (Exception $e) {
|
|
|
+ var_log($e->getMessage());
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
return $data;
|
|
|
}
|
|
|
|