Authored by 郭成尧

'店铺收藏调整'

... ... @@ -32,6 +32,7 @@ class IndexController extends WebAction
//获取uid
$uid = $this->getUid();
// $uid = '13549594'; // tar note 待删除
// 1 该品牌在多个店铺存在,2 该品牌只有一个店铺
$type = intval(isset($result['type']) ? $result['type'] : '');
... ... @@ -121,7 +122,7 @@ class IndexController extends WebAction
/* 为使用基础模板的店铺添加 banner */
if ($isBasicTpl) {
if (isset($result['shopBanner']) && !empty($result['shopBanner'])) {
$shopIntro = ShopModel::getIntro($this->get('shopId'), $this->getUid());
$shopIntro = ShopModel::getIntro($result['shopId'], $uid);
$data['shopBanner'] = array(
'banner' => $result['shopBanner'],
... ... @@ -258,8 +259,12 @@ class IndexController extends WebAction
{
$shopId = $this->get('shopId');
$domain = $this->param('named');
// $domain = 's'; // tar note 待删除
$shopIntro = ShopModel::getIntro($this->get('shopId'), $this->getUid());
$domain = 's'; // tar note 待删除
$uid = $this->getUid();
// $uid = '13549594'; // tar note 待删除
$shopIntro = ShopModel::getIntro($shopId, $uid);
$data = array(
//初始化js
... ... @@ -341,6 +346,8 @@ class IndexController extends WebAction
'message' => '操作失败'
);
$uid = $this->getUid();
// $uid = '13549594'; // tar note 待删除
$shopId = $this->post('shopId');
$isFavorite = $this->post('isFavorite');
$needColloect = $this->post('needColloect', 0);
... ... @@ -354,7 +361,7 @@ class IndexController extends WebAction
// );
// break;
// }
if (!$uid && $shopId) {
if ($uid && $shopId) {
//调用接口收藏或取消收藏
$result = ShopModel::setFavorite($shopId, $isFavorite, $uid);
... ...