赞
踩
protected $appid = '';
protected $secret = '';
protected $loginUrl = 'https://api.weixin.qq.com/sns/jscode2session';
public function login()
{
$code = $this->request->request('code');
if (!$code) {
$this->error('code不能为空');
}
$_code = self::getOpenid($code);
$sessionKey = $_code['session_key'];
$openid = $_code['openid'];
$encryptedData = $this->request->request('encryptedData');
$iv = $this->request->request('iv');
if (empty($encryptedData) || empty($iv) || empty($sessionKey) || empty($openid)) {
$this->error('缺少参数');
}
$errCode = self::decryptData($encryptedData, $iv, $data, $sessionKey, $this->appid);
if (
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。