Authored by 郭成尧

brand-fav-bug

... ... @@ -612,7 +612,7 @@ if ($brandHeader.length > 0) {
} else {
tip.show('取消收藏成功');
}
} else if (data.code === 401) {
} else if (data.code === 400) {
url = data.url;
if ($('#jump-login').length <= 0) {
$('body').append('<a href=\'' + url + '\'><span id="jump-login"><span></a>');
... ...
... ... @@ -643,7 +643,7 @@ class IndexController extends AbstractAction
}
do {
if (empty($uid)) {
$data['code'] = 401;
$data['code'] = 400;
$refer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';
$toUrl = Helpers::url('/signin.html')."?refer=".$refer;
if (!empty($appVersion)){
... ...
... ... @@ -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;
... ...