Authored by hf

do modify login call redirect

@@ -76,15 +76,4 @@ class LoginData @@ -76,15 +76,4 @@ class LoginData
76 return Yohobuy::get(Yohobuy::API_URL, $param); 76 return Yohobuy::get(Yohobuy::API_URL, $param);
77 } 77 }
78 78
79 - /**  
80 - * 登出SESSION会话  
81 - *  
82 - * @param string $token 会话  
83 - * @return array  
84 - */  
85 - public static function signoutSession($token)  
86 - {  
87 - return Yohobuy::get( Helpers::logoutSession($token) );  
88 - }  
89 -  
90 } 79 }
@@ -620,10 +620,10 @@ class Helpers @@ -620,10 +620,10 @@ class Helpers
620 * @param string $callback 回调方法名 620 * @param string $callback 回调方法名
621 * @return string 621 * @return string
622 */ 622 */
623 - public static function logoutSession($token, $callback = 'call') 623 + public static function logoutSession($token, $refer = '', $callback = 'call')
624 { 624 {
625 return 'http://mapi.yohobuy.com/Passport/session/logout?callback=' . $callback 625 return 'http://mapi.yohobuy.com/Passport/session/logout?callback=' . $callback
626 - . '&sign=' . md5('Js8Yn0!EwPM45-ws') . '&token=' . $token; 626 + . '&sign=' . md5('Js8Yn0!EwPM45-ws') . '&token=' . $token . '&go=' . $refer;
627 } 627 }
628 628
629 } 629 }
@@ -78,7 +78,7 @@ class LoginController extends AbstractAction @@ -78,7 +78,7 @@ class LoginController extends AbstractAction
78 $refer = $this->server('HTTP_REFERER', SITE_MAIN); 78 $refer = $this->server('HTTP_REFERER', SITE_MAIN);
79 $token = $this->get('token'); 79 $token = $this->get('token');
80 if (!empty($token)) { 80 if (!empty($token)) {
81 - LoginData::signoutSession($token); 81 + $this->go( Helpers::logoutSession($token, $refer) );
82 } 82 }
83 83
84 $this->go($refer); 84 $this->go($refer);