$district_str = $areaV['name']; } } } } if(empty($district_str)){ $areaInfo = (new WshopInfo())->getLocationByCode(implode(",",[$this->shopInfo['province'],$this->shopInfo['city'],$this->shopInfo['district']])); if($areaInfo['obj']){ foreach ($areaInfo['obj'] as $areaV){ if($this->shopInfo['city'] == $areaV['code']){ $district_str = $areaV['name']; } } } } $this->assign('district_str',$district_str); $this->assign('cont_tel',!empty($outData['contact_tel']) ? $outData['contact_tel'] : $this->shopInfo['contact_tel']);
} } if(empty($district_str)){ $areaInfo = (new WshopInfo())->getLocationByCode(implode(",",[$this->shopInfo['province'],$this->shopInfo['city'],$this->shopInfo['district']])); if($areaInfo['obj']){ foreach ($areaInfo['obj'] as $areaV){ if($this->shopInfo['city'] == $areaV['code']){ $district_str = $areaV['name']; } } } }
{ public $shopAccessAction = ['index','note','deal-comment','introduce']; protected $getShopBannerByOne = ['index','introduce'];//获取店铺第一个广告位的方法 protected $needLoginAction = ['collection','note','deal-comment']; public function beforeAction($action) { parent::beforeAction($action); // TODO: Change the autogenerated stub return true; } /** * Renders the index view for the module * @return string
break; } } $result = null; if ($runAction && $this->beforeAction($action)) { // run the action $result = $action->runWithParams($params); $result = $this->afterAction($action, $result); // call afterAction on modules
$parts = $this->createController($route); if (is_array($parts)) { /* @var $controller Controller */ list($controller, $actionID) = $parts; $oldController = Yii::$app->controller; Yii::$app->controller = $controller; $result = $controller->runAction($actionID, $params); if ($oldController !== null) { Yii::$app->controller = $oldController; } return $result; }
$params = $this->catchAll; unset($params[0]); } try { Yii::trace("Route requested: '$route'", __METHOD__); $this->requestedRoute = $route; $result = $this->runAction($route, $params); if ($result instanceof Response) { return $result; } else { $response = $this->getResponse(); if ($result !== null) { $response->data = $result;
try { $this->state = self::STATE_BEFORE_REQUEST; $this->trigger(self::EVENT_BEFORE_REQUEST); $this->state = self::STATE_HANDLING_REQUEST; $response = $this->handleRequest($this->getRequest()); $this->state = self::STATE_AFTER_REQUEST; $this->trigger(self::EVENT_AFTER_REQUEST); $this->state = self::STATE_SENDING_RESPONSE; $response->send();
require(__DIR__ . '/../../common/config/main.php'), require(__DIR__ . '/../../common/config/main-local.php'), require(__DIR__ . '/../config/main.php'), require(__DIR__ . '/../config/main-local.php') ); (new yii\web\Application($config))->run();
$_GET = [ 'shopDomain' => 'feizhou', ];