...
|
...
|
@@ -31,7 +31,7 @@ class OptController extends AbstractAction |
|
|
|
|
|
do {
|
|
|
/* 判断品牌ID是否有效 */
|
|
|
$id = $this->post('id');
|
|
|
$id = $this->get('id');
|
|
|
if (!is_numeric($id)) {
|
|
|
break;
|
|
|
}
|
...
|
...
|
@@ -40,12 +40,18 @@ class OptController extends AbstractAction |
|
|
$uid = $this->getUid();
|
|
|
if (!$uid) {
|
|
|
$referer = $this->server('HTTP_REFERER', SITE_MAIN);
|
|
|
$result = array('code' => 400, 'message' => '未登录', 'data' => Helpers::url('/signin.html', array('refer' => $referer)));
|
|
|
$result = array(
|
|
|
'code' => 400,
|
|
|
'message' => '未登录',
|
|
|
'url' => Helpers::url('/signin.html', array(
|
|
|
'refer' => $referer)
|
|
|
)
|
|
|
);
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
/* 取消收藏 */
|
|
|
$opt = $this->post('opt', 'ok');
|
|
|
$opt = $this->get('opt', 'ok');
|
|
|
if ($opt !== 'ok') {
|
|
|
$result = BrandData::favoriteCancel($id, $uid);
|
|
|
break;
|
...
|
...
|
|