...
|
...
|
@@ -2,6 +2,7 @@ |
|
|
|
|
|
use Action\AbstractAction;
|
|
|
use LibModels\Wap\Guang\OptData;
|
|
|
use LibModels\Wap\Product\BrandData;
|
|
|
use Plugin\Helpers;
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -120,13 +121,15 @@ class OptController extends AbstractAction |
|
|
break;
|
|
|
}
|
|
|
|
|
|
/* 执行点赞或取消操作 */
|
|
|
/* 取消收藏 */
|
|
|
$opt = $this->post('opt', 'ok');
|
|
|
$status = OptData::favoriteBrand($uid, $id, $opt);
|
|
|
if (!$status) {
|
|
|
if ($opt !== 'ok') {
|
|
|
$result = BrandData::favoriteCancel($id, $uid);
|
|
|
break;
|
|
|
}
|
|
|
$result = array('code' => 200, 'message' => '收藏成功', 'data' => '');
|
|
|
|
|
|
/* 收藏 */
|
|
|
$result = BrandData::favorite($id, $uid);
|
|
|
|
|
|
} while (false);
|
|
|
|
...
|
...
|
|