...
|
...
|
@@ -5,6 +5,7 @@ namespace app\api\controller; |
|
|
|
|
|
|
|
|
use app\common\controller\Api;
|
|
|
use think\Db;
|
|
|
|
|
|
/**
|
|
|
* 改版接口
|
...
|
...
|
@@ -27,6 +28,7 @@ class Update extends Api |
|
|
* @ApiReturn ({
|
|
|
'code':'1',
|
|
|
'msg':'返回成功',
|
|
|
"data": 29 用户UserID
|
|
|
})
|
|
|
*/
|
|
|
public function TokenToUser()
|
...
|
...
|
@@ -34,4 +36,29 @@ class Update extends Api |
|
|
$UserId = $this->is_token($this->request->header());
|
|
|
$this->success('成功', $UserId);
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 商城板块接口
|
|
|
* @ApiTitle (被邀请页)
|
|
|
* @ApiSummary (被邀请页)
|
|
|
* @ApiMethod (POST)
|
|
|
* @ApiRoute (/api/Update/InviteHtml)
|
|
|
* @ApiParams (name="user_id", type="int", required=true, description="用户UserID")
|
|
|
* @ApiReturnParams (name="code", type="integer", required=true, sample="0")
|
|
|
* @ApiReturnParams (name="msg", type="string", required=true, sample="返回成功")
|
|
|
* @ApiReturn ({
|
|
|
'code':'1',
|
|
|
'msg':'返回成功',
|
|
|
})
|
|
|
*/
|
|
|
public function InviteHtml()
|
|
|
{
|
|
|
$UserId = input('user_id');
|
|
|
$Info = Db::name('user')->where('id', $UserId)->find();
|
|
|
if (empty($Info)) {
|
|
|
$this->error('网络异常', 0);
|
|
|
}
|
|
|
$this->success('成功', ['Nickname' => $Info['nickname'], 'Avatar' => $Info['avatar']]);
|
|
|
}
|
|
|
} |
|
|
\ No newline at end of file |
...
|
...
|
|