...
|
...
|
@@ -800,8 +800,24 @@ class Helpers |
|
|
*/
|
|
|
public static function syncUserSession($uid, $refer = '', $callback = 'call')
|
|
|
{
|
|
|
return 'http://mapi.yohobuy.com/Passport/session/index?callback=' . $callback
|
|
|
. '&sign=' . md5(md5($uid . 'Js8Yn0!EwPM45-ws')) . '&uid=' . $uid . '&go=' . $refer;
|
|
|
$url = '';
|
|
|
switch (APPLICATION_ENV) {
|
|
|
case 'production':
|
|
|
$url = 'http://mapi.yohobuy.com';
|
|
|
break;
|
|
|
case 'preview':
|
|
|
$url = 'https://login.m.yohobuy.com';
|
|
|
break;
|
|
|
case 'testing':
|
|
|
$url = 'http://m1.yohobuy.com';
|
|
|
break;
|
|
|
default:
|
|
|
$url = 'http://m1.yohobuy.com';
|
|
|
break;
|
|
|
}
|
|
|
$url .= '/Passport/session/index?callback=' . $callback . '&sign=' . md5(md5($uid . 'Js8Yn0!EwPM45-ws')) . '&uid=' . $uid . '&go=' . $refer;
|
|
|
|
|
|
return $url;
|
|
|
}
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -809,15 +825,31 @@ class Helpers |
|
|
*
|
|
|
* 转向老的PHP服务器上处理, 因购物车相关的操作会依赖SESSION
|
|
|
*
|
|
|
* @param int $uid 用户ID
|
|
|
* @param int $token 用户ID
|
|
|
* @param string $refer 访问来源
|
|
|
* @param string $callback 回调方法名
|
|
|
* @return string
|
|
|
*/
|
|
|
public static function logoutSession($token, $refer = '', $callback = 'call')
|
|
|
{
|
|
|
return 'http://mapi.yohobuy.com/Passport/session/logout?callback=' . $callback
|
|
|
. '&sign=' . md5(md5('Js8Yn0!EwPM45-ws')) . '&token=' . $token . '&go=' . $refer;
|
|
|
$url = '';
|
|
|
switch (APPLICATION_ENV) {
|
|
|
case 'production':
|
|
|
$url = 'http://mapi.yohobuy.com';
|
|
|
break;
|
|
|
case 'preview':
|
|
|
$url = 'https://login.m.yohobuy.com';
|
|
|
break;
|
|
|
case 'testing':
|
|
|
$url = 'http://m1.yohobuy.com';
|
|
|
break;
|
|
|
default:
|
|
|
$url = 'http://m1.yohobuy.com';
|
|
|
break;
|
|
|
}
|
|
|
$url .= '/Passport/session/logout?callback=' . $callback . '&sign=' . md5(md5('Js8Yn0!EwPM45-ws')) . '&token=' . $token . '&go=' . $refer;
|
|
|
|
|
|
return $url;
|
|
|
}
|
|
|
|
|
|
/**
|
...
|
...
|
|