getDiyAdv($this->site_id, $this->app_module)['data']; return $this->response($config); } /** * 基础信息 */ public function info() { $id = $this->params['id'] ?? 0; $name = $this->params['name'] ?? 'DIY_VIEW_INDEX'; $en_type = $this->params['en_type'] ?? 'zh-cn';// ['zh-cn', 'en-us']; if (empty($id) && empty($name)) { return $this->response($this->error('', 'REQUEST_DIY_ID_NAME')); } $this->initStoreData(); // 如果是连锁运营模式,则进入门店页面 if ($name == 'DIY_VIEW_INDEX' && $this->store_data[ 'config' ][ 'store_business' ] == 'store') { $name = 'DIY_STORE'; } $diy_view = new DiyViewModel(); $condition = [ [ 'site_id', '=', $this->site_id ] ]; if (!empty($id)) { $condition[] = [ 'id', '=', $id ]; } elseif (!empty($name)) { $condition[] = [ 'name', '=', $name ]; //修复只有首页获取中英文 if($name == 'DIY_VIEW_INDEX'){ //英文切换 if($en_type == 'en-us'){ $condition[] = [ 'is_en_default', '=', 1 ]; }else{ $condition[] = [ 'is_default', '=', 1 ]; } } } $info = $diy_view->getDiyViewInfoInApi($condition); //去除访问站点 /* if (!empty($info[ 'data' ])) { $diy_view->modifyClick([ [ 'id', '=', $info[ 'data' ][ 'id' ] ], [ 'site_id', '=', $this->site_id ] ]); }*/ return $this->response($info); } /** * 平台端底部导航 * @return string */ public function bottomNav() { $diy_view = new DiyViewModel(); $info = $diy_view->getBottomNavConfig($this->site_id); return $this->response($info); } /** * 风格 */ public function style() { $diy_view = new DiyViewModel(); $res = $diy_view->getStyleConfig($this->site_id); return $this->response($res); } }