...
|
...
|
@@ -631,7 +631,8 @@ class IndexController extends AbstractAction |
|
|
*/
|
|
|
public function shopFavAction()
|
|
|
{
|
|
|
header('Access-Control-Allow-Origin:*');
|
|
|
header('Access-Control-Allow-Origin:' . $_SERVER['HTTP_ORIGIN']);
|
|
|
header('Access-Control-Allow-Credentials:true');
|
|
|
$data = array();
|
|
|
$shopId = $this->get('shop_id', 0);
|
|
|
$appVersion = $this->get('app_version', 0);
|
...
|
...
|
@@ -641,9 +642,6 @@ class IndexController extends AbstractAction |
|
|
$uid = $this->getUid();
|
|
|
}
|
|
|
do {
|
|
|
// if (!$this->isAjax()) {
|
|
|
// break;
|
|
|
// }
|
|
|
if (empty($uid)) {
|
|
|
$data['code'] = 401;
|
|
|
$refer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';
|
...
|
...
|
@@ -667,7 +665,8 @@ class IndexController extends AbstractAction |
|
|
*/
|
|
|
public function cancelShopFavAction()
|
|
|
{
|
|
|
header('Access-Control-Allow-Origin:*');
|
|
|
header('Access-Control-Allow-Origin:' . $_SERVER['HTTP_ORIGIN']);
|
|
|
header('Access-Control-Allow-Credentials:true');
|
|
|
$data = array();
|
|
|
$shopId = $this->get('shop_id', 0);
|
|
|
$appVersion = $this->get('app_version', 0);
|
...
|
...
|
@@ -676,14 +675,9 @@ class IndexController extends AbstractAction |
|
|
} else {
|
|
|
$uid = $this->getUid();
|
|
|
}
|
|
|
do {
|
|
|
// if (!$this->isAjax()) {
|
|
|
// break;
|
|
|
// }
|
|
|
if (!empty($shopId) && !empty($uid)) {
|
|
|
$data = ShopData::cancelShopFav($uid, $shopId);
|
|
|
}
|
|
|
} while(false);
|
|
|
if (!empty($shopId) && !empty($uid)) {
|
|
|
$data = ShopData::cancelShopFav($uid, $shopId);
|
|
|
}
|
|
|
$this->echoJson($data);
|
|
|
}
|
|
|
|
...
|
...
|
|