Authored by 郝肖肖

店铺装修 code 判断

... ... @@ -23,7 +23,7 @@ class ShopModel
$parameters['shopId'] = $shopId;
$shopList = ShopData::shopsDecoratorList($shopId);
if (isset($shopList['data']['list']) && $shopList['code'] === 200) {
if (!empty($shopList['data']['list'])) {
foreach ($shopList['data']['list'] as $list) {
$fun = $list['resource_name'];
if (is_callable("self::$fun")) {
... ... @@ -579,7 +579,7 @@ class ShopModel
$data = array('signboard' => array());
$parameters['shopId'] = $shopId;
$shopList = ShopData::shopsDecoratorList($shopId);
if (isset($shopList['data']['list']) && $shopList['code'] === 200) {
if (!empty($shopList['data']['list'])) {
foreach ($shopList['data']['list'] as $list) {
$fun = $list['resource_name'];
if (is_callable("self::$fun")) {
... ... @@ -670,7 +670,7 @@ class ShopModel
$intro = ShopData::getIntro($shopId, $uid);
if ($intro['code'] === 200 && isset($intro['data'])) {
if (!empty($intro['data'])) {
$data = array(
'brandName'=> $intro['data']['shop_name'],
'brandCont'=> $intro['data']['shop_intro'],
... ... @@ -772,7 +772,7 @@ class ShopModel
$result = ShopData::byDomain($domain);
if (isset($result['code']) && $result['code'] === 200 && !empty($result['data'])) {
if (!empty($result['data'])) {
$data = $result['data'];
}
... ...
... ... @@ -416,7 +416,7 @@ class IndexController extends WebAction
$result = array(
'code' => 401,
'message' => '请先登录!',
'url' => Helpers::url('/signin.html', array(), 'default')
'url' => Helpers::url('/signin.html', array('refer' => $this->server('HTTP_REFERER', SITE_MAIN)))
);
break;
}
... ...