Showing
1 changed file
with
12 additions
and
2 deletions
@@ -799,7 +799,12 @@ class Helpers | @@ -799,7 +799,12 @@ class Helpers | ||
799 | */ | 799 | */ |
800 | public static function syncUserSession($uid, $refer = '', $callback = 'call') | 800 | public static function syncUserSession($uid, $refer = '', $callback = 'call') |
801 | { | 801 | { |
802 | - return 'http://mapi.yohobuy.com/Passport/session/index?callback=' . $callback | 802 | + if(APPLICATION_ENV == 'production') { |
803 | + $domain = 'http://mapi.yohobuy.com'; | ||
804 | + } else { | ||
805 | + $domain = 'http://m1.yohobuy.com'; | ||
806 | + } | ||
807 | + return $domain.'/Passport/session/index?callback=' . $callback | ||
803 | . '&sign=' . md5(md5($uid . 'Js8Yn0!EwPM45-ws')) . '&uid=' . $uid . '&go=' . $refer; | 808 | . '&sign=' . md5(md5($uid . 'Js8Yn0!EwPM45-ws')) . '&uid=' . $uid . '&go=' . $refer; |
804 | } | 809 | } |
805 | 810 | ||
@@ -815,7 +820,12 @@ class Helpers | @@ -815,7 +820,12 @@ class Helpers | ||
815 | */ | 820 | */ |
816 | public static function logoutSession($token, $refer = '', $callback = 'call') | 821 | public static function logoutSession($token, $refer = '', $callback = 'call') |
817 | { | 822 | { |
818 | - return 'http://mapi.yohobuy.com/Passport/session/logout?callback=' . $callback | 823 | + if(APPLICATION_ENV == 'production') { |
824 | + $domain = 'http://mapi.yohobuy.com'; | ||
825 | + } else { | ||
826 | + $domain = 'http://m1.yohobuy.com'; | ||
827 | + } | ||
828 | + return $domain.'/Passport/session/logout?callback=' . $callback | ||
819 | . '&sign=' . md5(md5('Js8Yn0!EwPM45-ws')) . '&token=' . $token . '&go=' . $refer; | 829 | . '&sign=' . md5(md5('Js8Yn0!EwPM45-ws')) . '&token=' . $token . '&go=' . $refer; |
820 | } | 830 | } |
821 | 831 |
-
Please register or login to post a comment