Update.php 873 字节
<?php


namespace app\api\controller;


use app\common\controller\Api;

/**
 * 改版接口
 */
class Update extends Api
{
    protected $noNeedLogin = ['*'];
    protected $noNeedRight = '*';


    /**
     * 商城板块接口
     * @ApiTitle    (token换UserId)
     * @ApiSummary  (token换UserId)
     * @ApiMethod   (POST)
     * @ApiRoute    (/api/Update/TokenToUser)
     * @ApiHeaders  (name=token, type=string, required=true, description="请求的Token")
     * @ApiReturnParams   (name="code", type="integer", required=true, sample="0")
     * @ApiReturnParams   (name="msg", type="string", required=true, sample="返回成功")
     * @ApiReturn   ({
    'code':'1',
    'msg':'返回成功',
    })
     */
    public function TokenToUser()
    {
        $UserId = $this->is_token($this->request->header());
        $this->success('成功', $UserId);
    }
}