Authored by 周少峰

add favorite shop

... ... @@ -122,7 +122,9 @@ class ShopData
$param['gender'] = $gender;
}
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
//TODO
// return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get('http://192.168.102.218:8080/gateway/', $param);
}
/**
... ...
... ... @@ -490,7 +490,7 @@ class IndexController extends AbstractAction
public function shopFavAction()
{
$data = array();
$shopId = $this->get('shop_id', 0);
$shopId = $this->post('shop_id', 0);
$uid = $this->getUid();
do {
if (!$this->isAjax()) {
... ... @@ -498,7 +498,9 @@ class IndexController extends AbstractAction
}
if (empty($uid)) {
$data['code'] = 401;
//TODO app登陆地址
$data['url'] = Helpers::url('/signin.html');
break;
}
if (!empty($shopId) && !empty($uid)) {
$data = ShopData::shopFav($uid, $shopId);
... ... @@ -515,7 +517,7 @@ class IndexController extends AbstractAction
{
$data = array();
$shopId = $this->get('shop_id', 0);
$shopId = $this->post('shop_id', 0);
$uid = $this->getUid();
do {
if (!$this->isAjax()) {
... ...