@@ -33,7 +33,7 @@ |
||
| 33 | 33 | if($_GET['scope'] == 'snsapi_login'){ |
| 34 | 34 | //扫码登录 |
| 35 | 35 | $AuthorizeURL = $this->AuthorizeURL . '/connect/qrconnect'; |
| 36 | - }else{ |
|
| 36 | + } else{ |
|
| 37 | 37 | $AuthorizeURL = $this->AuthorizeURL . '/connect/oauth2/authorize'; |
| 38 | 38 | } |
| 39 | 39 | |
@@ -42,9 +42,9 @@ discard block |
||
| 42 | 42 | if($name == 'wechat'){ |
| 43 | 43 | if(!Tool::isMobile()){ |
| 44 | 44 | $this->config = $this->config['pc'];//微信pc扫码登录 |
| 45 | - }elseif(Tool::isWeiXin()){ |
|
| 45 | + } elseif(Tool::isWeiXin()){ |
|
| 46 | 46 | $this->config = $this->config['mobile'];//微信浏览器中打开 |
| 47 | - }else{ |
|
| 47 | + } else{ |
|
| 48 | 48 | echo '请使用微信打开!';exit();//手机浏览器打开 |
| 49 | 49 | } |
| 50 | 50 | } |
@@ -59,7 +59,9 @@ discard block |
||
| 59 | 59 | */ |
| 60 | 60 | public function login($name,$state=""){ |
| 61 | 61 | /** 获取配置 */ |
| 62 | - if($name == 'wx') $name = 'wechat'; |
|
| 62 | + if($name == 'wx') { |
|
| 63 | + $name = 'wechat'; |
|
| 64 | + } |
|
| 63 | 65 | $this->getConfig($name); |
| 64 | 66 | $this->config['state'] = $state; |
| 65 | 67 | |
@@ -94,7 +96,9 @@ discard block |
||
| 94 | 96 | public function callback($name) |
| 95 | 97 | { |
| 96 | 98 | /** 获取配置 */ |
| 97 | - if($name == 'wx') $name = 'wechat'; |
|
| 99 | + if($name == 'wx') { |
|
| 100 | + $name = 'wechat'; |
|
| 101 | + } |
|
| 98 | 102 | $this->getConfig($name); |
| 99 | 103 | |
| 100 | 104 | /** 初始化实例类 */ |