作者 Cool
1 个管道 的构建 通过 耗费 10 秒

新增获取融云账号接口

@@ -360,4 +360,41 @@ class User extends Api @@ -360,4 +360,41 @@ class User extends Api
360 } 360 }
361 $this->success('success',$data); 361 $this->success('success',$data);
362 } 362 }
  363 +
  364 +
  365 +
  366 + /**
  367 + * @ApiTitle (获取用户融云账号信息)
  368 + * @ApiSummary (获取用户融云账号信息)
  369 + * @ApiMethod (POST)
  370 + * @ApiRoute (/api/user/rongyun)
  371 + *
  372 + * @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
  373 + *
  374 + * @ApiReturn({
  375 + "code": 1,
  376 + "msg": "成功",
  377 + "time": "1571492001",
  378 + "data": {
  379 + "id"://融云id
  380 + "token"://融云token
  381 + }
  382 + })
  383 + */
  384 + public function rongyun() {
  385 + $return = [
  386 + 'id' => '',
  387 + 'token' => ''
  388 + ];
  389 + if($this->userId) {
  390 + $user_id = $this->getUserId();
  391 + if($this->user['is_create'] == 1) {
  392 + $return = [
  393 + 'id' => $this->user['rongyun_id'],
  394 + 'token' => $this->user['rongyun_token'],
  395 + ];
  396 + }
  397 + }
  398 + $this->success('成功',$return);
  399 + }
363 } 400 }
@@ -5,8 +5,8 @@ @@ -5,8 +5,8 @@
5 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 5 <meta http-equiv="X-UA-Compatible" content="IE=edge">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0"> 6 <meta name="viewport" content="width=device-width, initial-scale=1.0">
7 <meta name="description" content=""> 7 <meta name="description" content="">
8 - <meta name="author" content="问答小程序">  
9 - <title>问答小程序</title> 8 + <meta name="author" content="小微问问">
  9 + <title>小微问问</title>
10 10
11 <!-- Bootstrap Core CSS --> 11 <!-- Bootstrap Core CSS -->
12 <link href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"> 12 <link href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
@@ -109,7 +109,7 @@ @@ -109,7 +109,7 @@
109 <span class="icon-bar"></span> 109 <span class="icon-bar"></span>
110 <span class="icon-bar"></span> 110 <span class="icon-bar"></span>
111 </button> 111 </button>
112 - <a class="navbar-brand" href="https://www.fastadmin.net" target="_blank">问答小程序</a> 112 + <a class="navbar-brand" href="https://www.fastadmin.net" target="_blank">小微问问</a>
113 </div> 113 </div>
114 <div class="navbar-collapse collapse"> 114 <div class="navbar-collapse collapse">
115 <form class="navbar-form navbar-right"> 115 <form class="navbar-form navbar-right">
@@ -214,6 +214,7 @@ @@ -214,6 +214,7 @@
214 <a href="javascript:;" data-id="52" class="list-group-item">小程序登录注册</a> 214 <a href="javascript:;" data-id="52" class="list-group-item">小程序登录注册</a>
215 <a href="javascript:;" data-id="53" class="list-group-item">通过code获取token</a> 215 <a href="javascript:;" data-id="53" class="list-group-item">通过code获取token</a>
216 <a href="javascript:;" data-id="54" class="list-group-item">判断用户身份</a> 216 <a href="javascript:;" data-id="54" class="list-group-item">判断用户身份</a>
  217 + <a href="javascript:;" data-id="55" class="list-group-item">获取用户融云账号信息</a>
217 </div> 218 </div>
218 </div> 219 </div>
219 </div> 220 </div>
@@ -8314,13 +8315,141 @@ @@ -8314,13 +8315,141 @@
8314 </div> 8315 </div>
8315 </div> 8316 </div>
8316 </div> 8317 </div>
  8318 + <div class="panel panel-default">
  8319 + <div class="panel-heading" id="heading-55">
  8320 + <h4 class="panel-title">
  8321 + <span class="label label-primary">POST</span>
  8322 + <a data-toggle="collapse" data-parent="#accordion55" href="#collapseOne55"> 获取用户融云账号信息 <span class="text-muted">/api/user/rongyun</span></a>
  8323 + </h4>
  8324 + </div>
  8325 + <div id="collapseOne55" class="panel-collapse collapse">
  8326 + <div class="panel-body">
  8327 +
  8328 + <!-- Nav tabs -->
  8329 + <ul class="nav nav-tabs" id="doctab55">
  8330 + <li class="active"><a href="#info55" data-toggle="tab">基础信息</a></li>
  8331 + <li><a href="#sandbox55" data-toggle="tab">在线测试</a></li>
  8332 + <li><a href="#sample55" data-toggle="tab">返回示例</a></li>
  8333 + </ul>
  8334 +
  8335 + <!-- Tab panes -->
  8336 + <div class="tab-content">
  8337 +
  8338 + <div class="tab-pane active" id="info55">
  8339 + <div class="well">
  8340 + 获取用户融云账号信息 </div>
  8341 + <div class="panel panel-default">
  8342 + <div class="panel-heading"><strong>Headers</strong></div>
  8343 + <div class="panel-body">
  8344 + <table class="table table-hover">
  8345 + <thead>
  8346 + <tr>
  8347 + <th>名称</th>
  8348 + <th>类型</th>
  8349 + <th>必选</th>
  8350 + <th>描述</th>
  8351 + </tr>
  8352 + </thead>
  8353 + <tbody>
  8354 + <tr>
  8355 + <td>token</td>
  8356 + <td>string</td>
  8357 + <td></td>
  8358 + <td>请求的Token</td>
  8359 + </tr>
  8360 + </tbody>
  8361 + </table>
  8362 + </div>
  8363 + </div>
  8364 + <div class="panel panel-default">
  8365 + <div class="panel-heading"><strong>参数</strong></div>
  8366 + <div class="panel-body">
  8367 +
  8368 + </div>
  8369 + </div>
  8370 + <div class="panel panel-default">
  8371 + <div class="panel-heading"><strong>正文</strong></div>
  8372 + <div class="panel-body">
  8373 +</div>
  8374 + </div>
  8375 + </div><!-- #info -->
  8376 +
  8377 + <div class="tab-pane" id="sandbox55">
  8378 + <div class="row">
  8379 + <div class="col-md-12">
  8380 + <div class="panel panel-default">
  8381 + <div class="panel-heading"><strong>Headers</strong></div>
  8382 + <div class="panel-body">
  8383 + <div class="headers">
  8384 + <div class="form-group">
  8385 + <label class="control-label" for="token">token</label>
  8386 + <input type="string" class="form-control input-sm" id="token" required placeholder="请求的Token - Ex: " name="token">
  8387 + </div>
  8388 + </div>
  8389 + </div>
  8390 + </div>
  8391 + <div class="panel panel-default">
  8392 + <div class="panel-heading"><strong>参数</strong></div>
  8393 + <div class="panel-body">
  8394 + <form enctype="application/x-www-form-urlencoded" role="form" action="/api/user/rongyun" method="POST" name="form55" id="form55">
  8395 + <div class="form-group">
  8396 +
  8397 + </div>
  8398 + <div class="form-group">
  8399 + <button type="submit" class="btn btn-success send" rel="55">提交</button>
  8400 + <button type="reset" class="btn btn-info" rel="55">重置</button>
  8401 + </div>
  8402 + </form>
  8403 + </div>
  8404 + </div>
  8405 + <div class="panel panel-default">
  8406 + <div class="panel-heading"><strong>响应输出</strong></div>
  8407 + <div class="panel-body">
  8408 + <div class="row">
  8409 + <div class="col-md-12" style="overflow-x:auto">
  8410 + <pre id="response_headers55"></pre>
  8411 + <pre id="response55"></pre>
  8412 + </div>
  8413 + </div>
  8414 + </div>
  8415 + </div>
  8416 + <div class="panel panel-default">
  8417 + <div class="panel-heading"><strong>返回参数</strong></div>
  8418 + <div class="panel-body">
  8419 +
  8420 + </div>
  8421 + </div>
  8422 + </div>
  8423 + </div>
  8424 + </div><!-- #sandbox -->
  8425 +
  8426 + <div class="tab-pane" id="sample55">
  8427 + <div class="row">
  8428 + <div class="col-md-12">
  8429 + <pre id="sample_response55">{
  8430 + "code": 1,
  8431 + "msg": "成功",
  8432 + "time": "1571492001",
  8433 + "data": {
  8434 + "id"://融云id
  8435 + "token"://融云token
  8436 + }
  8437 + }</pre>
  8438 + </div>
  8439 + </div>
  8440 + </div><!-- #sample -->
  8441 +
  8442 + </div><!-- .tab-content -->
  8443 + </div>
  8444 + </div>
  8445 + </div>
8317 </div> 8446 </div>
8318 8447
8319 <hr> 8448 <hr>
8320 8449
8321 <div class="row mt0 footer"> 8450 <div class="row mt0 footer">
8322 <div class="col-md-6" align="left"> 8451 <div class="col-md-6" align="left">
8323 - Generated on 2020-02-27 22:24:53 </div> 8452 + Generated on 2020-03-07 09:32:17 </div>
8324 <div class="col-md-6" align="right"> 8453 <div class="col-md-6" align="right">
8325 <a href="https://www.fastadmin.net" target="_blank">FastAdmin</a> 8454 <a href="https://www.fastadmin.net" target="_blank">FastAdmin</a>
8326 </div> 8455 </div>