|
...
|
...
|
@@ -21,6 +21,10 @@ class AyrShareController extends BaseController |
|
|
|
*/
|
|
|
|
public function lists(AyrShareModel $ayrShareModel){
|
|
|
|
$lists = $ayrShareModel->lists($this->map,$this->page,$this->row,'id',['*']);
|
|
|
|
$ayrShareHelper = new AyrShareHelper();
|
|
|
|
foreach ($lists['list'] as $k=>$v){
|
|
|
|
$lists['list'][$k]['ayr'] = $ayrShareHelper->get_profiles_users($v['profile_key']);
|
|
|
|
}
|
|
|
|
$this->response('列表',Code::SUCCESS,$lists);
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -88,7 +92,6 @@ class AyrShareController extends BaseController |
|
|
|
//发送请求注册社交用户
|
|
|
|
$ayrShareHelper = new AyrShareHelper();
|
|
|
|
$data = [
|
|
|
|
'domain'=>'develop.globalso.com',
|
|
|
|
'profileKey'=>$info['profile_key']
|
|
|
|
];
|
|
|
|
$res = $ayrShareHelper->post_generate_jwt($data);
|
|
...
|
...
|
@@ -97,4 +100,31 @@ class AyrShareController extends BaseController |
|
|
|
}
|
|
|
|
$this->response('success',Code::SUCCESS,$res);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @name :(获取当前用户的配置文件)get_profiles
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/5/6 16:39
|
|
|
|
*/
|
|
|
|
public function get_profiles(AyrShareLogic $ayrShareLogic){
|
|
|
|
$this->request->validate([
|
|
|
|
'id'=>['required']
|
|
|
|
],[
|
|
|
|
'id.required' => 'ID不能为空'
|
|
|
|
]);
|
|
|
|
$info = $ayrShareLogic->ayr_share_info();
|
|
|
|
//发送请求注册社交用户
|
|
|
|
$ayrShareHelper = new AyrShareHelper();
|
|
|
|
$data = [
|
|
|
|
'title'=>$info['title'],
|
|
|
|
'refId'=>$info['ref_id'],
|
|
|
|
'profileKeys'=>$info['profile_keys']
|
|
|
|
];
|
|
|
|
$res = $ayrShareHelper->post_generate_jwt($data);
|
|
|
|
if($res['status'] == 'fail'){
|
|
|
|
$this->response($res['message'],Code::USER_ERROR);
|
|
|
|
}
|
|
|
|
$this->response('success',Code::SUCCESS,$res);
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|