Skip to content

Commit 06eeb6c

Browse files
author
ranjiaxiang
committed
format
1 parent 7e53c8b commit 06eeb6c

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

src/Wechat/Authorize.php

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class Authorize
4040

4141
const API_USER = 'https://qyapi.weixin.qq.com/cgi-bin/service/get_login_info';
4242
const API_URL = 'https://qy.weixin.qq.com/cgi-bin/loginpage';
43-
const API_SERVICE_URL = 'https://qyapi.weixin.qq.com/cgi-bin/service/get_login_url';
43+
const API_SERVICE_URL = 'https://qyapi.weixin.qq.com/cgi-bin/service/get_login_url';
4444

4545
/**
4646
* constructor.
@@ -70,13 +70,13 @@ public function url($to = null, $state = 'STATE', $usertype = 'admin')
7070
$to !== null || $to = Url::current();
7171

7272
$params = array(
73-
'corp_id' => $this->appId,
74-
'redirect_uri' => $to,
75-
'state' => $state,
76-
'usertype' => $usertype
77-
);
73+
'corp_id' => $this->appId,
74+
'redirect_uri' => $to,
75+
'state' => $state,
76+
'usertype' => $usertype
77+
);
7878

79-
return self::API_URL.'?'.http_build_query($params);
79+
return self::API_URL . '?' . http_build_query($params);
8080
}
8181

8282
/**
@@ -89,7 +89,7 @@ public function url($to = null, $state = 'STATE', $usertype = 'admin')
8989
public function redirect($to = null, $state = null, $usertype = null)
9090
{
9191
$state = $state ? $state : md5(time());
92-
header('Location:'.$this->url($to, $state, $usertype));
92+
header('Location:' . $this->url($to, $state, $usertype));
9393

9494
exit;
9595
}
@@ -102,24 +102,24 @@ public function user()
102102
{
103103
return $this->http->jsonPost(self::API_USER, array('auth_code' => $this->input->get('auth_code')));
104104
}
105-
105+
106106
/**
107107
* 获取登录企业号官网的URL.
108-
*
109-
* @param string $loginTicket
110-
* @param string $target
111-
* @param integer $agentId
112-
*
108+
*
109+
* @param string $loginTicket
110+
* @param string $target
111+
* @param integer $agentId
112+
*
113113
* @return array
114114
*/
115115
public function getUrl($loginTicket, $target, $agentId = null)
116116
{
117-
$params = array(
118-
'login_ticket' => $loginTicket,
119-
'target' => $target,
120-
'agentid' => $agentId
121-
);
122-
117+
$params = array(
118+
'login_ticket' => $loginTicket,
119+
'target' => $target,
120+
'agentid' => $agentId
121+
);
122+
123123
return $this->http->jsonPost(self::API_SERVICE_URL, $params);
124124
}
125125

0 commit comments

Comments
 (0)