...
|
...
|
@@ -162,6 +162,34 @@ class User extends Api |
|
|
$this->success('Logged in successful', $return);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 获得微信手机号
|
|
|
*
|
|
|
*
|
|
|
*
|
|
|
* @ApiTitle (小程序登录)
|
|
|
* @ApiSummary (小程序登录)
|
|
|
* @ApiMethod (POST)
|
|
|
* @ApiParams (name="iv", type="string", required=true, description="iv")
|
|
|
* @ApiParams (name="sessionKey", type="string", required=true, description="sessionKey")
|
|
|
* @ApiParams (name="encryptedData", type="string", required=true, description="encryptedData")
|
|
|
* @ApiReturnParams (name="code", type="integer", required=true, sample="0")
|
|
|
* @ApiReturnParams (name="msg", type="string", required=true, sample="返回成功")
|
|
|
* @ApiReturnParams (name="data", type="object", sample="{}", description="扩展数据返回")
|
|
|
* @ApiReturn ({'code':'1','msg':'返回成功'})
|
|
|
*
|
|
|
*/
|
|
|
public function getUserInfo(){
|
|
|
$iv = $this->request->request('iv');
|
|
|
$sessionKey = $this->request->request('sessionKey');
|
|
|
$encryptedData = $this->request->request('encryptedData');
|
|
|
|
|
|
$mini = new \WeMini\Crypt($this->config);
|
|
|
$return = $mini->decode($iv,$sessionKey,$encryptedData);
|
|
|
|
|
|
$this->success('', $return);
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 小程序登录
|
...
|
...
|
|