Compare commits
2 Commits
f3242717c6
...
c81dd3f0c4
Author | SHA1 | Date |
---|---|---|
yin5th | c81dd3f0c4 | |
yin5th | b15058d546 |
|
@ -62,7 +62,7 @@ if (!function_exists('controller')) {
|
|||
* @param string $empty 空控制器名称
|
||||
* @return object
|
||||
* @throws ClassNotFoundException
|
||||
*
|
||||
*
|
||||
* milo 2019-05-08 从TP5.1代码中拿来修改的
|
||||
*/
|
||||
function controller($name, $layer = 'controller', $empty = '')
|
||||
|
@ -86,7 +86,7 @@ if (!function_exists('parseClass')) {
|
|||
* @param string $layer 验证层名称
|
||||
* @param bool $appendSuffix 是否添加类名后缀
|
||||
* @return array
|
||||
*
|
||||
*
|
||||
* milo 2019-05-08 从TP5.1代码中拿来修改的
|
||||
*/
|
||||
function parseClass($name, $layer)
|
||||
|
@ -136,47 +136,57 @@ if (!function_exists('randomStr')) {
|
|||
if(!function_exists('isMobile')){
|
||||
//判断访问终端是否为移动端
|
||||
function isMobile()
|
||||
{
|
||||
{
|
||||
// 如果有HTTP_X_WAP_PROFILE则一定是移动设备
|
||||
if (isset($_SERVER['HTTP_X_WAP_PROFILE'])) {
|
||||
return true;
|
||||
}
|
||||
// 如果via信息含有wap则一定是移动设备,部分服务商会屏蔽该信息
|
||||
if (isset($_SERVER['HTTP_VIA'])) {
|
||||
if (isset($_SERVER['HTTP_VIA'])) {
|
||||
// 找不到为flase,否则为true
|
||||
return stristr($_SERVER['HTTP_VIA'], "wap") ? true : false;
|
||||
}
|
||||
}
|
||||
// 脑残法,判断手机发送的客户端标志,兼容性有待提高。其中'MicroMessenger'是电脑微信
|
||||
if (isset($_SERVER['HTTP_USER_AGENT'])) {
|
||||
$clientkeywords = ['nokia','sony','ericsson','mot','samsung','htc','sgh','lg','sharp','sie-','philips','panasonic','alcatel','lenovo','iphone','ipod','blackberry','meizu','android','netfront','symbian','ucweb','windowsce','palm','operamini','operamobi','openwave','nexusone','cldc','midp','wap','mobile','MicroMessenger'];
|
||||
$clientkeywords = ['nokia','sony','ericsson','mot','samsung','htc','sgh','lg','sharp','sie-','philips','panasonic','alcatel','lenovo','iphone','ipod','blackberry','meizu','android','netfront','symbian','ucweb','windowsce','palm','operamini','operamobi','openwave','nexusone','cldc','midp','wap','mobile','MicroMessenger'];
|
||||
// 从HTTP_USER_AGENT中查找手机浏览器的关键字
|
||||
if (preg_match("/(" . implode('|', $clientkeywords) . ")/i", strtolower($_SERVER['HTTP_USER_AGENT']))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
// 协议法,因为有可能不准确,放到最后判断
|
||||
if (isset ($_SERVER['HTTP_ACCEPT'])) {
|
||||
if (isset ($_SERVER['HTTP_ACCEPT'])) {
|
||||
// 如果只支持wml并且不支持html那一定是移动设备
|
||||
// 如果支持wml和html但是wml在html之前则是移动设备
|
||||
if ((strpos($_SERVER['HTTP_ACCEPT'], 'vnd.wap.wml') !== false) && (strpos($_SERVER['HTTP_ACCEPT'], 'text/html') === false || (strpos($_SERVER['HTTP_ACCEPT'], 'vnd.wap.wml') < strpos($_SERVER['HTTP_ACCEPT'], 'text/html')))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
//根据栏目获取路径
|
||||
if(!function_exists('getUri')){
|
||||
function getUri($cate)
|
||||
function getUri($cate, $lang = 'cn')
|
||||
{
|
||||
$url = '';
|
||||
if(!empty($cate)){
|
||||
if($cate['is_index']){
|
||||
$url = '/';
|
||||
}elseif(!empty($cate['url'])){
|
||||
$url = $cate['url'];
|
||||
}else{
|
||||
$url = url($cate['template'].'/index', ['category_id' => $cate['id']]);
|
||||
if ($lang == 'en') {
|
||||
if($cate['is_index']){
|
||||
$url = '/en';
|
||||
}elseif(!empty($cate['url'])){
|
||||
$url = '/en'.$cate['url'];
|
||||
}else{
|
||||
$url = url('/en/'.$cate['template'].'/index', ['category_id' => $cate['id']]);
|
||||
}
|
||||
} else {
|
||||
if($cate['is_index']){
|
||||
$url = '/';
|
||||
}elseif(!empty($cate['url'])){
|
||||
$url = $cate['url'];
|
||||
}else{
|
||||
$url = url($cate['template'].'/index', ['category_id' => $cate['id']]);
|
||||
}
|
||||
}
|
||||
}
|
||||
return $url;
|
||||
|
|
|
@ -0,0 +1,160 @@
|
|||
<?php
|
||||
namespace app\controller\en;
|
||||
|
||||
use app\model\{Article as MArticle, Category};
|
||||
|
||||
class Article extends Base
|
||||
{
|
||||
//列表页
|
||||
public function index()
|
||||
{
|
||||
$categoryId = input('param.category_id/d', 0);
|
||||
if($categoryId <= 0){
|
||||
return $this->error('错误页面');
|
||||
}
|
||||
$category = Category::getById($categoryId);
|
||||
if(empty($category)){
|
||||
return $this->error('错误页面');
|
||||
}
|
||||
$description = $category['description'] ? $category['description'] : $this->system['seo_description'];
|
||||
$this->setSeo($category['title'], $this->system['seo_keywords'], $description);
|
||||
|
||||
$this->data['category'] = $category;
|
||||
$this->data['categoryId'] = $categoryId;
|
||||
$this->templateAssign($category);
|
||||
return $this->view(!empty($category['template_list']) ? 'en/article/'.$category['template_list'] : '');
|
||||
}
|
||||
|
||||
//详情
|
||||
public function detail($id=0)
|
||||
{
|
||||
if($id <= 0){
|
||||
return $this->error('错误页面');
|
||||
}
|
||||
$article = MArticle::getById($id);
|
||||
if(empty($article)){
|
||||
return $this->error('无此文章');
|
||||
}
|
||||
MArticle::updateById($id, ['views' => $article['views'] + 1]);
|
||||
$category = Category::getById($article['category_id']);
|
||||
$keywords = $article['seo_keywords'] ? $article['seo_keywords'] : $this->system['seo_keywords'];
|
||||
$description = $article['seo_description'] ? $article['seo_description'] : $this->system['seo_description'];
|
||||
$this->setSeo($article['title'], $keywords, $description);
|
||||
|
||||
$this->data['article'] = $article;
|
||||
$this->data['category'] = $category;
|
||||
$this->data['categoryId'] = $category['id'];
|
||||
$this->templateDetailAssign($article, $category);
|
||||
return $this->view(!empty($category['template_detail']) ? 'en/'.$category['template_detail'] : '');
|
||||
}
|
||||
|
||||
// 列表数据绑定
|
||||
private function templateAssign($category)
|
||||
{
|
||||
$template = strtolower($category['template_list'] ?? '');
|
||||
$TopCId = Category::firstGradeById($category['id']);
|
||||
if($TopCId == $category['id']) {
|
||||
$topCategory = $category;
|
||||
} else {
|
||||
$topCategory = Category::getById($TopCId);
|
||||
}
|
||||
$categoryChildren = Category::getChildrenByParentId($topCategory['id']);
|
||||
$this->data['topCategory'] = $topCategory;
|
||||
$this->data['categoryChildren'] = $categoryChildren;
|
||||
switch($template) {
|
||||
case 'products' :
|
||||
$this->assignProducts($topCategory, $category, $categoryChildren);
|
||||
break;
|
||||
case 'news_center' :
|
||||
case 'news' :
|
||||
$this->assignNews($topCategory, $category, $categoryChildren);
|
||||
break;
|
||||
default :
|
||||
$this->data['items'] = MArticle::getListPageByCategory($category['id'], $category['number'] ? $category['number'] : 20);
|
||||
}
|
||||
}
|
||||
|
||||
// 详情数据绑定
|
||||
private function templateDetailAssign($article, $category)
|
||||
{
|
||||
$template = strtolower($category['template_detail'] ?? '');
|
||||
$TopCId = Category::firstGradeById($category['id']);
|
||||
if($TopCId == $category['id']) {
|
||||
$topCategory = $category;
|
||||
} else {
|
||||
$topCategory = Category::getById($TopCId);
|
||||
}
|
||||
$this->data['topCategory'] = $topCategory;
|
||||
switch ($template) {
|
||||
case 'product':
|
||||
$this->assignDetailForProduct($article, $topCategory);
|
||||
break;
|
||||
default :
|
||||
$this->data['prev'] = MArticle::getPrevArticleByIdAndCategories($article['id'], [$article['category_id']], true, $article['sort'], true);
|
||||
$this->data['next'] = MArticle::getNextArticleByIdAndCategories($article['id'], [$article['category_id']], true, $article['sort'], true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 产品 - 展示当前分类和所有子类产品
|
||||
private function assignProducts($topCategory, $category, $categoryChildren)
|
||||
{
|
||||
$keyword = input('param.keyword', '');
|
||||
$cateIds[] = $category['id'];
|
||||
if($topCategory['id'] == $category['id']) {
|
||||
$children = $categoryChildren;
|
||||
} else {
|
||||
$children = Category::getChildrenByParentId($category['id']);
|
||||
}
|
||||
foreach ($children as $child) {
|
||||
$cateIds[] = $child['id'];
|
||||
}
|
||||
$items = MArticle::getListPageByCategories($cateIds, $category['number'] ? $category['number'] : 20, $keyword);
|
||||
$items->appends(['category_id'=>$category['id']]);
|
||||
$this->data['items'] = $items;
|
||||
$this->data['keyword'] = $keyword;
|
||||
}
|
||||
|
||||
// 新闻
|
||||
private function assignNews($topCategory, $category, $categoryChildren)
|
||||
{
|
||||
if($topCategory['id'] == $category['id']) {
|
||||
// 新闻中心
|
||||
$cateList = [];
|
||||
$newsChildrenFlip = array_flip(Category::$CIdList['news_children']);
|
||||
foreach ($categoryChildren as $cate) {
|
||||
$num = 3;
|
||||
if($cate['id'] == Category::$CIdList['news_children']['dynamics']) {
|
||||
$num = 4;
|
||||
}
|
||||
$cate['items'] = MArticle::getLatestByCategory($cate['id'], $num, 1);
|
||||
$cateList[$newsChildrenFlip[$cate['id']]] = $cate;
|
||||
}
|
||||
$this->data['cateList'] = $cateList;
|
||||
} else {
|
||||
// 新闻子栏目
|
||||
$keyword = input('param.keyword', '');
|
||||
$this->data['items'] = MArticle::getListPageByCategory($category['id'], $category['number'] ? $category['number'] : 20, $keyword);
|
||||
$this->data['keyword'] = $keyword;
|
||||
}
|
||||
}
|
||||
|
||||
// 产品详情
|
||||
private function assignDetailForProduct($article, $topCategory)
|
||||
{
|
||||
$cateIds[] = $article['category_id'];
|
||||
$currentCateId = input('param.source', 0);
|
||||
$categoryList = Category::getChildrenByParentId($topCategory['id']);
|
||||
if($currentCateId == $topCategory['id']) {
|
||||
foreach ($categoryList as $cate) {
|
||||
$cateIds[] = $cate['id'];
|
||||
}
|
||||
}
|
||||
$this->data['categoryChildren'] = $categoryList;
|
||||
$this->data['prev'] = MArticle::getPrevArticleByIdAndCategories($article['id'], $cateIds, true, $article['sort'], true);
|
||||
$this->data['next'] = MArticle::getNextArticleByIdAndCategories($article['id'], $cateIds, true, $article['sort'], true);
|
||||
$this->data['currentCateId'] = $currentCateId;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
<?php
|
||||
namespace app\controller\en;
|
||||
|
||||
use app\controller\BaseController;
|
||||
use app\model\System;
|
||||
|
||||
/**
|
||||
* 控制器基础类
|
||||
*/
|
||||
class Base extends BaseController
|
||||
{
|
||||
//需要向模板传递的值
|
||||
protected $data = [];
|
||||
//系统配置信息
|
||||
protected $system = [];
|
||||
protected $lang = 'en';
|
||||
|
||||
// 初始化
|
||||
protected function initialize()
|
||||
{
|
||||
$this->middleware = ['csrf'];
|
||||
$this->system = System::getSystem();
|
||||
$this->data['system'] = $this->system;
|
||||
$this->data['lang'] = 'en';
|
||||
// var_dump($this->request->controller());
|
||||
// var_dump($this->request->action());
|
||||
// exit;
|
||||
$this->setCsrfToken();
|
||||
}
|
||||
|
||||
//设置SEO信息
|
||||
protected function setSeo($title, $keywords, $description)
|
||||
{
|
||||
$this->data['seoTitle'] = $title;
|
||||
$this->data['seoKeywords'] = $keywords;
|
||||
$this->data['seoDescription'] = $description;
|
||||
}
|
||||
|
||||
//设置默认SEO信息
|
||||
protected function setDefaultSeo()
|
||||
{
|
||||
$this->data['seoTitle'] = $this->system['seo_title'];
|
||||
$this->data['seoKeywords'] = $this->system['seo_keywords'];
|
||||
$this->data['seoDescription'] = $this->system['seo_description'];
|
||||
}
|
||||
|
||||
//模板
|
||||
protected function view($template = '')
|
||||
{
|
||||
return view($template)->assign($this->data);
|
||||
}
|
||||
|
||||
protected function setCsrfToken()
|
||||
{
|
||||
$this->data['_token'] = session('_token') ?? '';
|
||||
}
|
||||
}
|
|
@ -0,0 +1,193 @@
|
|||
<?php
|
||||
declare (strict_types = 1);
|
||||
|
||||
namespace app\controller\en;
|
||||
|
||||
use think\{App, Validate};
|
||||
use think\exception\ValidateException;
|
||||
|
||||
/**
|
||||
* 控制器基础类
|
||||
*/
|
||||
abstract class BaseController
|
||||
{
|
||||
/**
|
||||
* Request实例
|
||||
* @var \think\Request
|
||||
*/
|
||||
protected $request;
|
||||
|
||||
/**
|
||||
* 应用实例
|
||||
* @var \think\App
|
||||
*/
|
||||
protected $app;
|
||||
|
||||
/**
|
||||
* 是否批量验证
|
||||
* @var bool
|
||||
*/
|
||||
protected $batchValidate = false;
|
||||
|
||||
/**
|
||||
* 控制器中间件
|
||||
* @var array
|
||||
*/
|
||||
protected $middleware = [];
|
||||
|
||||
/**
|
||||
* 构造方法
|
||||
* @access public
|
||||
* @param App $app 应用对象
|
||||
*/
|
||||
public function __construct(App $app)
|
||||
{
|
||||
$this->app = $app;
|
||||
$this->request = $this->app->request;
|
||||
|
||||
// 控制器初始化
|
||||
$this->initialize();
|
||||
}
|
||||
|
||||
// 初始化
|
||||
protected function initialize()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证数据
|
||||
* @access protected
|
||||
* @param array $data 数据
|
||||
* @param string|array $validate 验证器名或者验证规则数组
|
||||
* @param array $message 提示信息
|
||||
* @param bool $batch 是否批量验证
|
||||
* @return array|string|true
|
||||
* @throws ValidateException
|
||||
*/
|
||||
protected function validate(array $data, $validate, array $message = [], bool $batch = false)
|
||||
{
|
||||
if (is_array($validate)) {
|
||||
$v = new Validate();
|
||||
$v->rule($validate);
|
||||
} else {
|
||||
if (strpos($validate, '.')) {
|
||||
// 支持场景
|
||||
list($validate, $scene) = explode('.', $validate);
|
||||
}
|
||||
$class = false !== strpos($validate, '\\') ? $validate : $this->app->parseClass('validate', $validate);
|
||||
$v = new $class();
|
||||
if (!empty($scene)) {
|
||||
$v->scene($scene);
|
||||
}
|
||||
}
|
||||
|
||||
$v->message($message);
|
||||
|
||||
// 是否批量验证
|
||||
if ($batch || $this->batchValidate) {
|
||||
$v->batch(true);
|
||||
}
|
||||
|
||||
return $v->failException(true)->check($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 操作成功跳转的快捷方法
|
||||
* @access protected
|
||||
* @param mixed $msg 提示信息
|
||||
* @param string $url 跳转的URL地址
|
||||
* @param mixed $data 返回的数据
|
||||
* @param integer $wait 跳转等待时间
|
||||
* @param array $header 发送的Header信息
|
||||
* @return void
|
||||
*/
|
||||
protected function success($msg = '', string $url = null, $data = '', int $wait = 3, array $header = [])
|
||||
{
|
||||
if (is_null($url) && isset($_SERVER["HTTP_REFERER"])) {
|
||||
$url = $_SERVER["HTTP_REFERER"];
|
||||
} elseif ($url) {
|
||||
$url = (strpos($url, '://') || 0 === strpos($url, '/')) ? $url : $this->app->route->buildUrl($url);
|
||||
}
|
||||
|
||||
$result = [
|
||||
'code' => 1,
|
||||
'msg' => $msg,
|
||||
'data' => $data,
|
||||
'url' => $url,
|
||||
'wait' => $wait,
|
||||
];
|
||||
return $this->redirect(url('en/error/jump',$result));
|
||||
}
|
||||
|
||||
/**
|
||||
* 操作错误跳转的快捷方法
|
||||
* @access protected
|
||||
* @param mixed $msg 提示信息
|
||||
* @param string $url 跳转的URL地址
|
||||
* @param mixed $data 返回的数据
|
||||
* @param integer $wait 跳转等待时间
|
||||
* @param array $header 发送的Header信息
|
||||
* @return void
|
||||
*/
|
||||
protected function error($msg = '', string $url = null, $data = '', int $wait = 3)
|
||||
{
|
||||
if (is_null($url)) {
|
||||
$referer = $_SERVER['HTTP_REFERER'] ?? null;
|
||||
if (empty($referer)) {
|
||||
$url = $this->request->isAjax() ? '' : '/';
|
||||
} else {
|
||||
$url = $this->request->isAjax() ? '' : 'javascript:history.back(-1);';
|
||||
}
|
||||
} elseif ($url) {
|
||||
$url = (strpos($url, '://') || 0 === strpos($url, '/')) ? $url : $this->app->route->buildUrl($url);
|
||||
}
|
||||
$result = [
|
||||
'code' => 0,
|
||||
'msg' => $msg,
|
||||
'data' => $data,
|
||||
'url' => $url,
|
||||
'wait' => $wait,
|
||||
];
|
||||
|
||||
return $this->redirect(url('en/error/jump', $result));
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回封装后的API数据到客户端
|
||||
* 以json格式抛出异常
|
||||
* @access protected
|
||||
* @param mixed $data 要返回的数据
|
||||
* @param integer $code 返回的code
|
||||
* @param mixed $msg 提示信息
|
||||
* @param string $type 返回数据格式
|
||||
* @param array $header 发送的Header信息
|
||||
* @return void
|
||||
*/
|
||||
protected function json($code = 0, $msg = 'ok', $data= [])
|
||||
{
|
||||
$result = [
|
||||
'code' => $code,
|
||||
'msg' => $msg,
|
||||
'time' => time(),
|
||||
'data' => $data
|
||||
];
|
||||
return json($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* URL重定向
|
||||
* @access protected
|
||||
* @param string $url 跳转的URL表达式
|
||||
* @param array|integer $params 其它URL参数
|
||||
* @param integer $code http code
|
||||
* @param array $with 隐式传参
|
||||
* @return void
|
||||
*/
|
||||
protected function redirect($url)
|
||||
{
|
||||
if(!is_string($url)){
|
||||
$url = $url->__toString();
|
||||
}
|
||||
return redirect($url);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
|
||||
|
||||
namespace app\controller\en;
|
||||
|
||||
|
||||
class Error extends BaseController
|
||||
{
|
||||
public function __call($method, $args)
|
||||
{
|
||||
if(request()->isAjax()) {
|
||||
return $this->json(404, 'error request!');
|
||||
} else {
|
||||
$referer = $_SERVER['HTTP_REFERER'] ?? null;
|
||||
if (empty($referer)) {
|
||||
$url = '/';
|
||||
} else {
|
||||
$domain = $this->request->domain();
|
||||
$urlInfo = parse_url($referer);
|
||||
$scheme = $urlInfo['scheme'] ?? '';
|
||||
$requestSrc = '';
|
||||
if (!empty($scheme)) {
|
||||
$requestSrc = $scheme.'://'.($urlInfo['host'] ?? '');
|
||||
}
|
||||
if($domain != $requestSrc) {
|
||||
$url = '/';
|
||||
} else {
|
||||
$url = 'javascript:history.back(-1);';
|
||||
}
|
||||
}
|
||||
$result = [
|
||||
'code' => 404,
|
||||
'msg' => 'Invalid request! No related resources found.',
|
||||
'data' => [],
|
||||
'url' => $url,
|
||||
'wait' => 5,
|
||||
];
|
||||
return view('error/400')->assign($result);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function jump()
|
||||
{
|
||||
$param = request()->param();
|
||||
return view()->assign($param);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
namespace app\controller\en;
|
||||
|
||||
use app\model\{Category, Block, Article, Slide};
|
||||
|
||||
class Index extends Base
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
$category = Category::getIndex();
|
||||
$categoryId = $category['id'] ?? 0;
|
||||
$this->data['categoryId'] = $categoryId;
|
||||
$this->setSeo($this->system['seo_title'], $this->system['seo_keywords'], $this->system['seo_description']);
|
||||
$blocks = Block::getByCategoryId($categoryId);
|
||||
$blocks = Block::analysisBlock($blocks);
|
||||
$this->data['blocks'] = $blocks;
|
||||
// 轮播图
|
||||
$this->data['slides'] = Slide::getList();
|
||||
// 营销网络栏目ID
|
||||
$this->data['marketingCId'] = Category::$CIdList['marketing'];
|
||||
// 关联产品分类
|
||||
$productsCenterCId = Category::$CIdList['products'];
|
||||
$this->data['productsCenter'] = Category::getById($productsCenterCId);
|
||||
$this->data['products'] = Category::getChildrenByParentId($productsCenterCId);
|
||||
// 关联新闻
|
||||
$this->data['newsCenter'] = Category::getById(Category::$CIdList['news']);
|
||||
$newsCIdList = [Category::$CIdList['news_children']['enterprise'], Category::$CIdList['news_children']['industry']];
|
||||
$newsList = Category::getListByIds($newsCIdList);
|
||||
foreach ($newsList as &$cate) {
|
||||
$cate['items'] = Article::getLatestByCategory($cate['id'], 4, 1);
|
||||
}
|
||||
unset($cate);
|
||||
$this->data['newsList'] = $newsList;
|
||||
return $this->view();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
namespace app\controller\en;
|
||||
|
||||
use app\model\Message as MMessage;
|
||||
use app\validate\Message as VMessage;
|
||||
use think\exception\ValidateException;
|
||||
|
||||
/**
|
||||
* 留言
|
||||
* Class Message
|
||||
* @package app\controller
|
||||
*/
|
||||
class Message extends Base
|
||||
{
|
||||
// 新增留言
|
||||
public function add()
|
||||
{
|
||||
if(request()->isPost()) {
|
||||
$msgData = [
|
||||
'company_name' => trim(input('post.company_name', '')),
|
||||
'name' => trim(input('post.name', '')),
|
||||
'phone' => trim(input('post.phone', '')),
|
||||
'email' => trim(input('post.email', '')),
|
||||
'content' => trim(input('post.content', '')),
|
||||
];
|
||||
// 安全过滤
|
||||
$msgData = array_map('strip_tags', $msgData);
|
||||
try {
|
||||
validate(VMessage::class)->check($msgData);
|
||||
$msgData['ip'] = request()->ip();
|
||||
$msgData['create_time'] = time();
|
||||
MMessage::create($msgData);
|
||||
return $this->json();
|
||||
} catch (ValidateException $e) {
|
||||
return $this->json(2, $e->getError());
|
||||
}
|
||||
} else {
|
||||
return $this->json(1, '非法请求');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,145 @@
|
|||
<?php
|
||||
namespace app\controller\en;
|
||||
|
||||
use app\model\{Achievement, AchievementInfo, Category, Block, Article, History, Model};
|
||||
|
||||
class Page extends Base
|
||||
{
|
||||
// 默认单页页面
|
||||
public function index($categoryId)
|
||||
{
|
||||
$category = Category::getById($categoryId);
|
||||
if ($category) {
|
||||
$description = $category['description'] ? $category['description'] : $this->system['seo_description'];
|
||||
$this->setSeo($category['title'], $this->system['seo_keywords'], $description);
|
||||
} else {
|
||||
return $this->error('页面错误');
|
||||
}
|
||||
|
||||
$this->data['categoryId'] = $categoryId;
|
||||
$this->data['category'] = $category;
|
||||
$this->data['blocks'] = Block::getByCategoryId($categoryId);
|
||||
$this->templateDetailAssign($category);
|
||||
|
||||
return $this->view('en/page/'.$category['template_detail']);
|
||||
}
|
||||
|
||||
private function templateDetailAssign($category)
|
||||
{
|
||||
$template = $category['template_detail'] ?? '';
|
||||
$TopCId = Category::firstGradeById($category['id']);
|
||||
if($TopCId == $category['id']) {
|
||||
$topCategory = $category;
|
||||
} else {
|
||||
$topCategory = Category::getById($TopCId);
|
||||
}
|
||||
$childCategory = Category::getChildrenByParentId($topCategory['id']);
|
||||
|
||||
$this->data['topCategory'] = $topCategory;
|
||||
$this->data['childCategory'] = $childCategory;
|
||||
switch ($template) {
|
||||
case 'about' :
|
||||
$this->assignAbout($childCategory);
|
||||
break;
|
||||
case 'service' :
|
||||
$this->assignService($childCategory);
|
||||
break;
|
||||
case 'marketing' :
|
||||
$this->assignMarketing($childCategory);
|
||||
break;
|
||||
case 'contact' :
|
||||
$this->assignContact($childCategory);
|
||||
break;
|
||||
default :
|
||||
$this->data['blocks'] = Block::getByCategoryId($category['id']);
|
||||
}
|
||||
}
|
||||
|
||||
// 获取单页栏目IDs
|
||||
private function getBlockCateIds($categoryItems)
|
||||
{
|
||||
$blockCateIds = [];
|
||||
foreach ($categoryItems as $cate) {
|
||||
if($cate['model_id'] == Model::PAGE) {
|
||||
$blockCateIds[] = $cate['id'];
|
||||
}
|
||||
}
|
||||
return $blockCateIds;
|
||||
}
|
||||
|
||||
// 走进超宇
|
||||
private function assignAbout($childCategory)
|
||||
{
|
||||
$honorTopCId = Category::$CIdList['honors_manage'] ?? 0;
|
||||
$historyCId = Category::$CIdList['history_manage'] ?? 0;
|
||||
$historyCate = Category::getById($historyCId);
|
||||
$honors = [];
|
||||
$blocks = [];
|
||||
$blockCateIds = $this->getBlockCateIds($childCategory);
|
||||
if($honorTopCId) {
|
||||
$honors = Category::getChildrenByParentId($honorTopCId);
|
||||
foreach ($honors as &$honor) {
|
||||
$honor['items'] = Article::getListByCategoryIds([$honor['id']], $honor['number'] ? $honor['number'] : 20, '', [], 1);
|
||||
}
|
||||
unset($honor);
|
||||
}
|
||||
$blockList = Block::getByCategoryIds($blockCateIds);
|
||||
$aboutChildrenFlip = array_flip(Category::$CIdList['about_children']);
|
||||
foreach ($childCategory as $cate) {
|
||||
$blocks[$aboutChildrenFlip[$cate['id']]] = $blockList[$cate['id']] ?? [];
|
||||
}
|
||||
|
||||
$this->data['blocks'] = $blocks;
|
||||
$this->data['honors'] = $honors;
|
||||
$this->data['historyList'] = array_reverse(History::getByCategoryId($historyCId, true, $historyCate['number'] ?? -1));
|
||||
}
|
||||
|
||||
// 品质与服务
|
||||
private function assignService($childCategory)
|
||||
{
|
||||
$blocks = [];
|
||||
$blockCateIds = $this->getBlockCateIds($childCategory);
|
||||
$blockList = Block::getByCategoryIds($blockCateIds);
|
||||
$serviceChildrenFlip = array_flip(Category::$CIdList['service_children']);
|
||||
foreach ($childCategory as $cate) {
|
||||
$blocks[$serviceChildrenFlip[$cate['id']]] = $blockList[$cate['id']] ?? [];
|
||||
}
|
||||
|
||||
$this->data['blocks'] = $blocks;
|
||||
}
|
||||
|
||||
// 营销网络
|
||||
private function assignMarketing($childCategory)
|
||||
{
|
||||
$blocks = [];
|
||||
$blockCateIds = $this->getBlockCateIds($childCategory);
|
||||
$blockList = Block::getByCategoryIds($blockCateIds);
|
||||
$marketingChildrenFlip = array_flip(Category::$CIdList['marketing_children']);
|
||||
foreach ($childCategory as $cate) {
|
||||
$blocks[$marketingChildrenFlip[$cate['id']]] = $blockList[$cate['id']] ?? [];
|
||||
}
|
||||
$achievementCate = Category::getById(Category::$CIdList['achievement_manage']);
|
||||
$achievementList = [];
|
||||
if ($achievementCate) {
|
||||
$achievementList = Achievement::getListByCategoryId($achievementCate['id'], $achievementCate['number'] ? $achievementCate['number'] : 10, true);
|
||||
}
|
||||
$this->data['blocks'] = $blocks;
|
||||
$this->data['achievementList'] = $achievementList;
|
||||
}
|
||||
|
||||
// 联系我们
|
||||
private function assignContact($childCategory)
|
||||
{
|
||||
$blocks = [];
|
||||
$blockCateIds = $this->getBlockCateIds($childCategory);
|
||||
$blockList = Block::getByCategoryIds($blockCateIds);
|
||||
$contactChildrenFlip = array_flip(Category::$CIdList['contact_children']);
|
||||
foreach ($childCategory as $cate) {
|
||||
$blocks[$contactChildrenFlip[$cate['id']]] = $blockList[$cate['id']] ?? [];
|
||||
}
|
||||
$jobsCate = Category::getById(Category::$CIdList['jobs_manage']);
|
||||
$jobList = Article::getLatestByCategory($jobsCate['id'], $jobsCate['number'] ? $jobsCate['number'] : 10, 1);
|
||||
$this->data['blocks'] = $blocks;
|
||||
$this->data['jobList'] = $jobList;
|
||||
}
|
||||
}
|
|
@ -7,7 +7,7 @@ use think\facade\{View,Cache};
|
|||
|
||||
class Footer
|
||||
{
|
||||
public function index()
|
||||
public function index($lang = 'cn')
|
||||
{
|
||||
$menus = Cache::get('front_menus');
|
||||
if (empty($menus)){
|
||||
|
@ -18,6 +18,10 @@ class Footer
|
|||
'system' => System::getSystem(),
|
||||
'footerMenus' => $menus,
|
||||
];
|
||||
return View::assign($data)->fetch('public/footer');
|
||||
if ($lang == 'en') {
|
||||
return View::assign($data)->fetch('en/public/footer');
|
||||
} else {
|
||||
return View::assign($data)->fetch('public/footer');
|
||||
}
|
||||
}
|
||||
}
|
|
@ -6,7 +6,7 @@ use app\model\Category;
|
|||
|
||||
class Menu
|
||||
{
|
||||
public function index($categoryId)
|
||||
public function index($categoryId, $lang = 'cn')
|
||||
{
|
||||
$menus = Cache::get('front_menus');
|
||||
$menus = null;
|
||||
|
@ -23,6 +23,10 @@ class Menu
|
|||
'menus' => $menus,
|
||||
'currentFirstId' => $currentFirstId,
|
||||
];
|
||||
return View::assign($data)->fetch('public/menu');
|
||||
if ($lang == 'en') {
|
||||
return View::assign($data)->fetch('en/public/menu');
|
||||
} else {
|
||||
return View::assign($data)->fetch('public/menu');
|
||||
}
|
||||
}
|
||||
}
|
|
@ -10,6 +10,19 @@
|
|||
// +----------------------------------------------------------------------
|
||||
use think\facade\Route;
|
||||
|
||||
// 英文版
|
||||
Route::get('en/article/index', "en.article/index");
|
||||
Route::get('en/article/:id', "en.article/detail");
|
||||
Route::get('en/articles/:category_id', "en.article/index");
|
||||
Route::get('en/page/:category_id', "en.page/index");
|
||||
Route::rule('en/products', 'en.article/index')->name('products.search'); // 产品查询
|
||||
Route::rule('en/news', 'en.article/index')->name('news.search'); // 新闻查询
|
||||
|
||||
Route::post('en/message/add', 'en.message/add');
|
||||
Route::get('en', 'en.index/index');//放到英文最后
|
||||
|
||||
// 中文版
|
||||
|
||||
Route::get('article/:id', "article/detail");
|
||||
Route::get('articles/:category_id', "article/index");
|
||||
Route::get('page/:category_id', "page/index");
|
||||
|
@ -24,3 +37,6 @@ Route::post('message/add', 'message/add');
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,54 +1,54 @@
|
|||
{layout name="layout" /}
|
||||
|
||||
<!-- banner -->
|
||||
<div class="page-banner w-100" style="background-image: url({:getImgSrc($topCategory, '__IMG__/page_ban4.jpg')});">
|
||||
<div class="info">
|
||||
<div class="w-1200 pt118" id="news">
|
||||
<strong>{$category.title ?? ''}</strong>
|
||||
<p>{:nl2br($category.description ?? '')}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- -->
|
||||
<div class="all-center-box">
|
||||
<div class="news-box1 w-100">
|
||||
<!--
|
||||
<div class="w-1200 search-form-box">
|
||||
<form action="{:url('article/index', ['category_id'=> $categoryId])}" method="get" class="layui-form between-center w-100">
|
||||
<input class="layui-input" name="keyword" placeholder="关键词查询..." value="{$keyword ?? ''}"/>
|
||||
<button type="submit" class="layui-btn layui-btn-normal">查询</button>
|
||||
</form>
|
||||
</div>
|
||||
-->
|
||||
<div class="w-1200">
|
||||
{if isset($items)}
|
||||
<div class="center-block w-100">
|
||||
<ul>
|
||||
{foreach $items as $item}
|
||||
<li>
|
||||
<a href="{:url('article/detail', ['id'=>$item['id']])}" class="between-center">
|
||||
<div class="pull-left">{$item['create_time']|date="Y.m.d"}</div>
|
||||
<div class="pull-right">
|
||||
<div class="imgs"><img src="{:getImgSrc($item, '__IMG__/default_bg.jpg')}" ></div>
|
||||
<div class="info">
|
||||
<span title="{$item['title'] ?? ''}">{$item['title'] ?? ''}</span>
|
||||
<em>{$item['create_time']|date="Y.m.d"}</em>
|
||||
<p>{:nl2br($item['summary'] ?? '')}</p>
|
||||
<i>了解详情+</i>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="pager w-100 div-pc">
|
||||
{$items->render()|raw}
|
||||
</div>
|
||||
<div class="pager w-100 div-phone">
|
||||
{$items->render(5)|raw}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{layout name="layout" /}
|
||||
|
||||
<!-- banner -->
|
||||
<div class="page-banner w-100" style="background-image: url({:getImgSrc($topCategory, '__IMG__/page_ban4.jpg')});">
|
||||
<div class="info">
|
||||
<div class="w-1200 pt118" id="news">
|
||||
<strong>{$category.title ?? ''}</strong>
|
||||
<p>{:nl2br($category.description ?? '')}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- -->
|
||||
<div class="all-center-box">
|
||||
<div class="news-box1 w-100">
|
||||
<!--
|
||||
<div class="w-1200 search-form-box">
|
||||
<form action="{:url('article/index', ['category_id'=> $categoryId])}" method="get" class="layui-form between-center w-100">
|
||||
<input class="layui-input" name="keyword" placeholder="关键词查询..." value="{$keyword ?? ''}"/>
|
||||
<button type="submit" class="layui-btn layui-btn-normal">查询</button>
|
||||
</form>
|
||||
</div>
|
||||
-->
|
||||
<div class="w-1200">
|
||||
{if isset($items)}
|
||||
<div class="center-block w-100">
|
||||
<ul>
|
||||
{foreach $items as $item}
|
||||
<li>
|
||||
<a href="{:url('article/detail', ['id'=>$item['id']])}" class="between-center">
|
||||
<div class="pull-left">{$item['create_time']|date="Y.m.d"}</div>
|
||||
<div class="pull-right">
|
||||
<div class="imgs"><img src="{:getImgSrc($item, '__IMG__/default_bg.jpg')}" ></div>
|
||||
<div class="info">
|
||||
<span title="{$item['title'] ?? ''}">{$item['title'] ?? ''}</span>
|
||||
<em>{$item['create_time']|date="Y.m.d"}</em>
|
||||
<p>{:nl2br($item['summary'] ?? '')}</p>
|
||||
<i>了解详情+</i>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="pager w-100 div-pc">
|
||||
{$items->render()|raw}
|
||||
</div>
|
||||
<div class="pager w-100 div-phone">
|
||||
{$items->render(5)|raw}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -1,99 +1,99 @@
|
|||
{layout name="layout"}
|
||||
|
||||
<!-- banner -->
|
||||
<div class="page-banner w-100" style="background-image: url({:getImgSrc($topCategory, '__IMG__/page_ban4.jpg')});">
|
||||
<div class="info">
|
||||
<div class="w-1200 pt118" id="news">
|
||||
<strong>{$topCategory.title ?? ''}</strong>
|
||||
<p>{:nl2br($topCategory.description ?? '')}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- -->
|
||||
<div class="all-center-box">
|
||||
<!-- Corporate -->
|
||||
{if isset($cateList['enterprise']) && !empty($cateList['enterprise'])}
|
||||
<div class="news-box1 w-100" id="news1">
|
||||
<div class="w-1200">
|
||||
<div class="all-title-box2 w-100"><span>{$cateList['enterprise']['title'] ?? ''}</span><p>{$cateList['enterprise']['description'] ?? ''}</p></div>
|
||||
<div class="center-block w-100">
|
||||
<ul>
|
||||
{if isset($cateList['enterprise']['items']) && count($cateList['enterprise']['items']) > 0}
|
||||
{foreach $cateList['enterprise']['items'] as $item}
|
||||
<li>
|
||||
<a href="{:url('article/detail', ['id'=>$item['id']])}" class="between-center">
|
||||
<div class="pull-left">{$item['create_time']|date="Y.m.d"}</div>
|
||||
<div class="pull-right">
|
||||
<div class="imgs"><img src="{:getImgSrc($item, '__IMG__/default_bg.jpg')}" ></div>
|
||||
<div class="info">
|
||||
<span title="{$item['title'] ?? ''}">{$item['title'] ?? ''}</span>
|
||||
<em>{$item['create_time']|date="Y.m.d"}</em>
|
||||
<p>{:nl2br($item['summary'] ?? '')}</p>
|
||||
<i>了解详情+</i>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="more w-100"><a href="{:url('article/index', ['category_id'=>$cateList['enterprise']['id']])}">点击展开更多</a></div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<!-- Industry -->
|
||||
{if isset($cateList['industry']) && !empty($cateList['industry'])}
|
||||
<div class="news-box1 w-100 news-box2" id="news2">
|
||||
<div class="w-1200">
|
||||
<div class="all-title-box2 w-100"><span>{$cateList['industry']['title'] ?? ''}</span><p>{$cateList['industry']['description'] ?? ''}</p></div>
|
||||
<div class="center-block w-100">
|
||||
<ul>
|
||||
{if isset($cateList['enterprise']['items']) && count($cateList['enterprise']['items']) > 0}
|
||||
{foreach $cateList['enterprise']['items'] as $item}
|
||||
<li>
|
||||
<a href="{:url('article/detail', ['id'=>$item['id']])}" class="between-center">
|
||||
<div class="pull-left">{$item['create_time']|date="Y.m.d"}</div>
|
||||
<div class="pull-right">
|
||||
<div class="imgs"><img src="{:getImgSrc($item, '__IMG__/default_bg.jpg')}" ></div>
|
||||
<div class="info">
|
||||
<span title="{$item['title'] ?? ''}">{$item['title'] ?? ''}</span>
|
||||
<em>{$item['create_time']|date="Y.m.d"}</em>
|
||||
<p>{:nl2br($item['summary'] ?? '')}</p>
|
||||
<i>了解详情+</i>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="more w-100"><a href="">点击展开更多</a></div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<!-- Latest -->
|
||||
{if isset($cateList['dynamics']) && !empty($cateList['dynamics'])}
|
||||
<div class="news-box3 w-100" id="news3">
|
||||
<div class="w-1200">
|
||||
<div class="between-top">
|
||||
<div class="all-title-box2"><span>{$cateList['dynamics']['title'] ?? ''}</span><p>{$cateList['dynamics']['description'] ?? ''}</p></div>
|
||||
<div class="pull-right">
|
||||
<ul>
|
||||
{if isset($cateList['dynamics']['items']) && count($cateList['dynamics']['items']) > 0}
|
||||
{foreach $cateList['dynamics']['items'] as $item}
|
||||
<li><a href="{:url('article/detail', ['id'=>$item['id']])}">
|
||||
<span title="{$item['title'] ?? ''}">{$item['title'] ?? ''}</span>
|
||||
<i>{$item['create_time']|date="Y年m月d日"}</i></a>
|
||||
</li>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="more w-100"><a href="{:url('article/index', ['category_id'=>$cateList['dynamics']['id']])}">点击展开更多</a></div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{layout name="layout"}
|
||||
|
||||
<!-- banner -->
|
||||
<div class="page-banner w-100" style="background-image: url({:getImgSrc($topCategory, '__IMG__/page_ban4.jpg')});">
|
||||
<div class="info">
|
||||
<div class="w-1200 pt118" id="news">
|
||||
<strong>{$topCategory.title ?? ''}</strong>
|
||||
<p>{:nl2br($topCategory.description ?? '')}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- -->
|
||||
<div class="all-center-box">
|
||||
<!-- Corporate -->
|
||||
{if isset($cateList['enterprise']) && !empty($cateList['enterprise'])}
|
||||
<div class="news-box1 w-100" id="news1">
|
||||
<div class="w-1200">
|
||||
<div class="all-title-box2 w-100"><span>{$cateList['enterprise']['title'] ?? ''}</span><p>{$cateList['enterprise']['description'] ?? ''}</p></div>
|
||||
<div class="center-block w-100">
|
||||
<ul>
|
||||
{if isset($cateList['enterprise']['items']) && count($cateList['enterprise']['items']) > 0}
|
||||
{foreach $cateList['enterprise']['items'] as $item}
|
||||
<li>
|
||||
<a href="{:url('article/detail', ['id'=>$item['id']])}" class="between-center">
|
||||
<div class="pull-left">{$item['create_time']|date="Y.m.d"}</div>
|
||||
<div class="pull-right">
|
||||
<div class="imgs"><img src="{:getImgSrc($item, '__IMG__/default_bg.jpg')}" ></div>
|
||||
<div class="info">
|
||||
<span title="{$item['title'] ?? ''}">{$item['title'] ?? ''}</span>
|
||||
<em>{$item['create_time']|date="Y.m.d"}</em>
|
||||
<p>{:nl2br($item['summary'] ?? '')}</p>
|
||||
<i>了解详情+</i>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="more w-100"><a href="{:url('article/index', ['category_id'=>$cateList['enterprise']['id']])}">点击展开更多</a></div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<!-- Industry -->
|
||||
{if isset($cateList['industry']) && !empty($cateList['industry'])}
|
||||
<div class="news-box1 w-100 news-box2" id="news2">
|
||||
<div class="w-1200">
|
||||
<div class="all-title-box2 w-100"><span>{$cateList['industry']['title'] ?? ''}</span><p>{$cateList['industry']['description'] ?? ''}</p></div>
|
||||
<div class="center-block w-100">
|
||||
<ul>
|
||||
{if isset($cateList['enterprise']['items']) && count($cateList['enterprise']['items']) > 0}
|
||||
{foreach $cateList['enterprise']['items'] as $item}
|
||||
<li>
|
||||
<a href="{:url('article/detail', ['id'=>$item['id']])}" class="between-center">
|
||||
<div class="pull-left">{$item['create_time']|date="Y.m.d"}</div>
|
||||
<div class="pull-right">
|
||||
<div class="imgs"><img src="{:getImgSrc($item, '__IMG__/default_bg.jpg')}" ></div>
|
||||
<div class="info">
|
||||
<span title="{$item['title'] ?? ''}">{$item['title'] ?? ''}</span>
|
||||
<em>{$item['create_time']|date="Y.m.d"}</em>
|
||||
<p>{:nl2br($item['summary'] ?? '')}</p>
|
||||
<i>了解详情+</i>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="more w-100"><a href="">点击展开更多</a></div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<!-- Latest -->
|
||||
{if isset($cateList['dynamics']) && !empty($cateList['dynamics'])}
|
||||
<div class="news-box3 w-100" id="news3">
|
||||
<div class="w-1200">
|
||||
<div class="between-top">
|
||||
<div class="all-title-box2"><span>{$cateList['dynamics']['title'] ?? ''}</span><p>{$cateList['dynamics']['description'] ?? ''}</p></div>
|
||||
<div class="pull-right">
|
||||
<ul>
|
||||
{if isset($cateList['dynamics']['items']) && count($cateList['dynamics']['items']) > 0}
|
||||
{foreach $cateList['dynamics']['items'] as $item}
|
||||
<li><a href="{:url('article/detail', ['id'=>$item['id']])}">
|
||||
<span title="{$item['title'] ?? ''}">{$item['title'] ?? ''}</span>
|
||||
<i>{$item['create_time']|date="Y年m月d日"}</i></a>
|
||||
</li>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="more w-100"><a href="{:url('article/index', ['category_id'=>$cateList['dynamics']['id']])}">点击展开更多</a></div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
|
|
@ -1,36 +1,36 @@
|
|||
{layout name="layout" /}
|
||||
<div class="page-banner w-100" style="background-image: url({:getImgSrc($topCategory, '__IMG__/page_ban4.jpg')});">
|
||||
<div class="info">
|
||||
<div class="w-1200 pt118" id="news">
|
||||
<strong>{$category.title ?? ''}</strong>
|
||||
<p>{:nl2br($category.description ?? '')}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- -->
|
||||
<div class="all-center-box">
|
||||
<div class="news-info w-100">
|
||||
<div class="w-1200">
|
||||
<div class="top-box w-100">
|
||||
<span>{$article.title}</span>
|
||||
<p>{$article.create_time|date="Y/m/d"}</p>
|
||||
</div>
|
||||
<div class="cen-box w-100">
|
||||
{:nl2br($article.content)}
|
||||
</div>
|
||||
<div class="lower-box w-100">
|
||||
<p>
|
||||
{if isset($prev) && count($prev) >0}
|
||||
<a href="{:url('article/detail', ['id' => $prev.id])}">上一篇</a>
|
||||
{/if}
|
||||
{if (isset($prev) && count($prev) >0) && (isset($next) && count($next) >0)} / {/if}
|
||||
{if isset($next) && count($next) >0}
|
||||
<a href="{:url('article/detail', ['id' => $next.id])}">下一篇</a>
|
||||
{/if}
|
||||
</p>
|
||||
<a href="{:url('article/index', ['category_id'=>$article['category_id']])}" class="btns">返回</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{layout name="layout" /}
|
||||
<div class="page-banner w-100" style="background-image: url({:getImgSrc($topCategory, '__IMG__/page_ban4.jpg')});">
|
||||
<div class="info">
|
||||
<div class="w-1200 pt118" id="news">
|
||||
<strong>{$category.title ?? ''}</strong>
|
||||
<p>{:nl2br($category.description ?? '')}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- -->
|
||||
<div class="all-center-box">
|
||||
<div class="news-info w-100">
|
||||
<div class="w-1200">
|
||||
<div class="top-box w-100">
|
||||
<span>{$article.title}</span>
|
||||
<p>{$article.create_time|date="Y/m/d"}</p>
|
||||
</div>
|
||||
<div class="cen-box w-100">
|
||||
{:nl2br($article.content)}
|
||||
</div>
|
||||
<div class="lower-box w-100">
|
||||
<p>
|
||||
{if isset($prev) && count($prev) >0}
|
||||
<a href="{:url('article/detail', ['id' => $prev.id])}">上一篇</a>
|
||||
{/if}
|
||||
{if (isset($prev) && count($prev) >0) && (isset($next) && count($next) >0)} / {/if}
|
||||
{if isset($next) && count($next) >0}
|
||||
<a href="{:url('article/detail', ['id' => $next.id])}">下一篇</a>
|
||||
{/if}
|
||||
</p>
|
||||
<a href="{:url('article/index', ['category_id'=>$article['category_id']])}" class="btns">返回</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -1,55 +1,55 @@
|
|||
{layout name="layout" /}
|
||||
|
||||
<!-- banner -->
|
||||
<div class="page-banner w-100" style="background-image: url({:getImgSrc($topCategory, '__IMG__/page_ban3.jpg')});">
|
||||
<div class="info">
|
||||
<div class="w-1200 pt118">
|
||||
<strong>{$topCategory.title ?? ''}</strong>
|
||||
<p>{:nl2br($topCategory.description ?? '')}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- -->
|
||||
<div class="all-center-box">
|
||||
<div class="news-info w-100">
|
||||
<div class="w-1200 product-title-box">
|
||||
{if isset($categoryChildren) && count($categoryChildren) >0}
|
||||
{foreach $categoryChildren as $idx => $cate}
|
||||
{php}
|
||||
$active = '';
|
||||
if($categoryId == $cate['id']) {
|
||||
$active = 'active';
|
||||
} elseif ($categoryId == $topCategory['id'] && $idx == 0) {
|
||||
$active = 'active';
|
||||
}
|
||||
{/php}
|
||||
<div class="product-item {$active}">
|
||||
<a href="{:url('article/index', ['category_id'=>$cate.id])}">{$cate.title}</a>
|
||||
</div>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</div>
|
||||
<div class="w-1200">
|
||||
<div class="top-box w-100">
|
||||
<span>{$article.title}</span>
|
||||
<p>{$article.create_time|date="Y/m/d"}</p>
|
||||
</div>
|
||||
<div class="cen-box w-100">
|
||||
{:nl2br($article.content)}
|
||||
</div>
|
||||
<div class="lower-box w-100">
|
||||
<p>
|
||||
{if isset($prev) && count($prev) >0}
|
||||
<a href="{:url('article/detail', ['id' => $prev.id, 'source'=>$currentCateId])}">上一篇</a>
|
||||
{/if}
|
||||
{if (isset($prev) && count($prev) >0) && (isset($next) && count($next) >0)}/{/if}
|
||||
{if isset($next) && count($next) >0}
|
||||
<a href="{:url('article/detail', ['id' => $next.id, 'source'=>$currentCateId])}">下一篇</a>
|
||||
{/if}
|
||||
</p>
|
||||
<a href="{:url('article/index', ['category_id'=>$currentCateId])}" class="btns">返回</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{layout name="layout" /}
|
||||
|
||||
<!-- banner -->
|
||||
<div class="page-banner w-100" style="background-image: url({:getImgSrc($topCategory, '__IMG__/page_ban3.jpg')});">
|
||||
<div class="info">
|
||||
<div class="w-1200 pt118">
|
||||
<strong>{$topCategory.title ?? ''}</strong>
|
||||
<p>{:nl2br($topCategory.description ?? '')}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- -->
|
||||
<div class="all-center-box">
|
||||
<div class="news-info w-100">
|
||||
<div class="w-1200 product-title-box">
|
||||
{if isset($categoryChildren) && count($categoryChildren) >0}
|
||||
{foreach $categoryChildren as $idx => $cate}
|
||||
{php}
|
||||
$active = '';
|
||||
if($categoryId == $cate['id']) {
|
||||
$active = 'active';
|
||||
} elseif ($categoryId == $topCategory['id'] && $idx == 0) {
|
||||
$active = 'active';
|
||||
}
|
||||
{/php}
|
||||
<div class="product-item {$active}">
|
||||
<a href="{:url('article/index', ['category_id'=>$cate.id])}">{$cate.title}</a>
|
||||
</div>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</div>
|
||||
<div class="w-1200">
|
||||
<div class="top-box w-100">
|
||||
<span>{$article.title}</span>
|
||||
<p>{$article.create_time|date="Y/m/d"}</p>
|
||||
</div>
|
||||
<div class="cen-box w-100">
|
||||
{:nl2br($article.content)}
|
||||
</div>
|
||||
<div class="lower-box w-100">
|
||||
<p>
|
||||
{if isset($prev) && count($prev) >0}
|
||||
<a href="{:url('article/detail', ['id' => $prev.id, 'source'=>$currentCateId])}">上一篇</a>
|
||||
{/if}
|
||||
{if (isset($prev) && count($prev) >0) && (isset($next) && count($next) >0)}/{/if}
|
||||
{if isset($next) && count($next) >0}
|
||||
<a href="{:url('article/detail', ['id' => $next.id, 'source'=>$currentCateId])}">下一篇</a>
|
||||
{/if}
|
||||
</p>
|
||||
<a href="{:url('article/index', ['category_id'=>$currentCateId])}" class="btns">返回</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -1,70 +1,70 @@
|
|||
{layout name="layout" /}
|
||||
|
||||
<!-- banner -->
|
||||
<div class="page-banner w-100" style="background-image: url({:getImgSrc($topCategory, '__IMG__/page_ban3.jpg')});">
|
||||
<div class="info">
|
||||
<div class="w-1200 pt118" id="product">
|
||||
<strong>{$category.title ?? ''}</strong>
|
||||
<p>{:nl2br($category.description ?? '')}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- -->
|
||||
<div class="all-center-box">
|
||||
<div class="product-box w-100">
|
||||
<!--
|
||||
<div class="w-1200 search-form-box">
|
||||
<form action="{:url('products.search')}" class="layui-form between-center w-100" method="get">
|
||||
<select name="category_id">
|
||||
<option value="{$topCategory.id}">产品选择</option>
|
||||
{if isset($categoryChildren) && count($categoryChildren) >0}
|
||||
{foreach $categoryChildren as $cate}
|
||||
<option value="{$cate.id}" {if $categoryId == $cate.id}selected="selected"{/if}>{$cate.title}</option>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</select>
|
||||
<input name="keyword" class="layui-input" placeholder="关键词查询..." value="{$keyword ?? ''}"/>
|
||||
<button type="submit" class="layui-btn layui-btn-normal">查询</button>
|
||||
</form>
|
||||
</div>
|
||||
-->
|
||||
<div class="w-1200 product-title-box">
|
||||
{if isset($categoryChildren) && count($categoryChildren) >0}
|
||||
{foreach $categoryChildren as $idx => $cate}
|
||||
{php}
|
||||
$active = '';
|
||||
if($categoryId == $cate['id']) {
|
||||
$active = 'active';
|
||||
} elseif ($categoryId == $topCategory['id'] && $idx == 0) {
|
||||
$active = 'active';
|
||||
}
|
||||
{/php}
|
||||
<div class="product-item {$active}">
|
||||
<a href="{:url('article/index#product', ['category_id'=>$cate.id])}">{$cate.title}</a>
|
||||
</div>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</div>
|
||||
<div class="w-1200">
|
||||
{if isset($items)}
|
||||
<div class="center-block w-100">
|
||||
<ul>
|
||||
{foreach $items as $item}
|
||||
<li>
|
||||
<a>
|
||||
<span><img src="{:getImgSrc($item, '__IMG__/default_bg.jpg')}" ></span><p>{$item.title}</p>
|
||||
</a>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="pager w-100 div-pc">
|
||||
{$items->render()|raw}
|
||||
</div>
|
||||
<div class="pager w-100 div-phone">
|
||||
{$items->render(5)|raw}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{layout name="layout" /}
|
||||
|
||||
<!-- banner -->
|
||||
<div class="page-banner w-100" style="background-image: url({:getImgSrc($topCategory, '__IMG__/page_ban3.jpg')});">
|
||||
<div class="info">
|
||||
<div class="w-1200 pt118" id="product">
|
||||
<strong>{$category.title ?? ''}</strong>
|
||||
<p>{:nl2br($category.description ?? '')}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- -->
|
||||
<div class="all-center-box">
|
||||
<div class="product-box w-100">
|
||||
<!--
|
||||
<div class="w-1200 search-form-box">
|
||||
<form action="{:url('products.search')}" class="layui-form between-center w-100" method="get">
|
||||
<select name="category_id">
|
||||
<option value="{$topCategory.id}">产品选择</option>
|
||||
{if isset($categoryChildren) && count($categoryChildren) >0}
|
||||
{foreach $categoryChildren as $cate}
|
||||
<option value="{$cate.id}" {if $categoryId == $cate.id}selected="selected"{/if}>{$cate.title}</option>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</select>
|
||||
<input name="keyword" class="layui-input" placeholder="关键词查询..." value="{$keyword ?? ''}"/>
|
||||
<button type="submit" class="layui-btn layui-btn-normal">查询</button>
|
||||
</form>
|
||||
</div>
|
||||
-->
|
||||
<div class="w-1200 product-title-box">
|
||||
{if isset($categoryChildren) && count($categoryChildren) >0}
|
||||
{foreach $categoryChildren as $idx => $cate}
|
||||
{php}
|
||||
$active = '';
|
||||
if($categoryId == $cate['id']) {
|
||||
$active = 'active';
|
||||
} elseif ($categoryId == $topCategory['id'] && $idx == 0) {
|
||||
$active = 'active';
|
||||
}
|
||||
{/php}
|
||||
<div class="product-item {$active}">
|
||||
<a href="{:url('article/index#product', ['category_id'=>$cate.id])}">{$cate.title}</a>
|
||||
</div>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</div>
|
||||
<div class="w-1200">
|
||||
{if isset($items)}
|
||||
<div class="center-block w-100">
|
||||
<ul>
|
||||
{foreach $items as $item}
|
||||
<li>
|
||||
<a>
|
||||
<span><img src="{:getImgSrc($item, '__IMG__/default_bg.jpg')}" ></span><p>{$item.title}</p>
|
||||
</a>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="pager w-100 div-pc">
|
||||
{$items->render()|raw}
|
||||
</div>
|
||||
<div class="pager w-100 div-phone">
|
||||
{$items->render(5)|raw}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,2 @@
|
|||
{layout name="en/layout" /}
|
||||
新闻详情
|
|
@ -0,0 +1,3 @@
|
|||
{layout name="en/layout" /}
|
||||
|
||||
新闻列表
|
|
@ -0,0 +1,54 @@
|
|||
{layout name="en/layout" /}
|
||||
|
||||
<!-- banner -->
|
||||
<div class="page-banner w-100" style="background-image: url({:getImgSrc($topCategory, '__IMG__/page_ban4.jpg')});">
|
||||
<div class="info">
|
||||
<div class="w-1200 pt118" id="news">
|
||||
<strong>{$category.title ?? ''}</strong>
|
||||
<p>{:nl2br($category.description ?? '')}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- -->
|
||||
<div class="all-center-box">
|
||||
<div class="news-box1 w-100">
|
||||
<!--
|
||||
<div class="w-1200 search-form-box">
|
||||
<form action="{:url('article/index', ['category_id'=> $categoryId])}" method="get" class="layui-form between-center w-100">
|
||||
<input class="layui-input" name="keyword" placeholder="关键词查询..." value="{$keyword ?? ''}"/>
|
||||
<button type="submit" class="layui-btn layui-btn-normal">查询</button>
|
||||
</form>
|
||||
</div>
|
||||
-->
|
||||
<div class="w-1200">
|
||||
{if isset($items)}
|
||||
<div class="center-block w-100">
|
||||
<ul>
|
||||
{foreach $items as $item}
|
||||
<li>
|
||||
<a href="{:url('en.article/detail', ['id'=>$item['id']])}" class="between-center">
|
||||
<div class="pull-left">{$item['create_time']|date="Y.m.d"}</div>
|
||||
<div class="pull-right">
|
||||
<div class="imgs"><img src="{:getImgSrc($item, '__IMG__/default_bg.jpg')}" ></div>
|
||||
<div class="info">
|
||||
<span title="{$item['title'] ?? ''}">{$item['title'] ?? ''}</span>
|
||||
<em>{$item['create_time']|date="Y.m.d"}</em>
|
||||
<p>{:nl2br($item['summary'] ?? '')}</p>
|
||||
<i>Learn more+</i>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="pager w-100 div-pc">
|
||||
{$items->render()|raw}
|
||||
</div>
|
||||
<div class="pager w-100 div-phone">
|
||||
{$items->render(5)|raw}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,99 @@
|
|||
{layout name="en/layout"}
|
||||
|
||||
<!-- banner -->
|
||||
<div class="page-banner w-100" style="background-image: url({:getImgSrc($topCategory, '__IMG__/page_ban4.jpg')});">
|
||||
<div class="info">
|
||||
<div class="w-1200 pt118" id="news">
|
||||
<strong>{$topCategory.title ?? ''}</strong>
|
||||
<p>{:nl2br($topCategory.description ?? '')}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- -->
|
||||
<div class="all-center-box">
|
||||
<!-- Corporate -->
|
||||
{if isset($cateList['enterprise']) && !empty($cateList['enterprise'])}
|
||||
<div class="news-box1 w-100" id="news1">
|
||||
<div class="w-1200">
|
||||
<div class="all-title-box2 w-100"><span>{$cateList['enterprise']['title'] ?? ''}</span><p>{$cateList['enterprise']['description'] ?? ''}</p></div>
|
||||
<div class="center-block w-100">
|
||||
<ul>
|
||||
{if isset($cateList['enterprise']['items']) && count($cateList['enterprise']['items']) > 0}
|
||||
{foreach $cateList['enterprise']['items'] as $item}
|
||||
<li>
|
||||
<a href="{:url('en.article/detail', ['id'=>$item['id']])}" class="between-center">
|
||||
<div class="pull-left">{$item['create_time']|date="Y.m.d"}</div>
|
||||
<div class="pull-right">
|
||||
<div class="imgs"><img src="{:getImgSrc($item, '__IMG__/default_bg.jpg')}" ></div>
|
||||
<div class="info">
|
||||
<span title="{$item['title'] ?? ''}">{$item['title'] ?? ''}</span>
|
||||
<em>{$item['create_time']|date="Y.m.d"}</em>
|
||||
<p>{:nl2br($item['summary'] ?? '')}</p>
|
||||
<i>Learn more+</i>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="more w-100"><a href="{:url('en.article/index', ['category_id'=>$cateList['enterprise']['id']])}">点击展开更多</a></div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<!-- Industry -->
|
||||
{if isset($cateList['industry']) && !empty($cateList['industry'])}
|
||||
<div class="news-box1 w-100 news-box2" id="news2">
|
||||
<div class="w-1200">
|
||||
<div class="all-title-box2 w-100"><span>{$cateList['industry']['title'] ?? ''}</span><p>{$cateList['industry']['description'] ?? ''}</p></div>
|
||||
<div class="center-block w-100">
|
||||
<ul>
|
||||
{if isset($cateList['enterprise']['items']) && count($cateList['enterprise']['items']) > 0}
|
||||
{foreach $cateList['enterprise']['items'] as $item}
|
||||
<li>
|
||||
<a href="{:url('en.article/detail', ['id'=>$item['id']])}" class="between-center">
|
||||
<div class="pull-left">{$item['create_time']|date="Y.m.d"}</div>
|
||||
<div class="pull-right">
|
||||
<div class="imgs"><img src="{:getImgSrc($item, '__IMG__/default_bg.jpg')}" ></div>
|
||||
<div class="info">
|
||||
<span title="{$item['title'] ?? ''}">{$item['title'] ?? ''}</span>
|
||||
<em>{$item['create_time']|date="Y.m.d"}</em>
|
||||
<p>{:nl2br($item['summary'] ?? '')}</p>
|
||||
<i>Learn more+</i>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="more w-100"><a href="javascript:;">Click to expand more</a></div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<!-- Latest -->
|
||||
{if isset($cateList['dynamics']) && !empty($cateList['dynamics'])}
|
||||
<div class="news-box3 w-100" id="news3">
|
||||
<div class="w-1200">
|
||||
<div class="between-top">
|
||||
<div class="all-title-box2"><span>{$cateList['dynamics']['title'] ?? ''}</span><p>{$cateList['dynamics']['description'] ?? ''}</p></div>
|
||||
<div class="pull-right">
|
||||
<ul>
|
||||
{if isset($cateList['dynamics']['items']) && count($cateList['dynamics']['items']) > 0}
|
||||
{foreach $cateList['dynamics']['items'] as $item}
|
||||
<li><a href="{:url('en.article/detail', ['id'=>$item['id']])}">
|
||||
<span title="{$item['title'] ?? ''}">{$item['title'] ?? ''}</span>
|
||||
<i>{$item['create_time']|date="Y.m.d"}</i></a>
|
||||
</li>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="more w-100"><a href="{:url('en.article/index', ['category_id'=>$cateList['dynamics']['id']])}">Click to expand more</a></div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
|
@ -0,0 +1,36 @@
|
|||
{layout name="en/layout" /}
|
||||
<div class="page-banner w-100" style="background-image: url({:getImgSrc($topCategory, '__IMG__/page_ban4.jpg')});">
|
||||
<div class="info">
|
||||
<div class="w-1200 pt118" id="news">
|
||||
<strong>{$category.title ?? ''}</strong>
|
||||
<p>{:nl2br($category.description ?? '')}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- -->
|
||||
<div class="all-center-box">
|
||||
<div class="news-info w-100">
|
||||
<div class="w-1200">
|
||||
<div class="top-box w-100">
|
||||
<span>{$article.title}</span>
|
||||
<p>{$article.create_time|date="Y/m/d"}</p>
|
||||
</div>
|
||||
<div class="cen-box w-100">
|
||||
{:nl2br($article.content)}
|
||||
</div>
|
||||
<div class="lower-box w-100">
|
||||
<p>
|
||||
{if isset($prev) && count($prev) >0}
|
||||
<a href="{:url('en.article/detail', ['id' => $prev.id])}">Prev</a>
|
||||
{/if}
|
||||
{if (isset($prev) && count($prev) >0) && (isset($next) && count($next) >0)} / {/if}
|
||||
{if isset($next) && count($next) >0}
|
||||
<a href="{:url('en.article/detail', ['id' => $next.id])}">Next</a>
|
||||
{/if}
|
||||
</p>
|
||||
<a href="{:url('en.article/index', ['category_id'=>$article['category_id']])}" class="btns">Back</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,55 @@
|
|||
{layout name="en/layout" /}
|
||||
|
||||
<!-- banner -->
|
||||
<div class="page-banner w-100" style="background-image: url({:getImgSrc($topCategory, '__IMG__/page_ban3.jpg')});">
|
||||
<div class="info">
|
||||
<div class="w-1200 pt118">
|
||||
<strong>{$topCategory.title ?? ''}</strong>
|
||||
<p>{:nl2br($topCategory.description ?? '')}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- -->
|
||||
<div class="all-center-box">
|
||||
<div class="news-info w-100">
|
||||
<div class="w-1200 product-title-box">
|
||||
{if isset($categoryChildren) && count($categoryChildren) >0}
|
||||
{foreach $categoryChildren as $idx => $cate}
|
||||
{php}
|
||||
$active = '';
|
||||
if($categoryId == $cate['id']) {
|
||||
$active = 'active';
|
||||
} elseif ($categoryId == $topCategory['id'] && $idx == 0) {
|
||||
$active = 'active';
|
||||
}
|
||||
{/php}
|
||||
<div class="product-item {$active}">
|
||||
<a href="{:url('en.article/index', ['category_id'=>$cate.id])}">{$cate.title}</a>
|
||||
</div>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</div>
|
||||
<div class="w-1200">
|
||||
<div class="top-box w-100">
|
||||
<span>{$article.title}</span>
|
||||
<p>{$article.create_time|date="Y/m/d"}</p>
|
||||
</div>
|
||||
<div class="cen-box w-100">
|
||||
{:nl2br($article.content)}
|
||||
</div>
|
||||
<div class="lower-box w-100">
|
||||
<p>
|
||||
{if isset($prev) && count($prev) >0}
|
||||
<a href="{:url('en.article/detail', ['id' => $prev.id, 'source'=>$currentCateId])}">Prev</a>
|
||||
{/if}
|
||||
{if (isset($prev) && count($prev) >0) && (isset($next) && count($next) >0)}/{/if}
|
||||
{if isset($next) && count($next) >0}
|
||||
<a href="{:url('en.article/detail', ['id' => $next.id, 'source'=>$currentCateId])}">Next</a>
|
||||
{/if}
|
||||
</p>
|
||||
<a href="{:url('en.article/index', ['category_id'=>$currentCateId])}" class="btns">Back</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,70 @@
|
|||
{layout name="en/layout" /}
|
||||
|
||||
<!-- banner -->
|
||||
<div class="page-banner w-100" style="background-image: url({:getImgSrc($topCategory, '__IMG__/page_ban3.jpg')});">
|
||||
<div class="info">
|
||||
<div class="w-1200 pt118" id="product">
|
||||
<strong>{$category.title ?? ''}</strong>
|
||||
<p>{:nl2br($category.description ?? '')}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- -->
|
||||
<div class="all-center-box">
|
||||
<div class="product-box w-100">
|
||||
<!--
|
||||
<div class="w-1200 search-form-box">
|
||||
<form action="{:url('products.search')}" class="layui-form between-center w-100" method="get">
|
||||
<select name="category_id">
|
||||
<option value="{$topCategory.id}">产品选择</option>
|
||||
{if isset($categoryChildren) && count($categoryChildren) >0}
|
||||
{foreach $categoryChildren as $cate}
|
||||
<option value="{$cate.id}" {if $categoryId == $cate.id}selected="selected"{/if}>{$cate.title}</option>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</select>
|
||||
<input name="keyword" class="layui-input" placeholder="关键词查询..." value="{$keyword ?? ''}"/>
|
||||
<button type="submit" class="layui-btn layui-btn-normal">查询</button>
|
||||
</form>
|
||||
</div>
|
||||
-->
|
||||
<div class="w-1200 product-title-box">
|
||||
{if isset($categoryChildren) && count($categoryChildren) >0}
|
||||
{foreach $categoryChildren as $idx => $cate}
|
||||
{php}
|
||||
$active = '';
|
||||
if($categoryId == $cate['id']) {
|
||||
$active = 'active';
|
||||
} elseif ($categoryId == $topCategory['id'] && $idx == 0) {
|
||||
$active = 'active';
|
||||
}
|
||||
{/php}
|
||||
<div class="product-item {$active}">
|
||||
<a href="{:url('en.article/index#product', ['category_id'=>$cate.id])}">{$cate.title}</a>
|
||||
</div>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</div>
|
||||
<div class="w-1200">
|
||||
{if isset($items)}
|
||||
<div class="center-block w-100">
|
||||
<ul>
|
||||
{foreach $items as $item}
|
||||
<li>
|
||||
<a>
|
||||
<span><img src="{:getImgSrc($item, '__IMG__/default_bg.jpg')}" ></span><p>{$item.title}</p>
|
||||
</a>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="pager w-100 div-pc">
|
||||
{$items->render()|raw}
|
||||
</div>
|
||||
<div class="pager w-100 div-phone">
|
||||
{$items->render(5)|raw}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,46 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
{__NOLAYOUT__}
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
|
||||
<title><?php echo $code ?? '非法请求';?></title>
|
||||
<link rel="stylesheet" href="__MANAGER__/layui/css/layui.css?v=0.0.1">
|
||||
<link rel="stylesheet" href="__MANAGER__/css/ocms.css?v=0.0.1">
|
||||
<style type="text/css">
|
||||
*{ padding: 0; margin: 0; }
|
||||
body{ background: #fff; font-family: "Microsoft Yahei","Helvetica Neue",Helvetica,Arial,sans-serif; color: #333; font-size: 16px; }
|
||||
.system-message{ width: 100%; height: 100vh;}
|
||||
.system-message h1{ font-size: 100px; font-weight: normal; line-height: 120px; margin-bottom: 40px; }
|
||||
.system-message h1 img{ height: 145px;}
|
||||
.system-message .jump{ font-size: 12px; color: #666; line-height: 1; padding: 35px 0;}
|
||||
.system-message .jump a{ color: #333; }
|
||||
.system-message .success,.system-message .error{ line-height: 1; font-size: 30px;}
|
||||
.system-message .detail{ font-size: 12px; line-height: 20px; margin-top: 12px; display: none; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="system-message center-center">
|
||||
<h1><img src="__MANAGER__/image/ico_<?php echo $code ?? '404';?>.png" ></h1>
|
||||
<p class="error"><?php echo(strip_tags($msg));?></p>
|
||||
<p class="detail"></p>
|
||||
<p class="jump">
|
||||
Page <a id="href" href="<?php echo(strip_tags($url));?>">Jump</a> Wait <b id="wait"><?php echo(strip_tags($wait));?></b>
|
||||
</p>
|
||||
<p><a href="<?php echo(strip_tags($url));?>" class="layui-btn layui-btn-normal layui-btn-lg" style="width: 150px;">return now</a></p>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
var wait = document.getElementById('wait'),
|
||||
href = document.getElementById('href').href;
|
||||
var interval = setInterval(function(){
|
||||
var time = --wait.innerHTML;
|
||||
if(time <= 0) {
|
||||
location.href = href;
|
||||
clearInterval(interval);
|
||||
};
|
||||
}, 1000);
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,54 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
{__NOLAYOUT__}
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
|
||||
<title>Notice</title>
|
||||
<link rel="stylesheet" href="__MANAGER__/layui/css/layui.css?v=0.0.1">
|
||||
<link rel="stylesheet" href="__MANAGER__/css/ocms.css?v=0.0.1">
|
||||
<style type="text/css">
|
||||
*{ padding: 0; margin: 0; }
|
||||
body{ background: #fff; font-family: "Microsoft Yahei","Helvetica Neue",Helvetica,Arial,sans-serif; color: #333; font-size: 16px; }
|
||||
.system-message{ width: 100%; height: 100vh;}
|
||||
.system-message h1{ font-size: 100px; font-weight: normal; line-height: 120px; margin-bottom: 40px; }
|
||||
.system-message h1 img{ height: 145px;}
|
||||
.system-message .jump{ font-size: 12px; color: #666; line-height: 1; padding: 35px 0;}
|
||||
.system-message .jump a{ color: #333; }
|
||||
.system-message .success,.system-message .error{ line-height: 1; font-size: 30px;}
|
||||
.system-message .detail{ font-size: 12px; line-height: 20px; margin-top: 12px; display: none; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="system-message center-center">
|
||||
<?php switch ($code) {?>
|
||||
<?php case 1:?>
|
||||
<h1>:)</h1>
|
||||
<p class="success"><?php echo(strip_tags($msg));?></p>
|
||||
<?php break;?>
|
||||
<?php case 0:?>
|
||||
<h1><img src="__MANAGER__/image/ico_404.png" ></h1>
|
||||
<p class="error"><?php echo(strip_tags($msg));?></p>
|
||||
<?php break;?>
|
||||
<?php } ?>
|
||||
<p class="detail"></p>
|
||||
<p class="jump">
|
||||
Page <a id="href" href="<?php echo(strip_tags($url));?>">jump</a> wait: <b id="wait"><?php echo(strip_tags($wait));?></b>
|
||||
</p>
|
||||
<p><a href="<?php echo(strip_tags($url));?>" class="layui-btn layui-btn-normal layui-btn-lg" style="width: 150px;">return now</a></p>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
var wait = document.getElementById('wait'),
|
||||
href = document.getElementById('href').href;
|
||||
var interval = setInterval(function(){
|
||||
var time = --wait.innerHTML;
|
||||
if(time <= 0) {
|
||||
location.href = href;
|
||||
clearInterval(interval);
|
||||
};
|
||||
}, 1000);
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,132 @@
|
|||
{layout name="en/layout" /}
|
||||
|
||||
<!-- slide -->
|
||||
<div class="banner-box w-100">
|
||||
<div class="swiper-container">
|
||||
<div class="swiper-wrapper">
|
||||
{if isset($slides) && count($slides) > 0}
|
||||
{foreach $slides as $banner}
|
||||
<div class="swiper-slide center-center" style="background-image: url({$banner.src});">
|
||||
{php}
|
||||
$bannerLink = 'javascript:;';
|
||||
if(!empty($banner['url'])) {
|
||||
$bannerLink = $banner['url'];
|
||||
}
|
||||
{/php}
|
||||
<a href="{$bannerLink}" class="center-center banner-slide-link">
|
||||
<div class="w-1500">
|
||||
<div class="pull-left">
|
||||
<p>{:nl2br($banner.title ?? '')}</p>
|
||||
<i>{:nl2br($banner.description ?? '')}</i>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</div>
|
||||
<div class="swiper-page"><div class="w-1500"><div class="swiper-pagination"></div></div></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="all-center-box">
|
||||
<!-- products -->
|
||||
<div class="home-box1 w-100">
|
||||
<div class="w-1500">
|
||||
<div class="all-title-box1 w-100"><span>{$productsCenter['title'] ?? 'Product Center'}</span>
|
||||
<p>{$productsCenter['description'] ?? 'product center'}</p></div>
|
||||
<div class="center-block w-100">
|
||||
{if isset($products) && count($products) > 0}
|
||||
<ul>
|
||||
{foreach $products as $idx => $product}
|
||||
<li {if $idx == 0}class="active"{/if}>
|
||||
<div class="box-info" style="background-image: url({$product['src']});">
|
||||
<div class="box1">
|
||||
<span>{$product['title']}</span>
|
||||
<p>{$product['description']}</p>
|
||||
</div>
|
||||
<div class="box2">
|
||||
<a href="{:url('en.article/index', ['category_id'=>$product['id']])}">Learn More+</a>
|
||||
<i>{:str_pad($idx + 1, 2, '0', STR_PAD_LEFT)}</i>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- marketing -->
|
||||
<div class="home-box2 w-100" style="background-image: url({$blocks['marketing_background']['value'] ?? ''});">
|
||||
<div class="w-1500">
|
||||
<div class="pull-left column-between">
|
||||
<div class="all-title-box1 w-100"><span>{$blocks['marketing_name']['value'] ?? ''}</span>
|
||||
<p>{:nl2br($blocks['marketing_describe']['value'] ?? '')}</p></div>
|
||||
{php}
|
||||
$marketingLink = url('en.page/index', ['category_id'=>$marketingCId]);
|
||||
if(isset($blocks['marketing_background']['link']) && !empty($blocks['marketing_background']['link'])) {
|
||||
$marketingLink = $blocks['marketing_background']['link'];
|
||||
}
|
||||
{/php}
|
||||
<a href="{$marketingLink ?? 'javascript:;'}">Learn More++</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- news -->
|
||||
<div class="home-box3 w-100">
|
||||
<div class="w-1200">
|
||||
<div class="top-box w-100"><div class="between-bottom"><span>{$newsCenter['title'] ?? 'News'}</span><i>{$newsCenter['description'] ?? ''}</i></div></div>
|
||||
<div class="lower-box w-100">
|
||||
{if isset($newsList) && count($newsList) > 0}
|
||||
{foreach $newsList as $newsCate}
|
||||
<ul>
|
||||
<p>{$newsCate.title ?? ''}</p>
|
||||
{if isset($newsCate['items']) && count($newsCate['items']) > 0}
|
||||
{foreach $newsCate['items'] as $news}
|
||||
<li>
|
||||
<a href="{:url('en.article/detail', ['id'=>$news['id']])}">
|
||||
<span title="{$news['title']|raw}">{$news['title']|raw}</span>
|
||||
<i>{$news['create_time']|date='Y.m.d'}</i>
|
||||
</a>
|
||||
</li>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</ul>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
var swiper = new Swiper('.banner-box .swiper-container', {
|
||||
loop: true,
|
||||
speed: 1000,
|
||||
autoplay: {
|
||||
delay: 6000,
|
||||
disableOnInteraction: false,
|
||||
},
|
||||
navigation: {
|
||||
nextEl: '.banner-box .swiper-button-next',
|
||||
prevEl: '.banner-box .swiper-button-prev',
|
||||
},
|
||||
pagination :{
|
||||
el: '.banner-box .swiper-pagination',
|
||||
clickable :true,
|
||||
},
|
||||
on:{
|
||||
init: function(){
|
||||
|
||||
},
|
||||
transitionEnd: function(){
|
||||
$('.banner-box .swiper-container .swiper-slide .w-1500').eq(this.activeIndex).addClass('active')
|
||||
},
|
||||
transitionStart: function(){
|
||||
$('.banner-box .swiper-container .swiper-slide .w-1500').removeClass('active')
|
||||
},
|
||||
}
|
||||
});
|
||||
</script>
|
|
@ -0,0 +1,35 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>{$seoTitle??''}</title>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
|
||||
{php}
|
||||
if(!isset($_token) || empty($_token)) {
|
||||
$_token = session('_token') ?? '';
|
||||
}
|
||||
{/php}
|
||||
<meta name="csrf-token" id="token" content="{$_token}">
|
||||
<meta name="format-detection" content="telephone=no" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="renderer" content="webkit|ie-comp|ie-stand">
|
||||
<meta name="Keywords" content="{$seoKeywords??''}">
|
||||
<meta name="description" content="{$seoDescription??''}">
|
||||
<link rel="shortcut icon" type="image/ico" href="/favicon.ico" >
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="__CSS__/bootstrap.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="__CSS__/swiper.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="__MANAGER__/layui/css/layui.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="__CSS__/style.css?v={$system.css_version}" />
|
||||
|
||||
<script src="__COMMON__/jquery-3.4.1.min.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="__COMMON__/swiper.min.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="__MANAGER__/layui/layui.js" type="text/javascript" charset="utf-8"></script>
|
||||
</head>
|
||||
<body>
|
||||
{:widget('menu/index', ['categoryId' => $categoryId, 'lang' => 'en'])}
|
||||
{__CONTENT__}
|
||||
{:widget('footer/index', ['lang' => 'en'])}
|
||||
<script src="__JS__/script.js?v={$system.js_version}" type="text/javascript" charset="utf-8"></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,182 @@
|
|||
{layout name="en/layout"}
|
||||
<!-- banner -->
|
||||
<div class="page-banner w-100" style="background-image: url({:getImgSrc($topCategory, '__IMG__/page_ban1.jpg')});">
|
||||
<div class="info">
|
||||
<div class="w-1200">
|
||||
<strong>{$topCategory.title}</strong>
|
||||
<p>{:nl2br($topCategory.description ?? '')}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Company -->
|
||||
<div class="all-center-box">
|
||||
<div class="about-box1 w-100 center-center" id="about1">
|
||||
<div class="w-1200 disFlex">
|
||||
<div class="pull-left"><img class="imgH" src="{$blocks['company']['img']['value'] ?? ''}" ></div>
|
||||
<div class="pull-right">
|
||||
<div class="all-title-box2 w-100"><span>{$blocks['company']['title']['value'] ?? ''}</span><p>{$blocks['company']['subtitle']['value'] ?? ''}</p></div>
|
||||
<div class="box-info w-100">{:nl2br($blocks['company']['description']['value'] ?? '')}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Honors -->
|
||||
|
||||
<div class="about-box2 w-100" id="about2">
|
||||
<div class="w-1200">
|
||||
<div class="top-box w-100 between-center">
|
||||
<div class="all-title-box2"><span>{$blocks['honor']['title']['value'] ?? ''}</span><p>{$blocks['honor']['subtitle']['value'] ?? ''}</p></div>
|
||||
<div class="fr">
|
||||
{if isset($honors) && count($honors) > 0}
|
||||
{foreach $honors as $k => $honor}
|
||||
<span {if $k == 0}class="active"{/if}>{$honor.title}</span>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{if isset($honors) && count($honors) > 0}
|
||||
{foreach $honors as $k => $honor}
|
||||
<div class="lower-box w-100">
|
||||
<div class="div-pc w-100">
|
||||
<div class="pull-left">
|
||||
<ul>
|
||||
{foreach $honor.items as $item}
|
||||
<li><img src="{:getImgSrc($item, '__IMG__/default_bg.png')}"></li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<ul>
|
||||
{foreach $honor.items as $item}
|
||||
<li title="{$item.title}">{$item.title}</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="div-phone w-100">
|
||||
<div class="swiper-container">
|
||||
<div class="swiper-wrapper">
|
||||
{foreach $honor.items as $item}
|
||||
<div class="swiper-slide"><span><img src="{:getImgSrc($item, '__IMG__/default_bg.png')}" onclick="tanchuImg(this)"></span><p>{$item.title}</p></div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
<div class="honor-tc">
|
||||
<div class="center-center">
|
||||
<i onclick="$('.honor-tc').fadeOut();"></i>
|
||||
<img src="" >
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var swiper = new Swiper('.about-box2 .div-phone .swiper-container', {
|
||||
loop:true,
|
||||
autoHeight: true,
|
||||
autoplay:true
|
||||
});
|
||||
$('.about-box2 .top-box .fr span').click(function(){
|
||||
swiper.update()
|
||||
})
|
||||
function tanchuImg(obj){
|
||||
var imgsrc = $(obj).attr('src')
|
||||
$('.honor-tc').find('img').attr('src',imgsrc);
|
||||
$('.honor-tc').fadeIn();
|
||||
}
|
||||
</script>
|
||||
<!-- Structure -->
|
||||
<div id="about3" class="w-100">
|
||||
<div class="about-box3 w-100" >
|
||||
<div class="w-1200">
|
||||
<div class="all-title-box2"><span>{$blocks['structure']['title']['value'] ?? ''}</span><p>{$blocks['structure']['subtitle']['value'] ?? ''}</p></div>
|
||||
<div class="box-info w-100">
|
||||
<img src="{$blocks['structure']['img']['value'] ?? ''}" >
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- History -->
|
||||
<div class="about-box4 w-100" id="about4">
|
||||
<div class="w-1200">
|
||||
<div class="all-title-box2"><span>{$blocks['history']['title']['value'] ?? ''}</span><p>{$blocks['history']['subtitle']['value'] ?? ''}</p></div>
|
||||
<div class="top-box w-100">
|
||||
<div class="swiper-container">
|
||||
<div class="swiper-wrapper">
|
||||
{if isset($historyList) && count($historyList) > 0}
|
||||
{foreach $historyList as $history}
|
||||
<div class="swiper-slide"><p><span>{$history.title}</span><em> / 年</em></p><i></i></div>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="lower-box w-100">
|
||||
{if isset($historyList) && count($historyList) > 0}
|
||||
{foreach $historyList as $history}
|
||||
<div class="center-block w-100">
|
||||
{foreach $history['info'] as $k => $info}
|
||||
<p class="lower-box-item">{if $k > 0}<hr />{/if}{:nl2br($info['title'] ?? '')}</p>
|
||||
{/foreach}
|
||||
</div>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</div>
|
||||
<div class="swiper-btn">
|
||||
<div class="swiper-button-prev"></div>
|
||||
<div class="swiper-button-next"></div>
|
||||
<span>点击前后翻看</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="about-box5 w-100" id="about5">
|
||||
<div class="w-1200">
|
||||
<div class="video-box w-100">
|
||||
<i style="background-image: url({$blocks['video']['video']['img'] ?? ''});"></i>
|
||||
<video src="{$blocks['video']['video']['value'] ?? ''}" controls playsinline="isiPhoneShowPlaysinline" x5-video-player-type="h5-page" t7-video-player-type="inline" webkit-playsinline="isiPhoneShowPlaysinline" x-webkit-airplay="" preload="none"></video>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var initialSlide = 0;
|
||||
if($('.about-box4 .lower-box .center-block').length > 1){
|
||||
initialSlide = 1
|
||||
}
|
||||
var swiper = new Swiper('.about-box4 .swiper-container', {
|
||||
loop:true,
|
||||
initialSlide:initialSlide,
|
||||
slidesPerView: 3,
|
||||
spaceBetween: 0,
|
||||
centeredSlides : true,
|
||||
slideToClickedSlide: true,
|
||||
speed: 1000,
|
||||
autoplay: {
|
||||
delay: 6000,
|
||||
disableOnInteraction: false,
|
||||
},
|
||||
navigation: {
|
||||
nextEl: '.about-box4 .swiper-button-next',
|
||||
prevEl: '.about-box4 .swiper-button-prev',
|
||||
},
|
||||
on:{
|
||||
init: function(){
|
||||
$('.about-box4 .lower-box .center-block').hide().eq(initialSlide).show()
|
||||
},
|
||||
transitionEnd: function(){
|
||||
},
|
||||
transitionStart: function(){
|
||||
$('.about-box4 .lower-box .center-block').hide().eq(this.realIndex).fadeIn()
|
||||
},
|
||||
},
|
||||
breakpoints: {
|
||||
1280: { //当屏幕宽度大于等于1280
|
||||
slidesPerView: 3,
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
|
@ -0,0 +1,91 @@
|
|||
{layout name="en/layout"}
|
||||
|
||||
<!-- banner -->
|
||||
<div class="page-banner w-100" style="background-image: url({:getImgSrc($topCategory, '__IMG__/page_ban1.jpg')});">
|
||||
<div class="info">
|
||||
<div class="w-1200">
|
||||
<strong>{$topCategory.title}</strong>
|
||||
<p>{:nl2br($topCategory.description ?? '')}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- -->
|
||||
<div class="all-center-box">
|
||||
<div class="contact-box1 w-100" id="contact1">
|
||||
<div class="w-1200">
|
||||
<div class="between-top">
|
||||
<div class="column-between">
|
||||
<div class="all-title-box2 w-100"><span>{$blocks['information']['title']['value'] ?? ''}</span><p>{$blocks['information']['subtitle']['value'] ?? ''}</p></div>
|
||||
{if isset($blocks['information']['logo']) && !empty($blocks['information']['logo']['value'])}
|
||||
<img src="{$blocks['information']['logo']['value'] ?? ''}" >
|
||||
{/if}
|
||||
</div>
|
||||
<div class="box-info column-between">
|
||||
<p><span>Tel:</span>{$system['company_tel'] ?? ''}</p>
|
||||
<p><span>Fax:</span>{$system['company_fax'] ?? ''}</p>
|
||||
<p><span>E-mail:</span>{$system['company_email'] ?? ''}</p>
|
||||
<p>
|
||||
{$system['company_addr'] ?? ''}
|
||||
<br>{$system['company_addr_detail_en'] ?? ''}
|
||||
<br>{$system['company_addr_en'] ?? ''}
|
||||
</p>
|
||||
<p>
|
||||
{$system['company_name'] ?? ''}
|
||||
<br>{$system['company_name_en'] ?? ''}
|
||||
<br>{$system['company_type_en'] ?? ''}
|
||||
</p>
|
||||
</div>
|
||||
{if isset($blocks['information']['wechat']) && !empty($blocks['information']['wechat'])}
|
||||
<div class="column-between">
|
||||
<p> </p>
|
||||
<div class="ewm">
|
||||
<img src="{$blocks['information']['wechat']['value'] ?? ''}" >
|
||||
<p>Wechat</p>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="w-100 text-center"><img src="__IMG__/lx1_bg.png" ></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="contact-box2 w-100" id="contact2">
|
||||
<div class="w-1200">
|
||||
<div class="all-title-box2 w-100"><span>{$blocks['jobs']['title']['value'] ?? ''}</span><p>{$blocks['jobs']['subtitle']['value'] ?? ''}</p></div>
|
||||
<div class="marketing-box2 w-100">
|
||||
<div class="center-block w-100">
|
||||
<ul>
|
||||
{if isset($jobList) && count($jobList) > 0}
|
||||
{foreach $jobList as $job}
|
||||
<li>
|
||||
<div class="top-box w-100">
|
||||
<div class="pull-left"><i>{$job.summary ?? ''}</i><span>{$job.title ?? ''}</span></div>
|
||||
<div class="pull-right">Open</div>
|
||||
</div>
|
||||
<div class="lower-box w-100">
|
||||
<div class="pull-left">{$job.create_time|date="Y.m.d"}</div>
|
||||
<div class="pull-right">{$job.content|raw}</div>
|
||||
</div>
|
||||
</li>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="contact-box3 w-100" id="contact3">
|
||||
<div class="w-1200">
|
||||
<div class="all-title-box2 w-100"><span>{$blocks['message']['title']['value'] ?? ''}</span><p>{$blocks['message']['subtitle']['value'] ?? ''}</p></div>
|
||||
<div class="box-info w-100">{:nl2br($blocks['message']['description']['value'] ?? '')}</div>
|
||||
<form data-action="{:url('message/add')}" class="center-block w-100" method="post" id="message-form">
|
||||
<input type="text" class="text" name="company_name" placeholder="company name" />
|
||||
<input type="text" class="text" name="email" placeholder="email" />
|
||||
<input type="text" class="text" name="name" placeholder="name" />
|
||||
<input type="text" class="text" name="phone" placeholder="mobile" />
|
||||
<textarea placeholder="Inquiries, within 4 ~ 500 words" name="content"></textarea>
|
||||
<div class="btns"><button type="button" id="message-submit">Submit</button></div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,3 @@
|
|||
{layout name="en/layout" /}
|
||||
|
||||
单页
|
|
@ -0,0 +1,79 @@
|
|||
{layout name="en/layout"}
|
||||
|
||||
<!-- banner -->
|
||||
<div class="page-banner w-100" style="background-image: url({:getImgSrc($topCategory, '__IMG__/page_ban3.jpg')});">
|
||||
<div class="info">
|
||||
<div class="w-1200">
|
||||
<strong>{$topCategory.title}</strong>
|
||||
<p>{:nl2br($topCategory.description ?? '')}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- -->
|
||||
<div class="all-center-box">
|
||||
<div class="marketing-box1 w-100" id="marketing1">
|
||||
<div class="w-1200">
|
||||
<div class="all-title-box2 w-100"><span>{$blocks['network']['title']['value'] ?? ''}</span><p>{$blocks['network']['subtitle']['value'] ?? ''}</p></div>
|
||||
<div class="box-info w-100 between-bottom">
|
||||
<div class="pull-left">
|
||||
<span>{$blocks['network']['position_name']['value'] ?? ''}</span>
|
||||
<p>电话:{$blocks['network']['position_tel']['value'] ?? ''}</p>
|
||||
<p>地址:{$blocks['network']['position_description']['value'] ?? ''}</p>
|
||||
</div>
|
||||
<div class="pull-right"><img src="{$blocks['network']['position_img']['value'] ?? ''}" ></div>
|
||||
</div>
|
||||
<div class="w-100 text-center"><img src="__IMG__/yx1_bg.png" ></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="marketing-box2 w-100" id="marketing2">
|
||||
<div class="w-1200">
|
||||
<div class="all-title-box2 w-100"><span>{$blocks['achievement']['title']['value'] ?? ''}</span><p>{$blocks['achievement']['subtitle']['value'] ?? ''}</p></div>
|
||||
<div class="center-block w-100">
|
||||
<ul>
|
||||
{if isset($achievementList) && count($achievementList) > 0}
|
||||
{foreach $achievementList as $k => $achievement}
|
||||
<li>
|
||||
<div class="top-box w-100">
|
||||
<div class="pull-left"><i>{:str_pad(($k+1), 2, '0', STR_PAD_LEFT)}</i><span>{$achievement.title ?? ''}</span></div>
|
||||
<div class="pull-right">Open</div>
|
||||
</div>
|
||||
<div class="lower-box w-100">
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th width="25%">Item Name</th>
|
||||
<th width="25%">Unit</th>
|
||||
<th width="25%">Title & Model</th>
|
||||
<th width="25%">No.</th>
|
||||
</tr>
|
||||
{if isset($achievement.infos) && count($achievement.infos) > 0}
|
||||
{foreach $achievement.infos as $info}
|
||||
<tr>
|
||||
<td>{$info.title}</td>
|
||||
<td>{$info.order_company}</td>
|
||||
<td>{:nl2br($info.goods_model)}</td>
|
||||
<td>{:nl2br($info.goods_amount)}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</table>
|
||||
{if isset($achievement.infos) && count($achievement.infos) > 0}
|
||||
{foreach $achievement.infos as $info}
|
||||
<div class="div-phone wf100">
|
||||
<div class="center-block w-100">
|
||||
<div><span>Item Name:</span><p>{$info.title}</p></div>
|
||||
<div><span>Unit:</span><p>{$info.order_company}</p></div>
|
||||
<div><span>Title & Model:</span><p>{:nl2br($info.goods_model)}</p></div>
|
||||
<div><span>No.:</span><p>{:nl2br($info.goods_amount)}</p></div>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</div>
|
||||
</li>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,42 @@
|
|||
{layout name="en/layout"}
|
||||
|
||||
<!-- banner -->
|
||||
<div class="page-banner w-100" style="background-image: url({:getImgSrc($topCategory, '__IMG__/page_ban2.jpg')});">
|
||||
<div class="info">
|
||||
<div class="w-1200">
|
||||
<strong>{$topCategory.title_en}</strong>
|
||||
<p>{:nl2br($topCategory.description ?? '')}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- -->
|
||||
<div class="all-center-box">
|
||||
<div class="service-box1 w-100" id="service1">
|
||||
<div class="w-1200">
|
||||
<div class="all-title-box2 w-100"><span>{$blocks['before']['title']['value'] ?? ''}</span><p>{:nl2br($blocks['before']['subtitle']['value'] ?? '')}</p></div>
|
||||
<div class="box-info w-100">
|
||||
<img src="{$blocks['before']['img']['value'] ?? ''}" >
|
||||
</div>
|
||||
<div class="w-100 text-center"><img src="__IMG__/ser1_bg.png" ></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="service-box1 w-100 service-box2" id="service2">
|
||||
<div class="w-1200">
|
||||
<div class="all-title-box2 w-100"><span>{$blocks['in_progress']['title']['value'] ?? ''}</span><p>{:nl2br($blocks['in_progress']['subtitle']['value'] ?? '')}</p></div>
|
||||
<div class="box-info w-100">
|
||||
<img src="{$blocks['in_progress']['img']['value'] ?? ''}" >
|
||||
</div>
|
||||
<div class="w-100 text-center"><img src="__IMG__/ser2_bg.png" ></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="service-box3 w-100" id="service3">
|
||||
<div class="w-1200">
|
||||
<div class="all-title-box2 w-100"><span>After-sales Technical Services</span><p>After sales technology service</p></div>
|
||||
<div class="box-info w-100">
|
||||
<div class="pull-right">
|
||||
<img src="{$blocks['after']['img']['value'] ?? ''}" >
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,7 @@
|
|||
<div class="address wf100" aos="fade-up">
|
||||
|
||||
<a href="/">Home</a>
|
||||
{foreach $crumbs as $crumb}
|
||||
> <a href="{:getUri($crumb)}">{$crumb.title}</a>
|
||||
{/foreach}
|
||||
</div>
|
|
@ -0,0 +1,42 @@
|
|||
<div class="foot-box w-100 center-center">
|
||||
<div class="w-1200">
|
||||
<div class="top-box w-100 between-top">
|
||||
<div class="fl"><img src="__IMG__/logo2.png" ></div>
|
||||
<div class="fr">
|
||||
{if isset($footerMenus) && count($footerMenus) > 0}
|
||||
{foreach footerMenus as $menu}
|
||||
{php}
|
||||
$aHref = getUri($menu, 'en');
|
||||
$aHref = empty($aHref) ? 'javascript:;' : $aHref;
|
||||
{/php}
|
||||
<a href="{$aHref}">{$menu['title_en'] ?? ''}</a>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
<div class="lower-box w-100">
|
||||
<div class="column-between">
|
||||
<p>
|
||||
{$system['company_name_en'] ?? ''}<br>
|
||||
{$system['company_type_en'] ?? ''}
|
||||
</p>
|
||||
<p>
|
||||
<i>
|
||||
{$system['company_copyright']|raw}
|
||||
<a href="https://beian.miit.gov.cn">{$system['company_copy']|raw}</a>
|
||||
</i>
|
||||
</p>
|
||||
</div>
|
||||
<div class="column-between">
|
||||
<p><span>Tel: {$system['company_tel'] ?? ''}</span></p>
|
||||
<p><span>E-mail: {$system['company_email'] ?? ''}</span></p>
|
||||
<p>
|
||||
Addr: {$system['company_addr_detail_en'] ?? ''} <br>{$system['company_addr_en'] ?? ''}
|
||||
</p>
|
||||
</div>
|
||||
<div class="ewm"><img src="__IMG__/ewm_1.jpg" ><p>Wechat</p></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="foot-statistics-code" style="display: none;">{$system['statistics']??''}</div>
|
|
@ -0,0 +1,80 @@
|
|||
{php}
|
||||
//dump($menus);
|
||||
function getMenus($menus, $level = 1, $currentFirstId, $categoryId) {
|
||||
$menuHtml = '';
|
||||
$levelList = ['nav-first','nav-second','nav-third'];
|
||||
$navClass = $levelList[$level - 1] ?? '';
|
||||
if (count($menus) > 0) {
|
||||
$menuHtml .= '';
|
||||
if($level > 1) {
|
||||
$menuHtml .= '<div class="'.$navClass.'" >';
|
||||
}
|
||||
|
||||
|
||||
foreach ($menus as $menu) {
|
||||
$activeClass = '';
|
||||
if ($currentFirstId == $menu['id'] || $categoryId == $menu['id'] || ($currentFirstId == 0 && $menu['is_index'])) {
|
||||
$activeClass = ' active';
|
||||
}
|
||||
$aHref = getUri($menu,'en');
|
||||
$aHref = empty($aHref) ? 'javascript:;' : $aHref;
|
||||
$spanClass = '';
|
||||
$hasChild = false;
|
||||
if (isset($menu['children']) && count($menu['children']) > 0) {
|
||||
$hasChild = true;
|
||||
$spanClass = 'class="cur"';
|
||||
}
|
||||
if($level == 1) {
|
||||
$menuHtml .= '<li class="'.$activeClass.'" >';
|
||||
$menuHtml .= '<span '.$spanClass.'><a href="'.$aHref.'" target="'.$menu['style'].'">'.$menu['title_en'].'</a></span>';
|
||||
if ($hasChild) {
|
||||
$menuHtml .= getMenus($menu['children'], $level + 1, $currentFirstId, $categoryId);
|
||||
}
|
||||
$menuHtml .= '</li>';
|
||||
} else {
|
||||
if($menu['template_list']=='products'){
|
||||
$menuHtml .= '<a href="'.$aHref.'#product" target="'.$menu['style'].'" class="'.$activeClass.'">';
|
||||
}else if($menu['template_list']=='news'){
|
||||
$menuHtml .= '<a href="'.$aHref.'#news" target="'.$menu['style'].'" class="'.$activeClass.'">';
|
||||
}else
|
||||
{
|
||||
$menuHtml .= '<a href="'.$aHref.'" target="'.$menu['style'].'" class="'.$activeClass.'">';
|
||||
}
|
||||
$menuHtml .= '<span '.$spanClass.'>'.$menu['title_en'].'</span>';
|
||||
if ($hasChild) {
|
||||
$menuHtml .= getMenus($menu['children'], $level + 1, $currentFirstId, $categoryId);
|
||||
}
|
||||
$menuHtml .= '</a>';
|
||||
}
|
||||
}
|
||||
if($level > 1) {
|
||||
$menuHtml .= '</div>';
|
||||
}
|
||||
}
|
||||
return $menuHtml;
|
||||
}
|
||||
{/php}
|
||||
|
||||
<div class="head-box w-100">
|
||||
<div class="w-1500">
|
||||
<div class="center-block w-100 between-center">
|
||||
<div class="logo center-center">
|
||||
<a href="{:url('/en')}"><img src="__IMG__/logo.png"></a>
|
||||
</div>
|
||||
<div class="nav">
|
||||
<ul>
|
||||
{:getMenus($menus, 1, $currentFirstId, $categoryId)}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="language">
|
||||
|
||||
<a href="/" {if empty($lang) || $lang == 'cn'}class="active"{/if}>中文</a> / <a href="/en" {if !empty($lang) && $lang == 'en'}class="active"{/if}>English</a>
|
||||
</div>
|
||||
<div class="nav_btn">
|
||||
<i class="bar-top"></i>
|
||||
<i class="bar-cen"></i>
|
||||
<i class="bar-bom"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,72 @@
|
|||
<link rel="stylesheet" type="text/css" href="__CSS__/swiper.min.css" />
|
||||
<div class="swiper-container">
|
||||
<div class="swiper-wrapper">
|
||||
{foreach $slides as $key => $slide}
|
||||
<div class="swiper-slide center-center">
|
||||
<div class="w1200">
|
||||
<i>0{$key+1}</i>
|
||||
<strong>{$slide.title}</strong>
|
||||
<p><?php echo nl2br($slide['description']);?></p>
|
||||
<a href="{$slide.url}"><img src="__IMG__/ico_2.png" >View Services</a>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
<div class="ho1_operation">
|
||||
<div class="swiper-pagination"></div>
|
||||
<div class="fl">
|
||||
<div class="swiper-button-next"></div>
|
||||
<div class="swiper-button-prev"></div>
|
||||
</div>
|
||||
<div class="line_box"><i></i></div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="__JS__/swiper.min.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script>
|
||||
var swiper = new Swiper('.home_box1 .swiper-container', {
|
||||
effect : 'fade',
|
||||
loop:true,
|
||||
speed: 100,
|
||||
autoplay : {
|
||||
delay:6000,
|
||||
disableOnInteraction: false,
|
||||
},
|
||||
navigation: {
|
||||
nextEl: '.home_box1 .swiper-button-next',
|
||||
prevEl: '.home_box1 .swiper-button-prev',
|
||||
},
|
||||
pagination: {
|
||||
el: '.home_box1 .swiper-pagination',
|
||||
clickable: true,
|
||||
renderBullet: function (index, className) {
|
||||
return '<span class="' + className + '">' + (index + 1) + '</span>';
|
||||
},
|
||||
},
|
||||
on:{
|
||||
init: function(){
|
||||
$('.home_box1').addClass('active');
|
||||
},
|
||||
transitionEnd: function(){
|
||||
$('.home_box1 .swiper-container .swiper-slide .w1200').eq(this.activeIndex).addClass('active')
|
||||
var wz = $('.home_box1 .swiper-container .swiper-slide').eq(this.activeIndex).find('strong').text();
|
||||
var html = ''
|
||||
$.each(wz.split(""),function(i,item){
|
||||
html += '<span>'+item+'</span>'
|
||||
})
|
||||
$('.home_box1 .swiper-container .swiper-slide').eq(this.activeIndex).find('strong').empty();
|
||||
$('.home_box1 .swiper-container .swiper-slide').eq(this.activeIndex).find('strong').append(html)
|
||||
$('.home_box1 .swiper-container .swiper-slide').eq(this.activeIndex).find('strong span').each(function(i){
|
||||
var that = $(this);
|
||||
var speed = (i+1)*100+500;
|
||||
setTimeout(function(){
|
||||
that.addClass('active')
|
||||
},speed)
|
||||
})
|
||||
$('.line_box i').css('left',35*this.realIndex+'px')
|
||||
},
|
||||
transitionStart: function(){
|
||||
$('.home_box1 .swiper-container .swiper-slide .w1200').removeClass('active')
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
|
@ -1,132 +1,132 @@
|
|||
{layout name="layout" /}
|
||||
|
||||
<!-- slide -->
|
||||
<div class="banner-box w-100">
|
||||
<div class="swiper-container">
|
||||
<div class="swiper-wrapper">
|
||||
{if isset($slides) && count($slides) > 0}
|
||||
{foreach $slides as $banner}
|
||||
<div class="swiper-slide center-center" style="background-image: url({$banner.src});">
|
||||
{php}
|
||||
$bannerLink = 'javascript:;';
|
||||
if(!empty($banner['url'])) {
|
||||
$bannerLink = $banner['url'];
|
||||
}
|
||||
{/php}
|
||||
<a href="{$bannerLink}" class="center-center banner-slide-link">
|
||||
<div class="w-1500">
|
||||
<div class="pull-left">
|
||||
<p>{:nl2br($banner.title ?? '')}</p>
|
||||
<i>{:nl2br($banner.description ?? '')}</i>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</div>
|
||||
<div class="swiper-page"><div class="w-1500"><div class="swiper-pagination"></div></div></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="all-center-box">
|
||||
<!-- products -->
|
||||
<div class="home-box1 w-100">
|
||||
<div class="w-1500">
|
||||
<div class="all-title-box1 w-100"><span>{$productsCenter['title'] ?? '产品中心'}</span>
|
||||
<p>{$productsCenter['description'] ?? 'product center'}</p></div>
|
||||
<div class="center-block w-100">
|
||||
{if isset($products) && count($products) > 0}
|
||||
<ul>
|
||||
{foreach $products as $idx => $product}
|
||||
<li {if $idx == 0}class="active"{/if}>
|
||||
<div class="box-info" style="background-image: url({$product['src']});">
|
||||
<div class="box1">
|
||||
<span>{$product['title']}</span>
|
||||
<p>{$product['description']}</p>
|
||||
</div>
|
||||
<div class="box2">
|
||||
<a href="{:url('article/index', ['category_id'=>$product['id']])}">了解详情+</a>
|
||||
<i>{:str_pad($idx + 1, 2, '0', STR_PAD_LEFT)}</i>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- marketing -->
|
||||
<div class="home-box2 w-100" style="background-image: url({$blocks['marketing_background']['value'] ?? ''});">
|
||||
<div class="w-1500">
|
||||
<div class="pull-left column-between">
|
||||
<div class="all-title-box1 w-100"><span>{$blocks['marketing_name']['value'] ?? ''}</span>
|
||||
<p>{:nl2br($blocks['marketing_describe']['value'] ?? '')}</p></div>
|
||||
{php}
|
||||
$marketingLink = url('page/index', ['category_id'=>$marketingCId]);
|
||||
if(isset($blocks['marketing_background']['link']) && !empty($blocks['marketing_background']['link'])) {
|
||||
$marketingLink = $blocks['marketing_background']['link'];
|
||||
}
|
||||
{/php}
|
||||
<a href="{$marketingLink ?? 'javascript:;'}">了解详情++</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- news -->
|
||||
<div class="home-box3 w-100">
|
||||
<div class="w-1200">
|
||||
<div class="top-box w-100"><div class="between-bottom"><span>{$newsCenter['title'] ?? '新闻动态'}</span><i>{$newsCenter['description'] ?? ''}</i></div></div>
|
||||
<div class="lower-box w-100">
|
||||
{if isset($newsList) && count($newsList) > 0}
|
||||
{foreach $newsList as $newsCate}
|
||||
<ul>
|
||||
<p>{$newsCate.title ?? ''}</p>
|
||||
{if isset($newsCate['items']) && count($newsCate['items']) > 0}
|
||||
{foreach $newsCate['items'] as $news}
|
||||
<li>
|
||||
<a href="{:url('article/detail', ['id'=>$news['id']])}">
|
||||
<span title="{$news['title']|raw}">{$news['title']|raw}</span>
|
||||
<i>{$news['create_time']|date='Y年m月d日'}</i>
|
||||
</a>
|
||||
</li>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</ul>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
var swiper = new Swiper('.banner-box .swiper-container', {
|
||||
loop: true,
|
||||
speed: 1000,
|
||||
autoplay: {
|
||||
delay: 6000,
|
||||
disableOnInteraction: false,
|
||||
},
|
||||
navigation: {
|
||||
nextEl: '.banner-box .swiper-button-next',
|
||||
prevEl: '.banner-box .swiper-button-prev',
|
||||
},
|
||||
pagination :{
|
||||
el: '.banner-box .swiper-pagination',
|
||||
clickable :true,
|
||||
},
|
||||
on:{
|
||||
init: function(){
|
||||
|
||||
},
|
||||
transitionEnd: function(){
|
||||
$('.banner-box .swiper-container .swiper-slide .w-1500').eq(this.activeIndex).addClass('active')
|
||||
},
|
||||
transitionStart: function(){
|
||||
$('.banner-box .swiper-container .swiper-slide .w-1500').removeClass('active')
|
||||
},
|
||||
}
|
||||
});
|
||||
{layout name="layout" /}
|
||||
|
||||
<!-- slide -->
|
||||
<div class="banner-box w-100">
|
||||
<div class="swiper-container">
|
||||
<div class="swiper-wrapper">
|
||||
{if isset($slides) && count($slides) > 0}
|
||||
{foreach $slides as $banner}
|
||||
<div class="swiper-slide center-center" style="background-image: url({$banner.src});">
|
||||
{php}
|
||||
$bannerLink = 'javascript:;';
|
||||
if(!empty($banner['url'])) {
|
||||
$bannerLink = $banner['url'];
|
||||
}
|
||||
{/php}
|
||||
<a href="{$bannerLink}" class="center-center banner-slide-link">
|
||||
<div class="w-1500">
|
||||
<div class="pull-left">
|
||||
<p>{:nl2br($banner.title ?? '')}</p>
|
||||
<i>{:nl2br($banner.description ?? '')}</i>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</div>
|
||||
<div class="swiper-page"><div class="w-1500"><div class="swiper-pagination"></div></div></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="all-center-box">
|
||||
<!-- products -->
|
||||
<div class="home-box1 w-100">
|
||||
<div class="w-1500">
|
||||
<div class="all-title-box1 w-100"><span>{$productsCenter['title'] ?? '产品中心'}</span>
|
||||
<p>{$productsCenter['description'] ?? 'product center'}</p></div>
|
||||
<div class="center-block w-100">
|
||||
{if isset($products) && count($products) > 0}
|
||||
<ul>
|
||||
{foreach $products as $idx => $product}
|
||||
<li {if $idx == 0}class="active"{/if}>
|
||||
<div class="box-info" style="background-image: url({$product['src']});">
|
||||
<div class="box1">
|
||||
<span>{$product['title']}</span>
|
||||
<p>{$product['description']}</p>
|
||||
</div>
|
||||
<div class="box2">
|
||||
<a href="{:url('article/index', ['category_id'=>$product['id']])}">了解详情+</a>
|
||||
<i>{:str_pad($idx + 1, 2, '0', STR_PAD_LEFT)}</i>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- marketing -->
|
||||
<div class="home-box2 w-100" style="background-image: url({$blocks['marketing_background']['value'] ?? ''});">
|
||||
<div class="w-1500">
|
||||
<div class="pull-left column-between">
|
||||
<div class="all-title-box1 w-100"><span>{$blocks['marketing_name']['value'] ?? ''}</span>
|
||||
<p>{:nl2br($blocks['marketing_describe']['value'] ?? '')}</p></div>
|
||||
{php}
|
||||
$marketingLink = url('page/index', ['category_id'=>$marketingCId]);
|
||||
if(isset($blocks['marketing_background']['link']) && !empty($blocks['marketing_background']['link'])) {
|
||||
$marketingLink = $blocks['marketing_background']['link'];
|
||||
}
|
||||
{/php}
|
||||
<a href="{$marketingLink ?? 'javascript:;'}">了解详情++</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- news -->
|
||||
<div class="home-box3 w-100">
|
||||
<div class="w-1200">
|
||||
<div class="top-box w-100"><div class="between-bottom"><span>{$newsCenter['title'] ?? '新闻动态'}</span><i>{$newsCenter['description'] ?? ''}</i></div></div>
|
||||
<div class="lower-box w-100">
|
||||
{if isset($newsList) && count($newsList) > 0}
|
||||
{foreach $newsList as $newsCate}
|
||||
<ul>
|
||||
<p>{$newsCate.title ?? ''}</p>
|
||||
{if isset($newsCate['items']) && count($newsCate['items']) > 0}
|
||||
{foreach $newsCate['items'] as $news}
|
||||
<li>
|
||||
<a href="{:url('article/detail', ['id'=>$news['id']])}">
|
||||
<span title="{$news['title']|raw}">{$news['title']|raw}</span>
|
||||
<i>{$news['create_time']|date='Y年m月d日'}</i>
|
||||
</a>
|
||||
</li>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</ul>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
var swiper = new Swiper('.banner-box .swiper-container', {
|
||||
loop: true,
|
||||
speed: 1000,
|
||||
autoplay: {
|
||||
delay: 6000,
|
||||
disableOnInteraction: false,
|
||||
},
|
||||
navigation: {
|
||||
nextEl: '.banner-box .swiper-button-next',
|
||||
prevEl: '.banner-box .swiper-button-prev',
|
||||
},
|
||||
pagination :{
|
||||
el: '.banner-box .swiper-pagination',
|
||||
clickable :true,
|
||||
},
|
||||
on:{
|
||||
init: function(){
|
||||
|
||||
},
|
||||
transitionEnd: function(){
|
||||
$('.banner-box .swiper-container .swiper-slide .w-1500').eq(this.activeIndex).addClass('active')
|
||||
},
|
||||
transitionStart: function(){
|
||||
$('.banner-box .swiper-container .swiper-slide .w-1500').removeClass('active')
|
||||
},
|
||||
}
|
||||
});
|
||||
</script>
|
|
@ -1,182 +1,182 @@
|
|||
{layout name="layout"}
|
||||
<!-- banner -->
|
||||
<div class="page-banner w-100" style="background-image: url({:getImgSrc($topCategory, '__IMG__/page_ban1.jpg')});">
|
||||
<div class="info">
|
||||
<div class="w-1200">
|
||||
<strong>{$topCategory.title}</strong>
|
||||
<p>{:nl2br($topCategory.description ?? '')}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Company -->
|
||||
<div class="all-center-box">
|
||||
<div class="about-box1 w-100 center-center" id="about1">
|
||||
<div class="w-1200 disFlex">
|
||||
<div class="pull-left"><img class="imgH" src="{$blocks['company']['img']['value'] ?? ''}" ></div>
|
||||
<div class="pull-right">
|
||||
<div class="all-title-box2 w-100"><span>{$blocks['company']['title']['value'] ?? ''}</span><p>{$blocks['company']['subtitle']['value'] ?? ''}</p></div>
|
||||
<div class="box-info w-100">{:nl2br($blocks['company']['description']['value'] ?? '')}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Honors -->
|
||||
|
||||
<div class="about-box2 w-100" id="about2">
|
||||
<div class="w-1200">
|
||||
<div class="top-box w-100 between-center">
|
||||
<div class="all-title-box2"><span>{$blocks['honor']['title']['value'] ?? ''}</span><p>{$blocks['honor']['subtitle']['value'] ?? ''}</p></div>
|
||||
<div class="fr">
|
||||
{if isset($honors) && count($honors) > 0}
|
||||
{foreach $honors as $k => $honor}
|
||||
<span {if $k == 0}class="active"{/if}>{$honor.title}</span>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{if isset($honors) && count($honors) > 0}
|
||||
{foreach $honors as $k => $honor}
|
||||
<div class="lower-box w-100">
|
||||
<div class="div-pc w-100">
|
||||
<div class="pull-left">
|
||||
<ul>
|
||||
{foreach $honor.items as $item}
|
||||
<li><img src="{:getImgSrc($item, '__IMG__/default_bg.png')}"></li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<ul>
|
||||
{foreach $honor.items as $item}
|
||||
<li title="{$item.title}">{$item.title}</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="div-phone w-100">
|
||||
<div class="swiper-container">
|
||||
<div class="swiper-wrapper">
|
||||
{foreach $honor.items as $item}
|
||||
<div class="swiper-slide"><span><img src="{:getImgSrc($item, '__IMG__/default_bg.png')}" onclick="tanchuImg(this)"></span><p>{$item.title}</p></div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
<div class="honor-tc">
|
||||
<div class="center-center">
|
||||
<i onclick="$('.honor-tc').fadeOut();"></i>
|
||||
<img src="" >
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var swiper = new Swiper('.about-box2 .div-phone .swiper-container', {
|
||||
loop:true,
|
||||
autoHeight: true,
|
||||
autoplay:true
|
||||
});
|
||||
$('.about-box2 .top-box .fr span').click(function(){
|
||||
swiper.update()
|
||||
})
|
||||
function tanchuImg(obj){
|
||||
var imgsrc = $(obj).attr('src')
|
||||
$('.honor-tc').find('img').attr('src',imgsrc);
|
||||
$('.honor-tc').fadeIn();
|
||||
}
|
||||
</script>
|
||||
<!-- Structure -->
|
||||
<div id="about3" class="w-100">
|
||||
<div class="about-box3 w-100" >
|
||||
<div class="w-1200">
|
||||
<div class="all-title-box2"><span>{$blocks['structure']['title']['value'] ?? ''}</span><p>{$blocks['structure']['subtitle']['value'] ?? ''}</p></div>
|
||||
<div class="box-info w-100">
|
||||
<img src="{$blocks['structure']['img']['value'] ?? ''}" >
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- History -->
|
||||
<div class="about-box4 w-100" id="about4">
|
||||
<div class="w-1200">
|
||||
<div class="all-title-box2"><span>{$blocks['history']['title']['value'] ?? ''}</span><p>{$blocks['history']['subtitle']['value'] ?? ''}</p></div>
|
||||
<div class="top-box w-100">
|
||||
<div class="swiper-container">
|
||||
<div class="swiper-wrapper">
|
||||
{if isset($historyList) && count($historyList) > 0}
|
||||
{foreach $historyList as $history}
|
||||
<div class="swiper-slide"><p><span>{$history.title}</span><em> / 年</em></p><i></i></div>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="lower-box w-100">
|
||||
{if isset($historyList) && count($historyList) > 0}
|
||||
{foreach $historyList as $history}
|
||||
<div class="center-block w-100">
|
||||
{foreach $history['info'] as $k => $info}
|
||||
<p class="lower-box-item">{if $k > 0}<hr />{/if}{:nl2br($info['title'] ?? '')}</p>
|
||||
{/foreach}
|
||||
</div>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</div>
|
||||
<div class="swiper-btn">
|
||||
<div class="swiper-button-prev"></div>
|
||||
<div class="swiper-button-next"></div>
|
||||
<span>点击前后翻看</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="about-box5 w-100" id="about5">
|
||||
<div class="w-1200">
|
||||
<div class="video-box w-100">
|
||||
<i style="background-image: url({$blocks['video']['video']['img'] ?? ''});"></i>
|
||||
<video src="{$blocks['video']['video']['value'] ?? ''}" controls playsinline="isiPhoneShowPlaysinline" x5-video-player-type="h5-page" t7-video-player-type="inline" webkit-playsinline="isiPhoneShowPlaysinline" x-webkit-airplay="" preload="none"></video>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var initialSlide = 0;
|
||||
if($('.about-box4 .lower-box .center-block').length > 1){
|
||||
initialSlide = 1
|
||||
}
|
||||
var swiper = new Swiper('.about-box4 .swiper-container', {
|
||||
loop:true,
|
||||
initialSlide:initialSlide,
|
||||
slidesPerView: 3,
|
||||
spaceBetween: 0,
|
||||
centeredSlides : true,
|
||||
slideToClickedSlide: true,
|
||||
speed: 1000,
|
||||
autoplay: {
|
||||
delay: 6000,
|
||||
disableOnInteraction: false,
|
||||
},
|
||||
navigation: {
|
||||
nextEl: '.about-box4 .swiper-button-next',
|
||||
prevEl: '.about-box4 .swiper-button-prev',
|
||||
},
|
||||
on:{
|
||||
init: function(){
|
||||
$('.about-box4 .lower-box .center-block').hide().eq(initialSlide).show()
|
||||
},
|
||||
transitionEnd: function(){
|
||||
},
|
||||
transitionStart: function(){
|
||||
$('.about-box4 .lower-box .center-block').hide().eq(this.realIndex).fadeIn()
|
||||
},
|
||||
},
|
||||
breakpoints: {
|
||||
1280: { //当屏幕宽度大于等于1280
|
||||
slidesPerView: 3,
|
||||
}
|
||||
}
|
||||
});
|
||||
{layout name="layout"}
|
||||
<!-- banner -->
|
||||
<div class="page-banner w-100" style="background-image: url({:getImgSrc($topCategory, '__IMG__/page_ban1.jpg')});">
|
||||
<div class="info">
|
||||
<div class="w-1200">
|
||||
<strong>{$topCategory.title}</strong>
|
||||
<p>{:nl2br($topCategory.description ?? '')}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Company -->
|
||||
<div class="all-center-box">
|
||||
<div class="about-box1 w-100 center-center" id="about1">
|
||||
<div class="w-1200 disFlex">
|
||||
<div class="pull-left"><img class="imgH" src="{$blocks['company']['img']['value'] ?? ''}" ></div>
|
||||
<div class="pull-right">
|
||||
<div class="all-title-box2 w-100"><span>{$blocks['company']['title']['value'] ?? ''}</span><p>{$blocks['company']['subtitle']['value'] ?? ''}</p></div>
|
||||
<div class="box-info w-100">{:nl2br($blocks['company']['description']['value'] ?? '')}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Honors -->
|
||||
|
||||
<div class="about-box2 w-100" id="about2">
|
||||
<div class="w-1200">
|
||||
<div class="top-box w-100 between-center">
|
||||
<div class="all-title-box2"><span>{$blocks['honor']['title']['value'] ?? ''}</span><p>{$blocks['honor']['subtitle']['value'] ?? ''}</p></div>
|
||||
<div class="fr">
|
||||
{if isset($honors) && count($honors) > 0}
|
||||
{foreach $honors as $k => $honor}
|
||||
<span {if $k == 0}class="active"{/if}>{$honor.title}</span>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{if isset($honors) && count($honors) > 0}
|
||||
{foreach $honors as $k => $honor}
|
||||
<div class="lower-box w-100">
|
||||
<div class="div-pc w-100">
|
||||
<div class="pull-left">
|
||||
<ul>
|
||||
{foreach $honor.items as $item}
|
||||
<li><img src="{:getImgSrc($item, '__IMG__/default_bg.png')}"></li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<ul>
|
||||
{foreach $honor.items as $item}
|
||||
<li title="{$item.title}">{$item.title}</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="div-phone w-100">
|
||||
<div class="swiper-container">
|
||||
<div class="swiper-wrapper">
|
||||
{foreach $honor.items as $item}
|
||||
<div class="swiper-slide"><span><img src="{:getImgSrc($item, '__IMG__/default_bg.png')}" onclick="tanchuImg(this)"></span><p>{$item.title}</p></div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
<div class="honor-tc">
|
||||
<div class="center-center">
|
||||
<i onclick="$('.honor-tc').fadeOut();"></i>
|
||||
<img src="" >
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var swiper = new Swiper('.about-box2 .div-phone .swiper-container', {
|
||||
loop:true,
|
||||
autoHeight: true,
|
||||
autoplay:true
|
||||
});
|
||||
$('.about-box2 .top-box .fr span').click(function(){
|
||||
swiper.update()
|
||||
})
|
||||
function tanchuImg(obj){
|
||||
var imgsrc = $(obj).attr('src')
|
||||
$('.honor-tc').find('img').attr('src',imgsrc);
|
||||
$('.honor-tc').fadeIn();
|
||||
}
|
||||
</script>
|
||||
<!-- Structure -->
|
||||
<div id="about3" class="w-100">
|
||||
<div class="about-box3 w-100" >
|
||||
<div class="w-1200">
|
||||
<div class="all-title-box2"><span>{$blocks['structure']['title']['value'] ?? ''}</span><p>{$blocks['structure']['subtitle']['value'] ?? ''}</p></div>
|
||||
<div class="box-info w-100">
|
||||
<img src="{$blocks['structure']['img']['value'] ?? ''}" >
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- History -->
|
||||
<div class="about-box4 w-100" id="about4">
|
||||
<div class="w-1200">
|
||||
<div class="all-title-box2"><span>{$blocks['history']['title']['value'] ?? ''}</span><p>{$blocks['history']['subtitle']['value'] ?? ''}</p></div>
|
||||
<div class="top-box w-100">
|
||||
<div class="swiper-container">
|
||||
<div class="swiper-wrapper">
|
||||
{if isset($historyList) && count($historyList) > 0}
|
||||
{foreach $historyList as $history}
|
||||
<div class="swiper-slide"><p><span>{$history.title}</span><em> / 年</em></p><i></i></div>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="lower-box w-100">
|
||||
{if isset($historyList) && count($historyList) > 0}
|
||||
{foreach $historyList as $history}
|
||||
<div class="center-block w-100">
|
||||
{foreach $history['info'] as $k => $info}
|
||||
<p class="lower-box-item">{if $k > 0}<hr />{/if}{:nl2br($info['title'] ?? '')}</p>
|
||||
{/foreach}
|
||||
</div>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</div>
|
||||
<div class="swiper-btn">
|
||||
<div class="swiper-button-prev"></div>
|
||||
<div class="swiper-button-next"></div>
|
||||
<span>点击前后翻看</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="about-box5 w-100" id="about5">
|
||||
<div class="w-1200">
|
||||
<div class="video-box w-100">
|
||||
<i style="background-image: url({$blocks['video']['video']['img'] ?? ''});"></i>
|
||||
<video src="{$blocks['video']['video']['value'] ?? ''}" controls playsinline="isiPhoneShowPlaysinline" x5-video-player-type="h5-page" t7-video-player-type="inline" webkit-playsinline="isiPhoneShowPlaysinline" x-webkit-airplay="" preload="none"></video>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var initialSlide = 0;
|
||||
if($('.about-box4 .lower-box .center-block').length > 1){
|
||||
initialSlide = 1
|
||||
}
|
||||
var swiper = new Swiper('.about-box4 .swiper-container', {
|
||||
loop:true,
|
||||
initialSlide:initialSlide,
|
||||
slidesPerView: 3,
|
||||
spaceBetween: 0,
|
||||
centeredSlides : true,
|
||||
slideToClickedSlide: true,
|
||||
speed: 1000,
|
||||
autoplay: {
|
||||
delay: 6000,
|
||||
disableOnInteraction: false,
|
||||
},
|
||||
navigation: {
|
||||
nextEl: '.about-box4 .swiper-button-next',
|
||||
prevEl: '.about-box4 .swiper-button-prev',
|
||||
},
|
||||
on:{
|
||||
init: function(){
|
||||
$('.about-box4 .lower-box .center-block').hide().eq(initialSlide).show()
|
||||
},
|
||||
transitionEnd: function(){
|
||||
},
|
||||
transitionStart: function(){
|
||||
$('.about-box4 .lower-box .center-block').hide().eq(this.realIndex).fadeIn()
|
||||
},
|
||||
},
|
||||
breakpoints: {
|
||||
1280: { //当屏幕宽度大于等于1280
|
||||
slidesPerView: 3,
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
|
@ -1,79 +1,79 @@
|
|||
{php}
|
||||
//dump($menus);
|
||||
function getMenus($menus, $level = 1, $currentFirstId, $categoryId) {
|
||||
$menuHtml = '';
|
||||
$levelList = ['nav-first','nav-second','nav-third'];
|
||||
$navClass = $levelList[$level - 1] ?? '';
|
||||
if (count($menus) > 0) {
|
||||
$menuHtml .= '';
|
||||
if($level > 1) {
|
||||
$menuHtml .= '<div class="'.$navClass.'" >';
|
||||
}
|
||||
|
||||
|
||||
foreach ($menus as $menu) {
|
||||
$activeClass = '';
|
||||
if ($currentFirstId == $menu['id'] || $categoryId == $menu['id'] || ($currentFirstId == 0 && $menu['is_index'])) {
|
||||
$activeClass = ' active';
|
||||
}
|
||||
$aHref = getUri($menu);
|
||||
$aHref = empty($aHref) ? 'javascript:;' : $aHref;
|
||||
$spanClass = '';
|
||||
$hasChild = false;
|
||||
if (isset($menu['children']) && count($menu['children']) > 0) {
|
||||
$hasChild = true;
|
||||
$spanClass = 'class="cur"';
|
||||
}
|
||||
if($level == 1) {
|
||||
$menuHtml .= '<li class="'.$activeClass.'" >';
|
||||
$menuHtml .= '<span '.$spanClass.'><a href="'.$aHref.'" target="'.$menu['style'].'">'.$menu['title'].'</a></span>';
|
||||
if ($hasChild) {
|
||||
$menuHtml .= getMenus($menu['children'], $level + 1, $currentFirstId, $categoryId);
|
||||
}
|
||||
$menuHtml .= '</li>';
|
||||
} else {
|
||||
if($menu['template_list']=='products'){
|
||||
$menuHtml .= '<a href="'.$aHref.'#product" target="'.$menu['style'].'" class="'.$activeClass.'">';
|
||||
}else if($menu['template_list']=='news'){
|
||||
$menuHtml .= '<a href="'.$aHref.'#news" target="'.$menu['style'].'" class="'.$activeClass.'">';
|
||||
}else
|
||||
{
|
||||
$menuHtml .= '<a href="'.$aHref.'" target="'.$menu['style'].'" class="'.$activeClass.'">';
|
||||
}
|
||||
$menuHtml .= '<span '.$spanClass.'>'.$menu['title'].'</span>';
|
||||
if ($hasChild) {
|
||||
$menuHtml .= getMenus($menu['children'], $level + 1, $currentFirstId, $categoryId);
|
||||
}
|
||||
$menuHtml .= '</a>';
|
||||
}
|
||||
}
|
||||
if($level > 1) {
|
||||
$menuHtml .= '</div>';
|
||||
}
|
||||
}
|
||||
return $menuHtml;
|
||||
}
|
||||
{/php}
|
||||
|
||||
<div class="head-box w-100">
|
||||
<div class="w-1500">
|
||||
<div class="center-block w-100 between-center">
|
||||
<div class="logo center-center">
|
||||
<a href="{:url('/')}"><img src="__IMG__/logo.png"></a>
|
||||
</div>
|
||||
<div class="nav">
|
||||
<ul>
|
||||
{:getMenus($menus, 1, $currentFirstId, $categoryId)}
|
||||
</ul>
|
||||
</div>
|
||||
<!-- <div class="language">
|
||||
<a href="" class="active">中文</a> / <a href="">English</a>
|
||||
</div> -->
|
||||
<div class="nav_btn">
|
||||
<i class="bar-top"></i>
|
||||
<i class="bar-cen"></i>
|
||||
<i class="bar-bom"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{php}
|
||||
//dump($menus);
|
||||
function getMenus($menus, $level = 1, $currentFirstId, $categoryId) {
|
||||
$menuHtml = '';
|
||||
$levelList = ['nav-first','nav-second','nav-third'];
|
||||
$navClass = $levelList[$level - 1] ?? '';
|
||||
if (count($menus) > 0) {
|
||||
$menuHtml .= '';
|
||||
if($level > 1) {
|
||||
$menuHtml .= '<div class="'.$navClass.'" >';
|
||||
}
|
||||
|
||||
|
||||
foreach ($menus as $menu) {
|
||||
$activeClass = '';
|
||||
if ($currentFirstId == $menu['id'] || $categoryId == $menu['id'] || ($currentFirstId == 0 && $menu['is_index'])) {
|
||||
$activeClass = ' active';
|
||||
}
|
||||
$aHref = getUri($menu);
|
||||
$aHref = empty($aHref) ? 'javascript:;' : $aHref;
|
||||
$spanClass = '';
|
||||
$hasChild = false;
|
||||
if (isset($menu['children']) && count($menu['children']) > 0) {
|
||||
$hasChild = true;
|
||||
$spanClass = 'class="cur"';
|
||||
}
|
||||
if($level == 1) {
|
||||
$menuHtml .= '<li class="'.$activeClass.'" >';
|
||||
$menuHtml .= '<span '.$spanClass.'><a href="'.$aHref.'" target="'.$menu['style'].'">'.$menu['title'].'</a></span>';
|
||||
if ($hasChild) {
|
||||
$menuHtml .= getMenus($menu['children'], $level + 1, $currentFirstId, $categoryId);
|
||||
}
|
||||
$menuHtml .= '</li>';
|
||||
} else {
|
||||
if($menu['template_list']=='products'){
|
||||
$menuHtml .= '<a href="'.$aHref.'#product" target="'.$menu['style'].'" class="'.$activeClass.'">';
|
||||
}else if($menu['template_list']=='news'){
|
||||
$menuHtml .= '<a href="'.$aHref.'#news" target="'.$menu['style'].'" class="'.$activeClass.'">';
|
||||
}else
|
||||
{
|
||||
$menuHtml .= '<a href="'.$aHref.'" target="'.$menu['style'].'" class="'.$activeClass.'">';
|
||||
}
|
||||
$menuHtml .= '<span '.$spanClass.'>'.$menu['title'].'</span>';
|
||||
if ($hasChild) {
|
||||
$menuHtml .= getMenus($menu['children'], $level + 1, $currentFirstId, $categoryId);
|
||||
}
|
||||
$menuHtml .= '</a>';
|
||||
}
|
||||
}
|
||||
if($level > 1) {
|
||||
$menuHtml .= '</div>';
|
||||
}
|
||||
}
|
||||
return $menuHtml;
|
||||
}
|
||||
{/php}
|
||||
|
||||
<div class="head-box w-100">
|
||||
<div class="w-1500">
|
||||
<div class="center-block w-100 between-center">
|
||||
<div class="logo center-center">
|
||||
<a href="{:url('/')}"><img src="__IMG__/logo.png"></a>
|
||||
</div>
|
||||
<div class="nav">
|
||||
<ul>
|
||||
{:getMenus($menus, 1, $currentFirstId, $categoryId)}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="language">
|
||||
<a href="/" class="active">中文</a> / <a href="/en">English</a>
|
||||
</div>
|
||||
<div class="nav_btn">
|
||||
<i class="bar-top"></i>
|
||||
<i class="bar-cen"></i>
|
||||
<i class="bar-bom"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
Loading…
Reference in New Issue