Exemplo n.º 1
0
<?php

/* @var $this yii\web\View */
use frontend\models\index\Config;
$title = Config::find()->select(['config_value'])->where(['config_key' => 'title'])->asarray()->one();
$this->title = $title['config_value'];
?>
	<!--轮播图开始-->
    <div class="t_img" id="scrolldiv">
		<div id="banner-tab" class="flexslider">
			<div style="width: 3840px;" class="slideBox">
				<ul style="margin-left: 0px;" class="slides">
					<?php 
foreach ($photo as $k => $v) {
    echo '<li><img src="' . $v['photo_path'] . '" height="450" width="1360" title="' . $v['photo_name'] . '"></li>';
}
?>
				</ul>
			</div>

			<ul class="flex-direction-nav">
				<li disabled="true" class="prev">&lt;</li>
				<li class="next">&gt;</li>
			</ul>
			<ol id="bannerCtrl">
				<li class="active">1</li>
				<li class="">2</li>
				<li class="">3</li>
				<li class="">4</li>
			</ol>
		</div>
Exemplo n.º 2
0
use yii\helpers\Html;
//use yii\bootstrap\Nav;
use yii\bootstrap\NavBar;
use yii\widgets\Breadcrumbs;
use frontend\assets\AppAsset;
use common\widgets\Alert;
use frontend\models\index\Config;
use frontend\models\index\Nav;
use frontend\models\index\Hotline;
//查询头部欢迎信息
$welcome = Config::find()->select('config_value')->where("config_key = 'welcome'")->asarray()->one();
//查询底部二维码
$code = Config::find()->select('config_value')->where("config_key = 'code'")->asarray()->one();
$title = Config::find()->select('config_value')->where("config_key = 'title'")->asarray()->one();
//底部title
$icp = Config::find()->select('config_value')->where("config_key = 'icp'")->asarray()->one();
//底部icp
//查询导航栏
$nav = Nav::find()->select(['nav_name', 'nav_url'])->where(['and', 'nav_type=2', 'nav_status=1'])->orderBy("nav_sort desc")->asarray()->all();
//查询底部导航
$footer_nav1 = Nav::find()->where(['and', 'nav_status=1', 'nav_type=3'])->orderby("nav_sort desc")->asarray()->all();
$footer_nav2 = Nav::find()->where(['and', 'nav_status=1', 'nav_type=4'])->orderby("nav_sort desc")->asarray()->all();
//查询服务热线
$hotline = Hotline::find()->select(['hotline_content'])->where(['hotline_status' => 1])->orderby("hotline_sort desc")->asarray()->all();
AppAsset::register($this);
$this->beginPage();
?>

<!DOCTYPE html>
<html lang="<?php 
echo Yii::$app->language;