Authored by hf

do modify huodong cuxiao coupon page 2 brands links

... ... @@ -32,6 +32,7 @@ class Yohobuy
const API_URL_SHOPINGCART = 'http://192.168.102.213:8080/api-gateway-web/'; // 我的购物车接口URL
const API_URL_PRODUCTDETAIL = 'http://192.168.102.212:8083/product/'; // 商品详情页
const API_URL_LOGISTICS = 'http://192.168.102.205:8080/gateway'; //查看物流接口URL
const API_URL_LOGINSESSION = 'http://m1.yohobuy.com/';
/**
* 私钥列表
... ...
<?php
namespace LibModels\Wap\Passport;
use Api\Sign;
... ... @@ -71,4 +72,35 @@ class LoginData
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 写入SESSION会话
*
* @param int $uid 用户ID
* @return array
*/
public static function signinSession($uid)
{
$param = array();
$param['uid'] = $uid;
$param['token'] = md5($uid . '#@!@#');
return Yohobuy::get(Yohobuy::API_URL_LOGINSESSION . 'Passport/session/index', $param);
}
/**
* 写入SESSION会话
*
* @param int $uid 用户ID
* @return array
*/
public static function checkSession($uid)
{
$param = array();
$param['uid'] = $uid;
$param['token'] = md5($uid . '#@!@#');
return Yohobuy::get(Yohobuy::API_URL_LOGINSESSION . 'Passport/session/val', $param);
}
}
... ...
... ... @@ -31,9 +31,17 @@ class DetailData
*/
public static function baseInfo($productId, $uid)
{
return Yohobuy::jsonPost(Yohobuy::API_URL_PRODUCTDETAIL . self::PRODUCT_BASE_INFO, array(
'param' => intval($productId), 'userId' => intval($uid)
));
$param = Yohobuy::param();
$param['method'] = 'h5.product.data';
$param['product_id'] = $productId;
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::post(Yohobuy::API_URL, $param);
// return Yohobuy::jsonPost(Yohobuy::API_URL_PRODUCTDETAIL . self::PRODUCT_BASE_INFO, array(
// 'param' => intval($productId), 'userId' => intval($uid)
// ));
}
/**
... ...
... ... @@ -19,6 +19,9 @@ class LoginController extends AbstractAction
{
$this->setTitle('登录');
$refer = $this->get('refer', SITE_MAIN . '/?go=1');
$this->setCookie('refer', $refer);
$data = array(
'loginIndex' => true, // 模板中使用JS的标识
'backUrl' => '/', // 返回的URL链接
... ... @@ -33,8 +36,6 @@ class LoginController extends AbstractAction
'emailRetriveUrl' => '/passport/back/email', // 通过邮箱找回密码的URL链接
);
// 生成HTML(signin.html)
$this->_view->html('signin');
// 渲染模板
$this->_view->display('index', $data);
}
... ... @@ -53,9 +54,7 @@ class LoginController extends AbstractAction
$data['isPassportPage'] = true; // 模板中模块标识
$data['areaCode'] = '+86'; // 默认区号
$data['countrys'] = RegData::getAreasData(); // 地区信息列表
//
// 生成HTML(login.html)
$this->_view->html('login');
// 渲染模板
$this->_view->display('international', $data);
}
... ... @@ -124,8 +123,7 @@ class LoginController extends AbstractAction
// $name = $profile['data']['mobile'];
// }
$data['data'] = '/'; // @todo
}
while (false);
} while (false);
$this->echoJson($data);
}
... ... @@ -188,8 +186,7 @@ class LoginController extends AbstractAction
$nickname = $userInfo['response']['user_info']['user_name'];
// $alipayEmail = $userInfo['response']['user_info']['email'];
}
}
else {
} else {
$nickname = $_GET['real_name'];
// $alipayEmail = isset($_GET['email']) ? $_GET['email'] : '';
}
... ...
... ... @@ -272,7 +272,7 @@ class RegController extends AbstractAction
if (empty($refer)) {
$refer = SITE_MAIN . '/?go=1';
}
$data['data'] = $refer;
$data['data'] = rawurldecode($refer);
}
} while (false);
... ...