dever vor 4 Jahren
Ursprung
Commit
d6e15d8ba3

+ 123 - 0
app/act/database/contact.php

@@ -0,0 +1,123 @@
+<?php
+
+$xuqiu = array
+(
+	1 => '广告',
+	2 => '投稿',
+	3 => '合作',
+);
+
+return array
+(
+	# 表名
+	'name' => 'contact',
+	# 显示给用户看的名称
+	'lang' => '联系信息管理',
+	# 是否显示在后台菜单
+	'order' => 99,
+	'xuqiu' => $xuqiu,
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			'order'		=> 'desc',
+			//'list'		=> true,
+		),
+
+		'username' 		=> array
+		(
+			'type' 		=> 'varchar-200',
+			'name' 		=> '姓名',
+			'default' 	=> '',
+			'desc' 		=> '姓名',
+			'match' 	=> 'option',
+			'search'	=> 'fulltext',
+			'list'		=> true,
+		),
+
+		'mobile' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '电话',
+			'default' 	=> '',
+			'desc' 		=> '电话',
+			'match' 	=> 'option',
+			'search'	=> 'fulltext',
+			'list'		=> true,
+		),
+
+		'email' 		=> array
+		(
+			'type' 		=> 'varchar-500',
+			'name' 		=> '电子邮件',
+			'default' 	=> '',
+			'desc' 		=> '电子邮件',
+			'match' 	=> 'option',
+			'search'	=> 'fulltext',
+			'list'		=> true,
+		),
+
+		'content' 		=> array
+		(
+			'type' 		=> 'varchar-2000',
+			'name' 		=> '留言内容',
+			'default' 	=> '',
+			'desc' 		=> '留言内容',
+			'match' 	=> 'option',
+			'search'	=> 'fulltext',
+			'list'		=> true,
+		),
+
+		'xuqiu'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '需求',
+			'default' 	=> '3',
+			'desc' 		=> '需求',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'select',
+			'option'	=> $xuqiu,
+			'search'	=> 'select',
+			'list'		=> true,
+		),
+
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> 'is_numeric',
+		),
+		
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '创建时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+			'search'	=> 'date',
+			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
+		),
+	),
+
+	'manage' => array
+	(
+		'insert' => false,
+		'edit' => false,
+	),
+
+	# request 请求接口定义
+	'request' => array
+	(
+		
+	)
+);

+ 118 - 0
app/act/database/ding.php

@@ -0,0 +1,118 @@
+<?php
+
+$qudao = array
+(
+	1 => '虚拟人社区',
+);
+
+return array
+(
+	# 表名
+	'name' => 'ding',
+	# 显示给用户看的名称
+	'lang' => '订阅信息',
+	# 是否显示在后台菜单
+	'order' => 100,
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			'order'		=> 'desc',
+			'list'		=> true,
+		),
+		
+		'uid'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '用户名',
+			'default' 	=> '0',
+			'desc' 		=> '请选择用户',
+			'match' 	=> 'is_numeric',
+			//'update'	=> 'select',
+			//'search'	=> 'select',
+			/*
+			'search'    => array
+            (
+                'api' => 'passport/user-all',
+                'col' => 'username',
+                'result' => 'id',
+            ),
+            */
+			//'list'		=> '{uid} > 0 ? Dever::load("passport/user-one#username", {uid}) : "匿名用户"',
+		),
+
+		'username' 		=> array
+		(
+			'type' 		=> 'varchar-200',
+			'name' 		=> '用户名',
+			'default' 	=> '',
+			'desc' 		=> '用户名',
+			'match' 	=> 'option',
+			'search'	=> 'fulltext',
+			'list'		=> true,
+		),
+
+		'email' 		=> array
+		(
+			'type' 		=> 'varchar-500',
+			'name' 		=> '电子邮件',
+			'default' 	=> '',
+			'desc' 		=> '电子邮件',
+			'match' 	=> 'option',
+			'search'	=> 'fulltext',
+			'list'		=> true,
+		),
+
+		'qudao'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '订阅渠道',
+			'default' 	=> '1',
+			'desc' 		=> '订阅渠道',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'select',
+			'option'	=> $qudao,
+			'search'	=> 'select',
+			'list'		=> true,
+		),
+
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> 'is_numeric',
+		),
+		
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '创建时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+			'search'	=> 'date',
+			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
+		),
+	),
+
+	'manage' => array
+	(
+		'insert' => false,
+		'edit' => false,
+	),
+
+	# request 请求接口定义
+	'request' => array
+	(
+		
+	)
+);

+ 99 - 0
app/act/database/share.php

@@ -0,0 +1,99 @@
+<?php
+
+$type = array
+(
+	1 => '微博分享',
+	2 => '微信分享',
+);
+
+return array
+(
+	# 表名
+	'name' => 'share',
+	# 显示给用户看的名称
+	'lang' => '分享日志',
+	# 是否显示在后台菜单
+	'order' => 101,
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			'order'		=> 'desc',
+			'list'		=> true,
+		),
+
+		'name' 		=> array
+		(
+			'type' 		=> 'varchar-200',
+			'name' 		=> '分享内容标题',
+			'default' 	=> '',
+			'desc' 		=> '分享内容标题',
+			'match' 	=> 'option',
+			'search'	=> 'fulltext',
+			'list'		=> true,
+		),
+
+		'link' 		=> array
+		(
+			'type' 		=> 'varchar-500',
+			'name' 		=> '分享链接',
+			'default' 	=> '',
+			'desc' 		=> '分享链接',
+			'match' 	=> 'option',
+			'search'	=> 'fulltext',
+			'list'		=> true,
+		),
+
+		'type'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '分享类别',
+			'default' 	=> '1',
+			'desc' 		=> '分享类别',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'select',
+			'option'	=> $type,
+			'search'	=> 'select',
+			'list'		=> true,
+		),
+
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> 'is_numeric',
+		),
+		
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '分享时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+			'search'	=> 'date',
+			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
+		),
+	),
+
+	'manage' => array
+	(
+		'insert' => false,
+		'edit' => false,
+	),
+
+	# request 请求接口定义
+	'request' => array
+	(
+		
+	)
+);

+ 8 - 0
app/act/index.php

@@ -0,0 +1,8 @@
+<?php
+
+define('DEVER_APP_NAME', 'act');
+define('DEVER_APP_LANG', '互动管理');
+define('DEVER_APP_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR);
+define('DEVER_MANAGE_ORDER', 195);
+define('DEVER_MANAGE_ICON', 'glyphicon glyphicon-tower layui-icon-theme');
+include(DEVER_APP_PATH . '../boot.php');

+ 28 - 0
app/act/lib/Contact.php

@@ -0,0 +1,28 @@
+<?php
+
+namespace Act\Lib;
+
+use Dever;
+
+class Contact
+{
+    # 新增
+    public function add($username, $mobile, $email, $content, $xuqiu = 1)
+    {
+        $where = array();
+
+        $where['username'] = $username;
+        $where['email'] = $email;
+        $where['mobile'] = $mobile;
+        $where['content'] = $content;
+        $where['xuqiu'] = $xuqiu;
+
+        $info = Dever::db('act/contact')->one($where);
+
+        if (!$info) {
+        	Dever::db('act/contact')->insert($where);
+        }
+
+        return true;
+    }
+}

+ 26 - 0
app/act/lib/Ding.php

@@ -0,0 +1,26 @@
+<?php
+
+namespace Act\Lib;
+
+use Dever;
+
+class Ding
+{
+    # 新增
+    public function add($username, $email, $qudao = 1)
+    {
+        $where = array();
+
+        $where['username'] = $username;
+        $where['email'] = $email;
+        $where['qudao'] = $qudao;
+
+        $info = Dever::db('act/ding')->one($where);
+
+        if (!$info) {
+        	Dever::db('act/ding')->insert($where);
+        }
+
+        return true;
+    }
+}

+ 22 - 0
app/act/lib/Share.php

@@ -0,0 +1,22 @@
+<?php
+
+namespace Act\Lib;
+
+use Dever;
+
+class Share
+{
+    # 新增
+    public function add($name, $link, $type = 1)
+    {
+        $where = array();
+
+        $where['name'] = $name;
+        $where['link'] = $link;
+        $where['type'] = $type;
+
+        Dever::db('act/share')->insert($where);
+
+        return true;
+    }
+}

+ 16 - 0
app/content/database/news.php

@@ -338,6 +338,22 @@ return array
             'col' => '*',
         ),
 
+        'getOne' => array
+        (
+            # 匹配的正则或函数 选填项
+            'option' => array
+            (
+                'ids' => array('yes-id', 'in'),
+                'name' => array('yes', 'like'),
+                'id' => 'yes',
+                'type' => 'yes',
+                'status' => 1,
+                'state' => 1,
+            ),
+            'type' => 'one',
+            'col' => '*',
+        ),
+
         'getAll' => array
         (
             # 匹配的正则或函数 选填项

+ 21 - 1
app/content/lib/News.php

@@ -32,9 +32,12 @@ class News
     {
         $where = array();
 
-        if ($type) {
+        if ($type && $type > 0) {
             $where['type'] = $type;
         }
+        if($name) {
+            $where['name'] = $name;
+        }
 
         $data = Dever::db('content/news')->getAll($where);
 
@@ -47,6 +50,23 @@ class News
         return $data;
     }
 
+    public function getInfo($type, $id)
+    {
+        $where = array();
+
+        if ($type) {
+            $where['type'] = $type;
+        }
+
+        $data = Dever::db('content/news')->getOne($where);
+
+        if ($data) {
+            $data = $this->getOne($data);
+        }
+
+        return $data;
+    }
+
     private function getOne($info)
     {
         $info['link'] = Dever::url('main/article?type='.$info['type'].'&id=' . $info['id']);

+ 1 - 1
app/push/database/info.php

@@ -176,7 +176,7 @@ return array
         (
             'type'      => 'varchar-30',
             'name'      => '启用的功能',
-            'default'   => '1,2,3,4,5,6,10',
+            'default'   => '1',
             'desc'      => '启用的功能',
             'match'     => 'is_string',
             'option'    => $function,

+ 2 - 1
app/push/lib/Data.php

@@ -6,7 +6,7 @@ use Dever;
 
 class Data
 {
-    public function get($key, $name, $total = 10, $col = '1,2,3,4,5,6,7', $page = false, $limit = false)
+    public function get($key, $name, $total = 10, $col = '1,2,3,4,5,6,7', $function = '10',$page = false, $limit = false)
     {
         $info = Dever::db('push/info')->one(array('key' => $key));
 
@@ -15,6 +15,7 @@ class Data
             $insert['name'] = $name;
             $insert['num'] = $total;
             $insert['col'] = $col;
+            $insert['function'] = $function;
             $info['id'] = Dever::db('push/info')->insert($insert);
             $info['num'] = $insert['num'];
         }

+ 11 - 8
data/compile/cms/main/xuniren/activity.cmp.php

@@ -1,10 +1,13 @@
 <?php $name='activity' ?>
 <?php $title='活动' ?>
 <?php $data['main/content.config']=Dever::load('main/content.config') ?>
+<?php $data['main/content.search']=Dever::load('main/content.search') ?>
+<?php $data['main/content.msearch']=Dever::load('main/content.msearch') ?>
 <?php $data['main/content.menu']=Dever::load('main/content.menu') ?>
 <?php $data['main/content.news|type=4']=Dever::load('main/content.news', array (
   'type' => '4',
 )) ?>
+<?php $data['main/content.news?type=4']=Dever::load('main/content.news?type=4') ?>
 <!DOCTYPE html>
 <!--power by dever--><html>
 
@@ -35,8 +38,8 @@
 						<a href="#" class="iconfont icon-search"></a>
 						<div class="search-layer">
 							<div>
-								<input type="text">
-								<a href="#">搜索</a>
+								<input type="text" id="search">
+								<a href="javascript:;" onclick="<?php echo $data['main/content.search'] ?>">搜索</a>
 							</div>
 						</div>
 					</li>
@@ -44,9 +47,9 @@
 						<a href="#" class="iconfont icon-user"></a>
 						<div class="user-layer">
 							<div>
-								<a href="#" class="iconfont icon-weibo"></a>
-								<a href="#" class="iconfont icon-weixin"></a>
-								<a href="#" class="iconfont icon-link"></a>
+								<a href="<?php  echo Dever::load("main/content.config#weibo") ?>" class="iconfont icon-weibo"></a>
+								<a href="#" class="iconfont icon-weixin" data-qrcode="<?php  echo Dever::load("main/content.config#weixin_qrcode") ?>"></a>
+								<a href="<?php  echo Dever::load("main/content.config#contact") ?>" class="iconfont icon-link"></a>
 							</div>
 						</div>
 					</li>
@@ -85,14 +88,14 @@
 				</ul>
 			</div>
 			<div class="m-search-layer">
-				<div><i class="iconfont icon-search"></i><input type="text" placeholder="搜索"></div>
+				<div><i class="iconfont icon-search" onclick="<?php echo $data['main/content.msearch'] ?>"></i><input type="text" placeholder="搜索" id="msearch"></div>
 				<i class="iconfont icon-close"></i>
 			</div>
 		</div>
 	</header>
 
 	
-	<div class="activity-module wrapper">
+	<div class="activity-module wrapper" style="<?php if(!(Dever::load('main/content.news?type=4'))): ?>display:none;<?php endif; ?>">
 		<div class="swiper-container">
 			<div class="swiper-wrapper clearfix">
 				<?php if(isset($data['main/content.news|type=4']) && is_array($data['main/content.news|type=4'])): ?><?php $t=count($data['main/content.news|type=4'])-1 ?><?php $i=0 ?><?php foreach($data['main/content.news|type=4'] as $k => $v): ?><div class="swiper-slide">
@@ -120,7 +123,7 @@
 	
 
 	<script src="<?php echo Dever::config("host")->static ?>jquery.js"></script> 
-<script type="text/javascript" src="<?php echo Dever::config("host")->js ?>global.js?v=6408e250"></script><script type="text/javascript" src="<?php echo Dever::config("host")->js ?>activity.js?v=11102b9f"></script><div id="page" dever-page-link="<?php  echo Dever::pageInfo()["link"] ?>" dever-page-list=".news-module"></div><script src="http://192.168.33.10/dever_package/script/assets/dever/core.js?v=1616339799"></script><script src="http://192.168.33.10/cms/main/assets/xuniren/js/config.js?v=1616339799"></script></body>
+<script type="text/javascript" src="<?php echo Dever::config("host")->js ?>global.js?v=6408e250"></script><script type="text/javascript" src="<?php echo Dever::config("host")->js ?>activity.js?v=11102b9f"></script><div id="page" dever-page-link="<?php  echo Dever::pageInfo()["link"] ?>" dever-page-list=".news-module"></div><script src="http://192.168.33.10/dever_package/script/assets/dever/core.js?v=1616387060"></script><script src="http://192.168.33.10/cms/main/assets/xuniren/js/config.js?v=1616387060"></script></body>
 <script src="<?php echo Dever::config("host")->static ?>swiper.min.js"></script>
 <script>
 	if(!/iphone|android/.test(navigator.userAgent.toLocaleLowerCase())) {

+ 33 - 59
data/compile/cms/main/xuniren/article.cmp.php

@@ -1,7 +1,14 @@
 <?php $name='article' ?>
-<?php $title='资讯内容' ?>
+<?php $title=Dever::load('main/content.view#name') ?>
 <?php $data['main/content.config']=Dever::load('main/content.config') ?>
 <?php $data['main/content.menu']=Dever::load('main/content.menu') ?>
+<?php $data['main/content.view']=Dever::load('main/content.view') ?>
+<?php $data['main/content.hot']=Dever::load('main/content.hot') ?>
+<?php $data['main/content.ad|key=news_view_ad&name=资讯详情页广告']=Dever::load('main/content.ad', array (
+  'key' => 'news_view_ad',
+  'name' => '资讯详情页广告',
+)) ?>
+<?php $data['main/content.ad?key=news_view_ad&name=资讯详情页广告']=Dever::load('main/content.ad?key=news_view_ad&name=资讯详情页广告') ?>
 <!DOCTYPE html>
 <!--power by dever--><html>
 
@@ -40,9 +47,9 @@
 						<a href="#" class="iconfont icon-user"></a>
 						<div class="user-layer">
 							<div>
-								<a href="#" class="iconfont icon-weibo"></a>
-								<a href="#" class="iconfont icon-weixin"></a>
-								<a href="#" class="iconfont icon-link"></a>
+								<a href="<?php  echo Dever::load("main/content.config#weibo") ?>" class="iconfont icon-weibo"></a>
+								<a href="#" class="iconfont icon-weixin" data-qrcode="<?php  echo Dever::load("main/content.config#weixin_qrcode") ?>"></a>
+								<a href="<?php  echo Dever::load("main/content.config#contact") ?>" class="iconfont icon-link"></a>
 							</div>
 						</div>
 					</li>
@@ -88,11 +95,11 @@
 	</header>
 
 	<h3 class="common-tit noborder article-title">
-		<span>MIT研发新型医用贴片<br>可帮助手术机器人修复人体内损伤</span>
-		<em>Sep 23, 2020 by Liz Gioro</em>
+		<span><?php echo $data['main/content.view']['sname'] ?></span>
+		<em><?php echo $data['main/content.view']['pdate_string'] ?></em>
 	</h3>
 	<div class="article-wrapper wrapper">
-		<img src="<?php echo Dever::config("host")->images ?>banner.jpg?v=7bbe3c38" alt="" />
+		<img src="<?php echo $data['main/content.view']['pic'] ?>" alt="" />
 		<section>
 			<div class="share-wrapper">
 				<span>分享此文章</span>
@@ -103,25 +110,7 @@
 				</ul>
 			</div>
 			<div class="article-content">
-				<article>
-					<p>虽然,目前已经有类似的粘合贴片在这类手术中使用,但是这种贴片的粘合存在一定缺陷,尤其是在处理炎症和疤痕组织的时候。</p> 
-					<p>麻省理工学院的设计解决了这些问题,方法是用一种以水凝胶为基础的粘合剂、一种涂有硅油的材料来防止意外黏附,以及一种具有两离子性质 ( 即带有正负离子的分子链 ) 的弹性体外层来保护贴片不受细菌侵害。</p>	
-					<p>这种设计的结果是新型贴片很容易缠绕在机器人工具上,即便在液体中长时间浸泡,也能很牢固地附着在身体组织上,且不易受到细菌污染。机器臂只需要施加轻微的压力既可以完成粘合。</p>	
-					<p>不过就像很多创新应用一样,这种贴片距离实际应用还有一段时间,不过科学家们设想与手术机器人平台开发者进行合作,未来将有望看到机器人和生物粘合剂在医学界的更多应用。</p>
-					<p>虽然,目前已经有类似的粘合贴片在这类手术中使用,但是这种贴片的粘合存在一定缺陷,尤其是在处理炎症和疤痕组织的时候。</p> 
-					<p>麻省理工学院的设计解决了这些问题,方法是用一种以水凝胶为基础的粘合剂、一种涂有硅油的材料来防止意外黏附,以及一种具有两离子性质 ( 即带有正负离子的分子链 ) 的弹性体外层来保护贴片不受细菌侵害。</p>	
-					<p>这种设计的结果是新型贴片很容易缠绕在机器人工具上,即便在液体中长时间浸泡,也能很牢固地附着在身体组织上,且不易受到细菌污染。机器臂只需要施加轻微的压力既可以完成粘合。</p>	
-					<p>不过就像很多创新应用一样,这种贴片距离实际应用还有一段时间,不过科学家们设想与手术机器人平台开发者进行合作,未来将有望看到机器人和生物粘合剂在医学界的更多应用。</p>
-					<p><img src="<?php echo Dever::config("host")->images ?>banner.jpg?v=7bbe3c38" alt="" /></p>
-					<p>虽然,目前已经有类似的粘合贴片在这类手术中使用,但是这种贴片的粘合存在一定缺陷,尤其是在处理炎症和疤痕组织的时候。</p> 
-					<p>麻省理工学院的设计解决了这些问题,方法是用一种以水凝胶为基础的粘合剂、一种涂有硅油的材料来防止意外黏附,以及一种具有两离子性质 ( 即带有正负离子的分子链 ) 的弹性体外层来保护贴片不受细菌侵害。</p>	
-					<p>这种设计的结果是新型贴片很容易缠绕在机器人工具上,即便在液体中长时间浸泡,也能很牢固地附着在身体组织上,且不易受到细菌污染。机器臂只需要施加轻微的压力既可以完成粘合。</p>	
-					<p>不过就像很多创新应用一样,这种贴片距离实际应用还有一段时间,不过科学家们设想与手术机器人平台开发者进行合作,未来将有望看到机器人和生物粘合剂在医学界的更多应用。</p>
-					<p>虽然,目前已经有类似的粘合贴片在这类手术中使用,但是这种贴片的粘合存在一定缺陷,尤其是在处理炎症和疤痕组织的时候。</p> 
-					<p>麻省理工学院的设计解决了这些问题,方法是用一种以水凝胶为基础的粘合剂、一种涂有硅油的材料来防止意外黏附,以及一种具有两离子性质 ( 即带有正负离子的分子链 ) 的弹性体外层来保护贴片不受细菌侵害。</p>	
-					<p>这种设计的结果是新型贴片很容易缠绕在机器人工具上,即便在液体中长时间浸泡,也能很牢固地附着在身体组织上,且不易受到细菌污染。机器臂只需要施加轻微的压力既可以完成粘合。</p>	
-					<p>不过就像很多创新应用一样,这种贴片距离实际应用还有一段时间,不过科学家们设想与手术机器人平台开发者进行合作,未来将有望看到机器人和生物粘合剂在医学界的更多应用。</p>
-				</article>
+				<article><?php echo $data['main/content.view']['content'] ?></article>
 				<div class="tags">
 					<h5>环球网科技综合报道</h5>
 					<ul>
@@ -135,43 +124,28 @@
 		</section>
 	</div>
 
-	<ul class="article-recs wrapper">
-		<li>
-			<div class="poster"><a href="#" target="_blank"><img src="<?php echo Dever::config("host")->images ?>tmp2.jpg?v=380c098e" alt="" /></a></div>
-			<a href="#" target="_blank">手术机器人修复人体内损伤</a>
-		</li>
-		<li>
-			<div class="poster"><a href="#" target="_blank"><img src="<?php echo Dever::config("host")->images ?>tmp2.jpg?v=380c098e" alt="" /></a></div>
-			<a href="#" target="_blank">手术机器人修复人体内损伤</a>
-		</li>
-		<li>
-			<div class="poster"><a href="#" target="_blank"><img src="<?php echo Dever::config("host")->images ?>tmp2.jpg?v=380c098e" alt="" /></a></div>
-			<a href="#" target="_blank">手术机器人修复人体内损伤</a>
-		</li>
-		<li>
-			<div class="poster"><a href="#" target="_blank"><img src="<?php echo Dever::config("host")->images ?>tmp2.jpg?v=380c098e" alt="" /></a></div>
-			<a href="#" target="_blank">手术机器人修复人体内损伤</a>
-		</li>
+	<ul class="article-recs wrapper" style="<?php if(!(Dever::load('main/content.hot'))): ?>display:none;<?php endif; ?>">
+		<?php if(isset($data['main/content.hot']) && is_array($data['main/content.hot'])): ?><?php $t=count($data['main/content.hot'])-1 ?><?php $i=0 ?><?php foreach($data['main/content.hot'] as $k => $v): ?><li>
+			<div class="poster"><a href="<?php echo isset($v['link']) ? $v['link'] : "" ?>" target="_blank" title="<?php echo isset($v['name']) ? $v['name'] : "" ?>"><img src="<?php echo isset($v['pic']) ? $v['pic'] : "" ?>" alt="<?php echo isset($v['name']) ? $v['name'] : "" ?>" /></a></div>
+			<a href="<?php echo isset($v['link']) ? $v['link'] : "" ?>" target="_blank" title="<?php echo isset($v['name']) ? $v['name'] : "" ?>"><?php echo isset($v['name']) ? $v['name'] : "" ?></a>
+		</li><?php $i=$i+1 ?><?php endforeach; ?><?php else: ?><li><?php echo $data['main/content.hot'] ?><div class="poster"><a href="<?php echo isset($v['link']) ? $v['link'] : "" ?>" target="_blank" title="<?php echo isset($v['name']) ? $v['name'] : "" ?>"><img src="<?php echo isset($v['pic']) ? $v['pic'] : "" ?>" alt="<?php echo isset($v['name']) ? $v['name'] : "" ?>" /></a></div><?php echo $data['main/content.hot'] ?><a href="<?php echo isset($v['link']) ? $v['link'] : "" ?>" target="_blank" title="<?php echo isset($v['name']) ? $v['name'] : "" ?>"><?php echo isset($v['name']) ? $v['name'] : "" ?></a>
+		</li><?php endif; ?>
+		
+		
+		
 	</ul>
 
-	<div class="ad-swiper ad wrapper">
+	<div class="ad-swiper ad wrapper" style="<?php if(!(Dever::load('main/content.ad?key=news_view_ad&name=资讯详情页广告'))): ?>display:none;<?php endif; ?>">
 		<div class="swiper-container">
 			<div class="swiper-wrapper clearfix">
-				<div class="swiper-slide">
-					<a href="#" target="_blank" title="">
-						<img src="<?php echo Dever::config("host")->images ?>ad.jpg?v=86319426" alt="" title="">
-					</a>
-				</div>
-				<div class="swiper-slide">
-					<a href="#" target="_blank" title="">
-						<img src="<?php echo Dever::config("host")->images ?>ad.jpg?v=86319426" alt="" title="">
+				<?php if(isset($data['main/content.ad|key=news_view_ad&name=资讯详情页广告']) && is_array($data['main/content.ad|key=news_view_ad&name=资讯详情页广告'])): ?><?php $t=count($data['main/content.ad|key=news_view_ad&name=资讯详情页广告'])-1 ?><?php $i=0 ?><?php foreach($data['main/content.ad|key=news_view_ad&name=资讯详情页广告'] as $k => $v): ?><div class="swiper-slide">
+					<a href="<?php echo isset($v['link']) ? $v['link'] : "" ?>" target="_blank" title="<?php echo isset($v['name']) ? $v['name'] : "" ?>">
+						<img src="<?php echo isset($v['pic']) ? $v['pic'] : "" ?>" alt="<?php echo isset($v['name']) ? $v['name'] : "" ?>" title="">
 					</a>
-				</div>
-				<div class="swiper-slide">
-					<a href="#" target="_blank" title="">
-						<img src="<?php echo Dever::config("host")->images ?>ad.jpg?v=86319426" alt="" title="">
-					</a>
-				</div>
+				</div><?php $i=$i+1 ?><?php endforeach; ?><?php else: ?><div class="swiper-slide"><?php echo $data['main/content.ad|key=news_view_ad&name=资讯详情页广告'] ?><a href="<?php echo isset($v['link']) ? $v['link'] : "" ?>" target="_blank" title="<?php echo isset($v['name']) ? $v['name'] : "" ?>"><?php echo $data['main/content.ad|key=news_view_ad&name=资讯详情页广告'] ?>	<img src="<?php echo isset($v['pic']) ? $v['pic'] : "" ?>" alt="<?php echo isset($v['name']) ? $v['name'] : "" ?>" title=""><?php echo $data['main/content.ad|key=news_view_ad&name=资讯详情页广告'] ?></a>
+				</div><?php endif; ?>
+				
+				
 			</div>
 			<div class="pagination"></div>
 		</div>
@@ -198,6 +172,6 @@
 		})
 
 	</script>
-<script type="text/javascript" src="<?php echo Dever::config("host")->js ?>global.js?v=6408e250"></script><script type="text/javascript" src="<?php echo Dever::config("host")->js ?>article.js?v=11102b9f"></script><script src="http://192.168.33.10/dever_package/script/assets/dever/core.js?v=1616339970"></script><script src="http://192.168.33.10/cms/main/assets/xuniren/js/config.js?v=1616339970"></script></body>
+<script type="text/javascript" src="<?php echo Dever::config("host")->js ?>global.js?v=6408e250"></script><script type="text/javascript" src="<?php echo Dever::config("host")->js ?>article.js?v=11102b9f"></script><script src="http://192.168.33.10/dever_package/script/assets/dever/core.js?v=1616381363"></script><script src="http://192.168.33.10/cms/main/assets/xuniren/js/config.js?v=1616381363"></script></body>
 
 </html>

+ 94 - 28
data/compile/cms/main/xuniren/contact.cmp.php

@@ -1,7 +1,10 @@
 <?php $name='contact' ?>
 <?php $title='关于我们' ?>
 <?php $data['main/content.config']=Dever::load('main/content.config') ?>
+<?php $data['main/content.search']=Dever::load('main/content.search') ?>
+<?php $data['main/content.msearch']=Dever::load('main/content.msearch') ?>
 <?php $data['main/content.menu']=Dever::load('main/content.menu') ?>
+<?php $data['main/content.getAbout']=Dever::load('main/content.getAbout') ?>
 <!DOCTYPE html>
 <!--power by dever--><html>
 
@@ -30,8 +33,8 @@
 						<a href="#" class="iconfont icon-search"></a>
 						<div class="search-layer">
 							<div>
-								<input type="text">
-								<a href="#">搜索</a>
+								<input type="text" id="search">
+								<a href="javascript:;" onclick="<?php echo $data['main/content.search'] ?>">搜索</a>
 							</div>
 						</div>
 					</li>
@@ -39,9 +42,9 @@
 						<a href="#" class="iconfont icon-user"></a>
 						<div class="user-layer">
 							<div>
-								<a href="#" class="iconfont icon-weibo"></a>
-								<a href="#" class="iconfont icon-weixin"></a>
-								<a href="#" class="iconfont icon-link"></a>
+								<a href="<?php  echo Dever::load("main/content.config#weibo") ?>" class="iconfont icon-weibo"></a>
+								<a href="#" class="iconfont icon-weixin" data-qrcode="<?php  echo Dever::load("main/content.config#weixin_qrcode") ?>"></a>
+								<a href="<?php  echo Dever::load("main/content.config#contact") ?>" class="iconfont icon-link"></a>
 							</div>
 						</div>
 					</li>
@@ -80,7 +83,7 @@
 				</ul>
 			</div>
 			<div class="m-search-layer">
-				<div><i class="iconfont icon-search"></i><input type="text" placeholder="搜索"></div>
+				<div><i class="iconfont icon-search" onclick="<?php echo $data['main/content.msearch'] ?>"></i><input type="text" placeholder="搜索" id="msearch"></div>
 				<i class="iconfont icon-close"></i>
 			</div>
 		</div>
@@ -92,10 +95,10 @@
 	<div class="wrapper">
 		<div class="form">
 			<label for=""><span>电子邮件<em class="required"></em></span><span><em class="required"></em>必须填写</span></label>
-			<div class="form-item"><input type="text" placeholder="电子邮件"></div>
+			<div class="form-item"><input type="text" placeholder="电子邮件" id="ding_email"></div>
 			<label for=""><span>用户名<em class="required"></em></span></label>
-			<div class="form-item"><input type="text" placeholder="用户名"></div>
-			<a href="javascript:;" class="button"><span>订&nbsp;&nbsp;阅</span></a>
+			<div class="form-item"><input type="text" placeholder="用户名" id="ding_username"></div>
+			<a href="javascript:;" class="button" onclick="ding_submit()"><span>订&nbsp;&nbsp;阅</span></a>
 		</div>
 	</div>
 	<h3 class="common-tit textleft">
@@ -104,39 +107,102 @@
 	<div class="wrapper">
 		<div class="form">
 			<label for=""><span>姓名<em class="required"></em></span><span><em class="required"></em>必须填写</span></label>
-			<div class="form-item"><input type="text" placeholder="电子邮件"></div>
+			<div class="form-item"><input type="text" placeholder="姓名" id="contact_username"></div>
 			<label for=""><span>电话<em class="required"></em></span></label>
-			<div class="form-item"><input type="text" placeholder="+86"></div>
+			<div class="form-item"><input type="text" placeholder="+86" id="contact_mobile"></div>
 			<label for=""><span>电子邮箱<em class="required"></em></span></label>
-			<div class="form-item"><input type="text" placeholder="@"></div>
+			<div class="form-item"><input type="text" placeholder="@" id="contact_email"></div>
 			<label for=""><span>留言信息</span></label>
-			<div class="form-item"><textarea placeholder="说点什么吧" rows="3"></textarea></div>
+			<div class="form-item"><textarea placeholder="说点什么吧" rows="3" id="contact_content"></textarea></div>
 			<label for=""><span>用户需求</span></label>
 			<div class="form-item noborder">
 				<ul>
-					<li><i class="iconfont icon-radiobox-blank"></i>广告</li>
-					<li><i class="iconfont icon-radiobox-blank"></i>投稿</li>
-					<li><i class="iconfont icon-radio-checked-b"></i>合作</li>
+					<li data-value="1" class="set_xuqiu" onclick="set_xuqiu(1)"><i class="iconfont icon-radiobox-blank"></i>广告</li>
+					<li data-value="2" class="set_xuqiu" onclick="set_xuqiu(2)"><i class="iconfont icon-radiobox-blank"></i>投稿</li>
+					<li data-value="3" class="set_xuqiu" onclick="set_xuqiu(3)"><i class="iconfont icon-radio-checked-b"></i>合作</li>
 				</ul>
 			</div>
-			<a href="javascript:;" class="button"><span>提&nbsp;&nbsp;交</span></a>
+			<a href="javascript:;" class="button" onclick="contact_submit()"><span>提&nbsp;&nbsp;交</span></a>
 		</div>
 	</div>
 	<h3 class="common-tit textleft">
 		ABOUT US<br>关于我们
 	</h3>
-	<div class="contact-article wrapper">
-		<p>虽然,目前已经有类似的粘合贴片在这类手术中使用,但是这种贴片的粘合存在一定缺陷,尤其是在处理炎症和疤痕组织的时候。</p> 
-		<p>麻省理工学院的设计解决了这些问题,方法是用一种以水凝胶为基础的粘合剂、一种涂有硅油的材料来防止意外黏附,以及一种具有两离子性质 ( 即带有正负离子的分子链 ) 的弹性体外层来保护贴片不受细菌侵害。</p>	
-		<p>这种设计的结果是新型贴片很容易缠绕在机器人工具上,即便在液体中长时间浸泡,也能很牢固地附着在身体组织上,且不易受到细菌污染。机器臂只需要施加轻微的压力既可以完成粘合。</p>	
-		<p>不过就像很多创新应用一样,这种贴片距离实际应用还有一段时间,不过科学家们设想与手术机器人平台开发者进行合作,未来将有望看到机器人和生物粘合剂在医学界的更多应用。</p>
-		<p>虽然,目前已经有类似的粘合贴片在这类手术中使用,但是这种贴片的粘合存在一定缺陷,尤其是在处理炎症和疤痕组织的时候。</p> 
-		<p>麻省理工学院的设计解决了这些问题,方法是用一种以水凝胶为基础的粘合剂、一种涂有硅油的材料来防止意外黏附,以及一种具有两离子性质 ( 即带有正负离子的分子链 ) 的弹性体外层来保护贴片不受细菌侵害。</p>	
-		<p>这种设计的结果是新型贴片很容易缠绕在机器人工具上,即便在液体中长时间浸泡,也能很牢固地附着在身体组织上,且不易受到细菌污染。机器臂只需要施加轻微的压力既可以完成粘合。</p>	
-		<p>不过就像很多创新应用一样,这种贴片距离实际应用还有一段时间,不过科学家们设想与手术机器人平台开发者进行合作,未来将有望看到机器人和生物粘合剂在医学界的更多应用。</p>
-	</div>
+	<div class="contact-article wrapper"><?php echo $data['main/content.getAbout']['content'] ?></div>
 
 	<script src="<?php echo Dever::config("host")->static ?>jquery.js"></script>
-<script type="text/javascript" src="<?php echo Dever::config("host")->js ?>global.js?v=6408e250"></script><script type="text/javascript" src="<?php echo Dever::config("host")->js ?>contact.js?v=11102b9f"></script><script src="http://192.168.33.10/dever_package/script/assets/dever/core.js?v=1616339890"></script><script src="http://192.168.33.10/cms/main/assets/xuniren/js/config.js?v=1616339890"></script></body>
+<script type="text/javascript" src="<?php echo Dever::config("host")->js ?>global.js?v=6408e250"></script><script type="text/javascript" src="<?php echo Dever::config("host")->js ?>contact.js?v=11102b9f"></script><script src="http://192.168.33.10/dever_package/script/assets/dever/core.js?v=1616391307"></script></body>
+
+<script>
+var xuqiu = 3;
+function set_xuqiu(i)
+{
+	$('.set_xuqiu').each(function() {
+		var value = $(this).attr('data-value');
+		var self = $(this).find('i');
+		self.removeClass('icon-radio-checked-b').addClass('icon-radiobox-blank');
+		if (value == i) {
+			self.addClass('icon-radio-checked-b').removeClass('icon-radiobox-blank');
+			xuqiu = value;
+		}
+	})
+}
+function ding_submit()
+{
+	var send = {};
+	send.username = $('#ding_username').val();
+	send.email = $('#ding_email').val();
+
+	if (!send.username) {
+		alert('请填写用户名');
+		return;
+	}
+
+	if (!send.email) {
+		alert('请填写电子信箱');
+		return;
+	}
+	$.getJSON(config.host + 'content.ding_add?json=1', send, function(t) {
+		if (t.status == 2) {
+			alert(t.msg);
+		} else {
+			alert('录入成功');
+			location.reload();
+		}
+	})
+}
+
+function contact_submit()
+{
+	var send = {};
+	send.username = $('#contact_username').val();
+	send.mobile = $('#contact_mobile').val();
+	send.email = $('#contact_email').val();
+	send.content = $('#contact_content').val();
+	send.xuqiu = xuqiu;
+
+	if (!send.username) {
+		alert('请填写姓名');
+		return;
+	}
+
+	if (!send.mobile) {
+		alert('请填写联系电话');
+		return;
+	}
 
+	if (!send.email) {
+		alert('请填写电子信箱');
+		return;
+	}
+	$.getJSON(config.host + 'content.contact_add?json=1', send, function(t) {
+		if (t.status == 2) {
+			alert(t.msg);
+		} else {
+			alert('录入成功');
+			location.reload();
+		}
+	})
+}
+</script>
 </html>

+ 9 - 7
data/compile/cms/main/xuniren/feature.cmp.php

@@ -1,6 +1,8 @@
 <?php $name='feature' ?>
 <?php $title='专题' ?>
 <?php $data['main/content.config']=Dever::load('main/content.config') ?>
+<?php $data['main/content.search']=Dever::load('main/content.search') ?>
+<?php $data['main/content.msearch']=Dever::load('main/content.msearch') ?>
 <?php $data['main/content.menu']=Dever::load('main/content.menu') ?>
 <?php $data['main/content.home_feature']=Dever::load('main/content.home_feature') ?>
 <?php $data['main/content.ad|key=feature_ad&name=专题广告']=Dever::load('main/content.ad', array (
@@ -41,8 +43,8 @@
 						<a href="#" class="iconfont icon-search"></a>
 						<div class="search-layer">
 							<div>
-								<input type="text">
-								<a href="#">搜索</a>
+								<input type="text" id="search">
+								<a href="javascript:;" onclick="<?php echo $data['main/content.search'] ?>">搜索</a>
 							</div>
 						</div>
 					</li>
@@ -50,9 +52,9 @@
 						<a href="#" class="iconfont icon-user"></a>
 						<div class="user-layer">
 							<div>
-								<a href="#" class="iconfont icon-weibo"></a>
-								<a href="#" class="iconfont icon-weixin"></a>
-								<a href="#" class="iconfont icon-link"></a>
+								<a href="<?php  echo Dever::load("main/content.config#weibo") ?>" class="iconfont icon-weibo"></a>
+								<a href="#" class="iconfont icon-weixin" data-qrcode="<?php  echo Dever::load("main/content.config#weixin_qrcode") ?>"></a>
+								<a href="<?php  echo Dever::load("main/content.config#contact") ?>" class="iconfont icon-link"></a>
 							</div>
 						</div>
 					</li>
@@ -91,7 +93,7 @@
 				</ul>
 			</div>
 			<div class="m-search-layer">
-				<div><i class="iconfont icon-search"></i><input type="text" placeholder="搜索"></div>
+				<div><i class="iconfont icon-search" onclick="<?php echo $data['main/content.msearch'] ?>"></i><input type="text" placeholder="搜索" id="msearch"></div>
 				<i class="iconfont icon-close"></i>
 			</div>
 		</div>
@@ -158,7 +160,7 @@
 	</div>
 
 	<script src="<?php echo Dever::config("host")->static ?>jquery.js"></script> 
-<script type="text/javascript" src="<?php echo Dever::config("host")->js ?>global.js?v=6408e250"></script><script type="text/javascript" src="<?php echo Dever::config("host")->js ?>feature.js?v=11102b9f"></script><div id="page" dever-page-link="<?php  echo Dever::pageInfo()["link"] ?>" dever-page-list=".news-module"></div><script src="http://192.168.33.10/dever_package/script/assets/dever/core.js?v=1616339099"></script><script src="http://192.168.33.10/cms/main/assets/xuniren/js/config.js?v=1616339099"></script></body>
+<script type="text/javascript" src="<?php echo Dever::config("host")->js ?>global.js?v=6408e250"></script><script type="text/javascript" src="<?php echo Dever::config("host")->js ?>feature.js?v=11102b9f"></script><div id="page" dever-page-link="<?php  echo Dever::pageInfo()["link"] ?>" dever-page-list=".news-module"></div><script src="http://192.168.33.10/dever_package/script/assets/dever/core.js?v=1616387072"></script><script src="http://192.168.33.10/cms/main/assets/xuniren/js/config.js?v=1616387072"></script></body>
 <script src="<?php echo Dever::config("host")->static ?>swiper.min.js"></script>
 <script>
 

+ 8 - 7
data/compile/cms/main/xuniren/index.cmp.php

@@ -1,5 +1,6 @@
 <?php $name='index' ?>
 <?php $data['main/content.config']=Dever::load('main/content.config') ?>
+<?php $data['main/content.search']=Dever::load('main/content.search') ?>
 <?php $data['main/content.menu']=Dever::load('main/content.menu') ?>
 <?php $data['main/content.focus|key=home_focus&name=首页焦点图']=Dever::load('main/content.focus', array (
   'key' => 'home_focus',
@@ -33,7 +34,7 @@
 	<meta name="Description" content="<?php  echo isset($info) ? Dever::load("main/content.config#info") . "," . $info : Dever::load("main/content.config#info") ?>" />
 	<link rel="stylesheet" href="http://at.alicdn.com/t/font_2408372_isweoh63009.css">
 	<link rel="stylesheet" href="<?php echo Dever::config("host")->static ?>swiper.min.css" />
-<link href="http://192.168.33.10/cms/main/assets/xuniren/css/global.css?v=1616339069" rel="stylesheet"><link href="http://192.168.33.10/cms/main/assets/xuniren/css/<?php  echo (isset($name) ? $name : "index") ?>.css?v=1616339069" rel="stylesheet"><script><?php  echo Dever::script() ?></script></head>
+<link href="http://192.168.33.10/cms/main/assets/xuniren/css/global.css?v=1616386668" rel="stylesheet"><link href="http://192.168.33.10/cms/main/assets/xuniren/css/<?php  echo (isset($name) ? $name : "index") ?>.css?v=1616386668" rel="stylesheet"><script><?php  echo Dever::script() ?></script></head>
 
 <body>
 
@@ -47,8 +48,8 @@
 						<a href="#" class="iconfont icon-search"></a>
 						<div class="search-layer">
 							<div>
-								<input type="text">
-								<a href="#">搜索</a>
+								<input type="text" id="search">
+								<a href="javascript:;" onclick="<?php echo $data['main/content.search'] ?>">搜索</a>
 							</div>
 						</div>
 					</li>
@@ -56,9 +57,9 @@
 						<a href="#" class="iconfont icon-user"></a>
 						<div class="user-layer">
 							<div>
-								<a href="#" class="iconfont icon-weibo"></a>
-								<a href="#" class="iconfont icon-weixin"></a>
-								<a href="#" class="iconfont icon-link"></a>
+								<a href="<?php  echo Dever::load("main/content.config#weibo") ?>" class="iconfont icon-weibo"></a>
+								<a href="#" class="iconfont icon-weixin" data-qrcode="<?php  echo Dever::load("main/content.config#weixin_qrcode") ?>"></a>
+								<a href="<?php  echo Dever::load("main/content.config#contact") ?>" class="iconfont icon-link"></a>
 							</div>
 						</div>
 					</li>
@@ -292,7 +293,7 @@
 
 	<script src="<?php echo Dever::config("host")->static ?>jquery.js"></script> 
 	<script type="text/javascript" src="//vm.gtimg.cn/tencentvideo/txp/js/iframe/api.js"></script>
-<script type="text/javascript" src="http://192.168.33.10/cms/main/assets/xuniren/js/global.js?v=1616339069"></script><script type="text/javascript" src="http://192.168.33.10/cms/main/assets/xuniren/js/<?php  echo (isset($name) ? $name : "index") ?>.js?v=1616339069"></script><script src="http://192.168.33.10/dever_package/script/assets/dever/core.js?v=1616339069"></script><script src="http://192.168.33.10/cms/main/assets/xuniren/js/config.js?v=1616339069"></script></body>
+<script type="text/javascript" src="http://192.168.33.10/cms/main/assets/xuniren/js/global.js?v=1616386668"></script><script type="text/javascript" src="http://192.168.33.10/cms/main/assets/xuniren/js/<?php  echo (isset($name) ? $name : "index") ?>.js?v=1616386668"></script><script src="http://192.168.33.10/dever_package/script/assets/dever/core.js?v=1616386668"></script><script src="http://192.168.33.10/cms/main/assets/xuniren/js/config.js?v=1616386668"></script></body>
 <script src="<?php echo Dever::config("host")->static ?>swiper.min.js"></script>
 <script>
 	new Swiper('.index-slide .swiper-container', {

+ 9 - 7
data/compile/cms/main/xuniren/news.cmp.php

@@ -1,6 +1,8 @@
 <?php $name='news' ?>
 <?php $title='资讯' ?>
 <?php $data['main/content.config']=Dever::load('main/content.config') ?>
+<?php $data['main/content.search']=Dever::load('main/content.search') ?>
+<?php $data['main/content.msearch']=Dever::load('main/content.msearch') ?>
 <?php $data['main/content.menu']=Dever::load('main/content.menu') ?>
 <?php $data['main/content.focus|key=news_focus&name=资讯焦点图']=Dever::load('main/content.focus', array (
   'key' => 'news_focus',
@@ -45,8 +47,8 @@
 						<a href="#" class="iconfont icon-search"></a>
 						<div class="search-layer">
 							<div>
-								<input type="text">
-								<a href="#">搜索</a>
+								<input type="text" id="search">
+								<a href="javascript:;" onclick="<?php echo $data['main/content.search'] ?>">搜索</a>
 							</div>
 						</div>
 					</li>
@@ -54,9 +56,9 @@
 						<a href="#" class="iconfont icon-user"></a>
 						<div class="user-layer">
 							<div>
-								<a href="#" class="iconfont icon-weibo"></a>
-								<a href="#" class="iconfont icon-weixin"></a>
-								<a href="#" class="iconfont icon-link"></a>
+								<a href="<?php  echo Dever::load("main/content.config#weibo") ?>" class="iconfont icon-weibo"></a>
+								<a href="#" class="iconfont icon-weixin" data-qrcode="<?php  echo Dever::load("main/content.config#weixin_qrcode") ?>"></a>
+								<a href="<?php  echo Dever::load("main/content.config#contact") ?>" class="iconfont icon-link"></a>
 							</div>
 						</div>
 					</li>
@@ -95,7 +97,7 @@
 				</ul>
 			</div>
 			<div class="m-search-layer">
-				<div><i class="iconfont icon-search"></i><input type="text" placeholder="搜索"></div>
+				<div><i class="iconfont icon-search" onclick="<?php echo $data['main/content.msearch'] ?>"></i><input type="text" placeholder="搜索" id="msearch"></div>
 				<i class="iconfont icon-close"></i>
 			</div>
 		</div>
@@ -154,7 +156,7 @@
 		<a href="#" class="iconfont icon-close"></a>
 	</div>
 	<script src="<?php echo Dever::config("host")->static ?>jquery.js"></script> 
-<script type="text/javascript" src="<?php echo Dever::config("host")->js ?>global.js?v=6408e250"></script><script type="text/javascript" src="<?php echo Dever::config("host")->js ?>news.js?v=11102b9f"></script><div id="page" dever-page-link="<?php  echo Dever::pageInfo()["link"] ?>" dever-page-list=".news-module"></div><script src="http://192.168.33.10/dever_package/script/assets/dever/core.js?v=1616338714"></script><script src="http://192.168.33.10/cms/main/assets/xuniren/js/config.js?v=1616338714"></script></body>
+<script type="text/javascript" src="<?php echo Dever::config("host")->js ?>global.js?v=6408e250"></script><script type="text/javascript" src="<?php echo Dever::config("host")->js ?>news.js?v=11102b9f"></script><div id="page" dever-page-link="<?php  echo Dever::pageInfo()["link"] ?>" dever-page-list=".news-module"></div><script src="http://192.168.33.10/dever_package/script/assets/dever/core.js?v=1616387074"></script><script src="http://192.168.33.10/cms/main/assets/xuniren/js/config.js?v=1616387074"></script></body>
 <script src="<?php echo Dever::config("host")->static ?>swiper.min.js"></script>
 <script>
 	new Swiper('.index-slide .swiper-container', {

+ 9 - 7
data/compile/cms/main/xuniren/video.cmp.php

@@ -1,6 +1,8 @@
 <?php $name='video' ?>
 <?php $title='视频' ?>
 <?php $data['main/content.config']=Dever::load('main/content.config') ?>
+<?php $data['main/content.search']=Dever::load('main/content.search') ?>
+<?php $data['main/content.msearch']=Dever::load('main/content.msearch') ?>
 <?php $data['main/content.menu']=Dever::load('main/content.menu') ?>
 <?php $data['main/content.home_video_first']=Dever::load('main/content.home_video_first') ?>
 <?php $data['main/content.news|type=3']=Dever::load('main/content.news', array (
@@ -36,8 +38,8 @@
 						<a href="#" class="iconfont icon-search"></a>
 						<div class="search-layer">
 							<div>
-								<input type="text">
-								<a href="#">搜索</a>
+								<input type="text" id="search">
+								<a href="javascript:;" onclick="<?php echo $data['main/content.search'] ?>">搜索</a>
 							</div>
 						</div>
 					</li>
@@ -45,9 +47,9 @@
 						<a href="#" class="iconfont icon-user"></a>
 						<div class="user-layer">
 							<div>
-								<a href="#" class="iconfont icon-weibo"></a>
-								<a href="#" class="iconfont icon-weixin"></a>
-								<a href="#" class="iconfont icon-link"></a>
+								<a href="<?php  echo Dever::load("main/content.config#weibo") ?>" class="iconfont icon-weibo"></a>
+								<a href="#" class="iconfont icon-weixin" data-qrcode="<?php  echo Dever::load("main/content.config#weixin_qrcode") ?>"></a>
+								<a href="<?php  echo Dever::load("main/content.config#contact") ?>" class="iconfont icon-link"></a>
 							</div>
 						</div>
 					</li>
@@ -86,7 +88,7 @@
 				</ul>
 			</div>
 			<div class="m-search-layer">
-				<div><i class="iconfont icon-search"></i><input type="text" placeholder="搜索"></div>
+				<div><i class="iconfont icon-search" onclick="<?php echo $data['main/content.msearch'] ?>"></i><input type="text" placeholder="搜索" id="msearch"></div>
 				<i class="iconfont icon-close"></i>
 			</div>
 		</div>
@@ -168,7 +170,7 @@
 	<script src="<?php echo Dever::config("host")->static ?>jquery.js"></script> 
 	<script type="text/javascript" src="//vm.gtimg.cn/tencentvideo/txp/js/iframe/api.js"></script>
 	<script src="<?php echo Dever::config("host")->static ?>jquery.js"></script> 
-<script type="text/javascript" src="<?php echo Dever::config("host")->js ?>global.js?v=6408e250"></script><script type="text/javascript" src="<?php echo Dever::config("host")->js ?>video.js?v=11102b9f"></script><div id="page" dever-page-link="<?php  echo Dever::pageInfo()["link"] ?>" dever-page-list=".news-module"></div><script src="http://192.168.33.10/dever_package/script/assets/dever/core.js?v=1616339635"></script><script src="http://192.168.33.10/cms/main/assets/xuniren/js/config.js?v=1616339635"></script></body>
+<script type="text/javascript" src="<?php echo Dever::config("host")->js ?>global.js?v=6408e250"></script><script type="text/javascript" src="<?php echo Dever::config("host")->js ?>video.js?v=11102b9f"></script><div id="page" dever-page-link="<?php  echo Dever::pageInfo()["link"] ?>" dever-page-list=".news-module"></div><script src="http://192.168.33.10/dever_package/script/assets/dever/core.js?v=1616387062"></script><script src="http://192.168.33.10/cms/main/assets/xuniren/js/config.js?v=1616387062"></script></body>
 <script src="<?php echo Dever::config("host")->static ?>swiper.min.js"></script>
 <script src="<?php echo Dever::config("host")->static ?>index.js"></script>
 </html>

+ 9 - 8
data/compile/cms/main/xuniren/xnr.cmp.php

@@ -1,6 +1,7 @@
 <?php $name='xnr' ?>
 <?php $title='虚拟人' ?>
 <?php $data['main/content.config']=Dever::load('main/content.config') ?>
+<?php $data['main/content.search']=Dever::load('main/content.search') ?>
 <?php $data['main/content.menu']=Dever::load('main/content.menu') ?>
 <!DOCTYPE html>
 <!--power by dever--><html>
@@ -32,8 +33,8 @@
 						<a href="#" class="iconfont icon-search"></a>
 						<div class="search-layer">
 							<div>
-								<input type="text">
-								<a href="#">搜索</a>
+								<input type="text" id="search">
+								<a href="javascript:;" onclick="<?php echo $data['main/content.search'] ?>">搜索</a>
 							</div>
 						</div>
 					</li>
@@ -41,9 +42,9 @@
 						<a href="#" class="iconfont icon-user"></a>
 						<div class="user-layer">
 							<div>
-								<a href="#" class="iconfont icon-weibo"></a>
-								<a href="#" class="iconfont icon-weixin"></a>
-								<a href="#" class="iconfont icon-link"></a>
+								<a href="<?php  echo Dever::load("main/content.config#weibo") ?>" class="iconfont icon-weibo"></a>
+								<a href="#" class="iconfont icon-weixin" data-qrcode="<?php  echo Dever::load("main/content.config#weixin_qrcode") ?>"></a>
+								<a href="<?php  echo Dever::load("main/content.config#contact") ?>" class="iconfont icon-link"></a>
 							</div>
 						</div>
 					</li>
@@ -91,14 +92,14 @@
 	<div class="xnr-wrapper wrapper">
 		<div class="tabs">
 			<div class="tab active">
-				<img src="<?php echo Dever::config("host")->images ?>tmp2.jpg?v=380c098e" alt="">
+				<img src="<?php echo $data['main/content.config']['xnr_pic'] ?>" alt="">
 				<span>
 					<b>ALL</b><em>虚拟人</em>
 				</span>
 				<i></i>
 			</div>
 			<div class="tab">
-				<img src="<?php echo Dever::config("host")->images ?>tmp2.jpg?v=380c098e" alt="">
+				<img src="<?php echo $data['main/content.config']['zwz_pic'] ?>" alt="">
 				<span>
 					<b>ALL</b><em>造物主</em>
 				</span>
@@ -125,6 +126,6 @@
 	</div>
 
 	<script src="<?php echo Dever::config("host")->static ?>jquery.js"></script> 
-<script type="text/javascript" src="<?php echo Dever::config("host")->js ?>global.js?v=6408e250"></script><script type="text/javascript" src="<?php echo Dever::config("host")->js ?>xnr.js?v=11102b9f"></script><script src="http://192.168.33.10/dever_package/script/assets/dever/core.js?v=1616339918"></script><script src="http://192.168.33.10/cms/main/assets/xuniren/js/config.js?v=1616339918"></script></body>
+<script type="text/javascript" src="<?php echo Dever::config("host")->js ?>global.js?v=6408e250"></script><script type="text/javascript" src="<?php echo Dever::config("host")->js ?>xnr.js?v=11102b9f"></script><script src="http://192.168.33.10/dever_package/script/assets/dever/core.js?v=1616386682"></script><script src="http://192.168.33.10/cms/main/assets/xuniren/js/config.js?v=1616386682"></script></body>
 
 </html>

+ 83 - 11
main/assets/xuniren/contact.html

@@ -88,10 +88,10 @@
 	<div class="wrapper">
 		<div class="form">
 			<label for=""><span>电子邮件<em class="required"></em></span><span><em class="required"></em>必须填写</span></label>
-			<div class="form-item"><input type="text" placeholder="电子邮件"></div>
+			<div class="form-item"><input type="text" placeholder="电子邮件" id="ding_email"></div>
 			<label for=""><span>用户名<em class="required"></em></span></label>
-			<div class="form-item"><input type="text" placeholder="用户名"></div>
-			<a href="javascript:;" class="button"><span>&nbsp;&nbsp;</span></a>
+			<div class="form-item"><input type="text" placeholder="用户名" id="ding_username"></div>
+			<a href="javascript:;" class="button" onclick="ding_submit()"><span>&nbsp;&nbsp;</span></a>
 		</div>
 	</div>
 	<h3 class="common-tit textleft">
@@ -100,22 +100,22 @@
 	<div class="wrapper">
 		<div class="form">
 			<label for=""><span>姓名<em class="required"></em></span><span><em class="required"></em>必须填写</span></label>
-			<div class="form-item"><input type="text" placeholder="电子邮件"></div>
+			<div class="form-item"><input type="text" placeholder="姓名" id="contact_username"></div>
 			<label for=""><span>电话<em class="required"></em></span></label>
-			<div class="form-item"><input type="text" placeholder="+86"></div>
+			<div class="form-item"><input type="text" placeholder="+86" id="contact_mobile"></div>
 			<label for=""><span>电子邮箱<em class="required"></em></span></label>
-			<div class="form-item"><input type="text" placeholder="@"></div>
+			<div class="form-item"><input type="text" placeholder="@" id="contact_email"></div>
 			<label for=""><span>留言信息</span></label>
-			<div class="form-item"><textarea placeholder="说点什么吧" rows="3"></textarea></div>
+			<div class="form-item"><textarea placeholder="说点什么吧" rows="3" id="contact_content"></textarea></div>
 			<label for=""><span>用户需求</span></label>
 			<div class="form-item noborder">
 				<ul>
-					<li><i class="iconfont icon-radiobox-blank"></i>广告</li>
-					<li><i class="iconfont icon-radiobox-blank"></i>投稿</li>
-					<li><i class="iconfont icon-radio-checked-b"></i>合作</li>
+					<li data-value="1" class="set_xuqiu" onclick="set_xuqiu(1)"><i class="iconfont icon-radiobox-blank"></i>广告</li>
+					<li data-value="2" class="set_xuqiu" onclick="set_xuqiu(2)"><i class="iconfont icon-radiobox-blank"></i>投稿</li>
+					<li data-value="3" class="set_xuqiu" onclick="set_xuqiu(3)"><i class="iconfont icon-radio-checked-b"></i>合作</li>
 				</ul>
 			</div>
-			<a href="javascript:;" class="button"><span>&nbsp;&nbsp;</span></a>
+			<a href="javascript:;" class="button" onclick="contact_submit()"><span>&nbsp;&nbsp;</span></a>
 		</div>
 	</div>
 	<h3 class="common-tit textleft">
@@ -135,4 +135,76 @@
 	<script src="./static/jquery.js"></script>
 <script type="text/javascript" src="js/global.js?v=6408e250"></script><script type="text/javascript" src="js/contact.js?v=11102b9f"></script></body>
 
+<script>
+var xuqiu = 3;
+function set_xuqiu(i)
+{
+	$('.set_xuqiu').each(function() {
+		var value = $(this).attr('data-value');
+		var self = $(this).find('i');
+		self.removeClass('icon-radio-checked-b').addClass('icon-radiobox-blank');
+		if (value == i) {
+			self.addClass('icon-radio-checked-b').removeClass('icon-radiobox-blank');
+			xuqiu = value;
+		}
+	})
+}
+function ding_submit()
+{
+	var send = {};
+	send.username = $('#ding_username').val();
+	send.email = $('#ding_email').val();
+
+	if (!send.username) {
+		alert('请填写用户名');
+		return;
+	}
+
+	if (!send.email) {
+		alert('请填写电子信箱');
+		return;
+	}
+	$.getJSON(config.host + 'content.ding_add?json=1', send, function(t) {
+		if (t.status == 2) {
+			alert(t.msg);
+		} else {
+			alert('录入成功');
+			location.reload();
+		}
+	})
+}
+
+function contact_submit()
+{
+	var send = {};
+	send.username = $('#contact_username').val();
+	send.mobile = $('#contact_mobile').val();
+	send.email = $('#contact_email').val();
+	send.content = $('#contact_content').val();
+	send.xuqiu = xuqiu;
+
+	if (!send.username) {
+		alert('请填写姓名');
+		return;
+	}
+
+	if (!send.mobile) {
+		alert('请填写联系电话');
+		return;
+	}
+
+	if (!send.email) {
+		alert('请填写电子信箱');
+		return;
+	}
+	$.getJSON(config.host + 'content.contact_add?json=1', send, function(t) {
+		if (t.status == 2) {
+			alert(t.msg);
+		} else {
+			alert('录入成功');
+			location.reload();
+		}
+	})
+}
+</script>
 </html>

+ 193 - 0
main/assets/xuniren/search.html

@@ -0,0 +1,193 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+	<meta charset="utf-8">
+	<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
+	<meta content="yes" name="apple-mobile-web-app-capable">
+	<meta content="black" name="apple-mobile-web-app-status-bar-style">
+	<meta content="telephone=no" name="format-detection">
+
+	<title>首页</title>
+
+	<meta name="Keywords" content="" />
+	<meta name="Description" content="" />
+	<link rel="stylesheet" href="http://at.alicdn.com/t/font_2408372_isweoh63009.css">
+	<link rel="stylesheet" href="./static/swiper.min.css" />
+<link href="css/global.css?v=6cbea63d" rel="stylesheet"><link href="css/news.css?v=9c7feff1" rel="stylesheet"></head>
+
+<body>
+<!-- <body class="night-skin"> -->
+	<header>
+		<div class="wrapper">
+			<div class="logo-area clearfix">
+				<a class="logo"><img src="xxxHTMLLINKxxx0.57585274345857050.27429596224725517xxx" alt="logo"></a>
+				<ul class="menu">
+					<li class="pc-menu"><a href="javascript:;" id="tonight" class="iconfont icon-yueliang"></a></li>
+					<li class="pc-menu">
+						<a href="#" class="iconfont icon-search"></a>
+						<div class="search-layer">
+							<div>
+								<input type="text">
+								<a href="#">搜索</a>
+							</div>
+						</div>
+					</li>
+					<li class="pc-menu">
+						<a href="#" class="iconfont icon-user"></a>
+						<div class="user-layer">
+							<div>
+								<a href="#" class="iconfont icon-weibo"></a>
+								<a href="#" class="iconfont icon-weixin"></a>
+								<a href="#" class="iconfont icon-link"></a>
+							</div>
+						</div>
+					</li>
+					<li class="m-menu">
+						<a href="#" class="iconfont icon-search"></a>
+					</li>
+					<li class="m-menu">
+						<a href="#" class="iconfont icon-menu"></a>
+						<div class="menu-layer">
+							<ul>
+								<li class="active"><a href="index.html">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></li>
+								<li><a href="news.html">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></li>
+								<li><a href="xnr.html">&nbsp;&nbsp;</a></li>
+								<li><a href="feature.html">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></li>
+								<li><a href="video.html">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></li>
+								<li><a href="activity.html">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></li>
+								<li><a href="contact.html">关于我们</a></li>
+							</ul>
+							<div class="share">
+								<a href="#" class="iconfont icon-weibo"></a>
+								<a href="#" class="iconfont icon-weixin"></a>
+							</div>
+						</div>
+					</li>
+				</ul>
+			</div>
+			<div class="nav-wrapper">
+				<ul class="tnav">
+					<li class="active"><a href="index.html">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></li>
+					<li><a href="news.html">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></li>
+					<li><a href="xnr.html">&nbsp;&nbsp;</a></li>
+					<li><a href="feature.html">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></li>
+					<li><a href="video.html">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></li>
+					<li><a href="activity.html">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></li>
+					<li><a href="contact.html">关于我们</a></li>
+				</ul>
+			</div>
+			<div class="m-search-layer">
+				<div><i class="iconfont icon-search"></i><input type="text" placeholder="搜索"></div>
+				<i class="iconfont icon-close"></i>
+			</div>
+		</div>
+	</header>
+	<!-- banner swiper -->
+	<div class="index-slide">
+		<div class="swiper-container">
+			<div class="swiper-wrapper clearfix">
+				<div class="swiper-slide">
+					<a href="article.html" target="_blank" title="">
+						<img src="images/banner.jpg?v=7bbe3c38" alt="" title="">
+						<p><span>MIT研发新型医用贴片<br />可帮助手术机器人修复人体内损伤</span></p>
+					</a>
+				</div>
+				<div class="swiper-slide">
+					<a href="article.html" target="_blank" title="">
+						<img src="images/banner.jpg?v=7bbe3c38" alt="" title="">
+						<p><span>MIT研发新型医用贴片<br />可帮助手术机器人修复人体内损伤</span></p>
+					</a>
+				</div>
+				<div class="swiper-slide">
+					<a href="article.html" target="_blank" title="">
+						<img src="images/banner.jpg?v=7bbe3c38" alt="" title="">
+						<p><span>MIT研发新型医用贴片<br />可帮助手术机器人修复人体内损伤</span></p>
+					</a>
+				</div>
+			</div>
+			<a href="javascript:;" class="arrow-l"></a><a href="javascript:;" class="arrow-r"></a>
+			<div class="pagination"></div>
+		</div>
+	</div>
+	<!-- end banner swiper -->
+
+	<!-- news -->
+	<div class="news-module wrapper clearfix ">
+		<dl>
+			<dt><a href="#" target="_blank"><img src="images/banner.jpg?v=7bbe3c38" alt="" /></a></dt>
+			<dd>
+				<h3><a href="#" target="_blank">MIT研发新型医用贴片<br/>可帮助手术机器人修复人体内损伤</a></h3>
+				<div>
+					<p>虽然,目前已经有类似的粘合贴片在这类手术中使用,但是这种贴片的粘合存在一定缺陷,尤其是在处理炎症和疤痕组织的时候。</p>
+					<span>Sep 23, 2020 by Liz Gioro</span>
+				</div>
+			</dd>
+		</dl>
+		<dl>
+			<dt><a href="#" target="_blank"><img src="images/banner.jpg?v=7bbe3c38" alt="" /></a></dt>
+			<dd>
+				<h3><a href="#" target="_blank">MIT研发新型医用贴片<br/>可帮助手术机器人修复人体内损伤</a></h3>
+				<div>
+					<p>虽然,目前已经有类似的粘合贴片在这类手术中使用,但是这种贴片的粘合存在一定缺陷,尤其是在处理炎症和疤痕组织的时候。</p>
+					<span>Sep 23, 2020 by Liz Gioro</span>
+				</div>
+			</dd>
+		</dl>
+		<dl class="nobborder">
+			<dt><a href="#" target="_blank"><img src="images/banner.jpg?v=7bbe3c38" alt="" /></a></dt>
+			<dd>
+				<h3><a href="#" target="_blank">MIT研发新型医用贴片<br/>可帮助手术机器人修复人体内损伤</a></h3>
+				<div>
+					<p>虽然,目前已经有类似的粘合贴片在这类手术中使用,但是这种贴片的粘合存在一定缺陷,尤其是在处理炎症和疤痕组织的时候。</p>
+					<span>Sep 23, 2020 by Liz Gioro</span>
+				</div>
+			</dd>
+		</dl>
+		<a class="more" href="#" target="_blank"><span class="a">查看更多</span></a>
+	</div>
+	<!-- end news -->
+
+	<div class="ad-swiper ad wrapper">
+		<div class="swiper-container">
+			<div class="swiper-wrapper clearfix">
+				<div class="swiper-slide">
+					<a href="#" target="_blank" title="">
+						<img src="images/ad.jpg?v=86319426" alt="" title="">
+					</a>
+				</div>
+				<div class="swiper-slide">
+					<a href="#" target="_blank" title="">
+						<img src="images/ad.jpg?v=86319426" alt="" title="">
+					</a>
+				</div>
+				<div class="swiper-slide">
+					<a href="#" target="_blank" title="">
+						<img src="images/ad.jpg?v=86319426" alt="" title="">
+					</a>
+				</div>
+			</div>
+			<div class="pagination"></div>
+		</div>
+		<a href="#" class="iconfont icon-close"></a>
+	</div>
+	<script src="./static/jquery.js"></script> 
+<script type="text/javascript" src="js/global.js?v=6408e250"></script><script type="text/javascript" src="js/news.js?v=11102b9f"></script></body>
+<script src="./static/swiper.min.js"></script>
+<script>
+	new Swiper('.index-slide .swiper-container', {
+		// autoplay: 3000,
+		pagination : '.index-slide .pagination',
+		paginationClickable :true,
+		loop: true
+	})
+
+	new Swiper('.ad-swiper .swiper-container', {
+		autoplay: 3000,
+		// pagination : '.ad-swiper .pagination',
+		paginationClickable :true,
+		loop: true
+	})
+</script>
+
+</html>

+ 35 - 0
main/database/config.php

@@ -75,6 +75,30 @@ return array
 			'place'		=> '150',
 		),
 
+		'xnr_pic'       => array
+        (
+            'type'      => 'varchar-150',
+            'name'      => '虚拟人封面图-图片尺寸822*542px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
+            'default'   => '',
+            'desc'      => '虚拟人封面图',
+            'match'     => 'is_string',
+            'update'    => 'image',
+            'key'       => '1',
+            'place'     => '822*542',
+        ),
+
+        'zwz_pic'       => array
+        (
+            'type'      => 'varchar-150',
+            'name'      => '造物主封面图-图片尺寸822*542px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
+            'default'   => '',
+            'desc'      => '造物主封面图',
+            'match'     => 'is_string',
+            'update'    => 'image',
+            'key'       => '1',
+            'place'     => '822*542',
+        ),
+
 		'weibo'		=> array
 		(
 			'type' 		=> 'varchar-500',
@@ -96,6 +120,17 @@ return array
 			'key' 		=> '1',
 			'place'		=> '150',
 		),
+		/*
+		'email'		=> array
+		(
+			'type' 		=> 'varchar-500',
+			'name' 		=> '联系邮箱',
+			'default' 	=> '',
+			'desc' 		=> '联系邮箱',
+			'match' 	=> 'option',
+			'update'	=> 'text',
+		),
+		*/
 
 		'douyin'		=> array
 		(

+ 139 - 2
main/src/Content.php

@@ -13,6 +13,8 @@ class Content
     {
         $data = Dever::db('main/config')->one();
 
+        $data['contact'] = Dever::url('contact');
+
         return $data;
     }
 
@@ -26,7 +28,7 @@ class Content
             'home' => array
             (
                 'name' => '首&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;页',
-                'active' => false,
+                'active' => $uri == 'search' ? true : false,
             ),
 
             'news' => array
@@ -97,6 +99,31 @@ class Content
         return Dever::load('push/lib/data')->get($key, $name, 5, '1,2,5');
     }
 
+    # 获取热门推荐
+    public function hot()
+    {
+        $type = Dever::input('type');
+        if ($type == 1) {
+            $key = 'news';
+            $name = '资讯';
+        } elseif ($type == 2) {
+            $key = 'feature';
+            $name = '专题';
+        } elseif ($type == 3) {
+            $key = 'video';
+            $name = '视频';
+        } elseif ($type == 4) {
+            $key = 'act';
+            $name = '活动';
+        }
+        $data = Dever::load('push/lib/data')->get($key . '_hot', $name . '详情页热门推荐', 4, '1,3,5', ($type + 2). ',10');
+        if (!$data) {
+            $data = Dever::load('content/lib/news')->getHome($type, 4);
+        }
+
+        return $data;
+    }
+
     # 获取首页资讯
     public function home_news()
     {
@@ -180,9 +207,119 @@ class Content
     public function news()
     {
         $type = Dever::input('type', 1);
-        $name = Dever::input('name');
+        $name = Dever::input('v');
         $data = Dever::load('content/lib/news')->getAll($type, $name);
 
         return $data;
     }
+
+    # 获取资讯详情
+    public function view()
+    {
+        $type = Dever::input('type', 1);
+        $id = Dever::input('id');
+        if (!$id) {
+            Dever::alert('错误的数据id');
+        }
+        $data = Dever::load('content/lib/news')->getInfo($type, $id);
+
+        return $data;
+    }
+
+    # 获取单页内容
+    public function getPage()
+    {
+        $key = Dever::input('key', 1);
+        $where['key'] = $key;
+        $data =  Dever::db('main/page')->one($where);
+
+        return $data;
+    }
+
+    # 获取单页内容
+    public function getAbout()
+    {
+        Dever::setInput('key', 'about');
+        return $this->getPage();
+    }
+
+    # 搜索页面
+    public function search()
+    {
+        $url = Dever::url('search?v=');
+        $html = 'location.href=\''.$url.'\'+$(\'#search\').val()';
+
+        return $html;
+    }
+
+    # 手机搜索页面
+    public function msearch()
+    {
+        $url = Dever::url('search?v=');
+        $html = 'location.href=\''.$url.'\'+$(\'#msearch\').val()';
+
+        return $html;
+    }
+
+    # 获取联系我们的需求分类
+    public function contact_xuqiu()
+    {
+        return Dever::db('act/contact')->config['xuqiu'];
+    }
+
+    # 新增联系我们
+    public function contact_add()
+    {
+        $username = Dever::input('username');
+        $mobile = Dever::input('mobile');
+        $email = Dever::input('email');
+        $content = Dever::input('content');
+        $xuqiu = Dever::input('xuqiu', 3);
+        if (!$username) {
+            Dever::alert('请填写姓名');
+        }
+        if (!$mobile) {
+            Dever::alert('请填写联系电话');
+        }
+        if (!$email) {
+            Dever::alert('请填写电子信箱');
+        }
+        Dever::load('act/lib/contact')->add($username, $mobile, $email, $content, $xuqiu);
+
+        return 'ok';
+    }
+
+    # 新增订阅
+    public function ding_add()
+    {
+        $username = Dever::input('username');
+        $email = Dever::input('email');
+        $qudao = Dever::input('qudao', 1);
+        if (!$username) {
+            Dever::alert('请填写用户名');
+        }
+        if (!$email) {
+            Dever::alert('请填写电子信箱');
+        }
+        Dever::load('act/lib/ding')->add($username, $email, $qudao);
+
+        return 'ok';
+    }
+
+    # 新增分享
+    public function share_add()
+    {
+        $name = Dever::input('name');
+        $link = Dever::input('link');
+        $type = Dever::input('type', 1);
+        if (!$name) {
+            Dever::alert('请填写内容名称');
+        }
+        if (!$link) {
+            Dever::alert('请填写链接');
+        }
+        Dever::load('act/lib/share')->add($name, $link, $type);
+
+        return 'ok';
+    }
 }

+ 1 - 0
main/template/xuniren/activity.php

@@ -39,6 +39,7 @@ $view
         ),
     )
 )
+->fetch('.activity-module@style', 'main/content.news?type=4', 'none')
 
 ->append('body', '<div id="page" dever-page-link="<{Dever::pageInfo()["link"]}>" dever-page-list=".news-module"></div>')
 

+ 60 - 1
main/template/xuniren/article.php

@@ -3,12 +3,71 @@
 $view
 
 ->set('name', 'article')
-->set('title', '资讯内容') 
+->set('title', 'main/content.view#name') 
 
 ->import('inc/head')
 
 ->fetch('body@test', '1')
 
+->fetch('.common-tit span', 'main/content.view#sname')
+->fetch('.common-tit em', 'main/content.view#pdate_string')
+
+->fetch(array('.article-wrapper img@src', 0), 'main/content.view#pic')
+
+->fetch(array('.article-content article', 0), 'main/content.view#content')
+
+# 热门推荐
+->loop
+(
+    '.article-recs li',
+    'main/content.hot',
+    array
+    (
+        'a|0' => array
+        (
+            'href' => '$v.link',
+            'title' => '$v.name',
+            'img' => array 
+	        (
+	            'src' => '$v.pic',
+	            'alt' => '$v.name',
+	        ),
+        ),
+
+        'a|1' => array
+        (
+        	'href' => '$v.link',
+            'title' => '$v.name',
+            'html' => '$v.name',
+        ),
+    )
+)
+
+->fetch('.article-recs@style', 'main/content.hot', 'none')
+
+# 广告
+->loop
+(
+    '.ad-swiper .swiper-slide',
+    'main/content.ad|key=news_view_ad&name=资讯详情页广告',
+    array
+    (
+        'a' => array
+        (
+            'href' => '$v.link',
+            'title' => '$v.name',
+        ),
+
+        'img' => array
+        (
+            'src' => '$v.pic',
+            'alt' => '$v.name',
+        ),
+    )
+)
+
+->fetch('.ad-swiper@style', 'main/content.ad?key=news_view_ad&name=资讯详情页广告', 'none')
+
 ->import('inc/foot')
 
 ->display();  

+ 3 - 1
main/template/xuniren/contact.php

@@ -9,6 +9,8 @@ $view
 
 ->fetch('body@test', '1')
 
+->fetch('.contact-article', 'main/content.getAbout#content')
+
 ->import('inc/foot')
 
-->display();  
+->display();   

+ 1 - 1
main/template/xuniren/inc/foot.php

@@ -3,7 +3,7 @@
 $view
 
 ->append('body',    '<script src="'.Dever::assets('dever/core.js', 'script').'"></script>')
-->append('body',    '<script src="'.Dever::assets('config.js').'"></script>')
+//->append('body',    '<script src="'.Dever::assets('config.js').'"></script>')
 //->append('body',    '<script src="http://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script>')
 
 ;

+ 14 - 0
main/template/xuniren/inc/head.php

@@ -10,6 +10,20 @@ $view
 # 登录
 //->fetch('.menu', 'main/content.user')
 
+# 联系方式
+->fetch('.user-layer .icon-weibo@href', '<{Dever::load("main/content.config#weibo")}>')
+->fetch('.user-layer .icon-weixin@data-qrcode', '<{Dever::load("main/content.config#weixin_qrcode")}>')
+->fetch('.user-layer .icon-weixin@href', '#')
+->fetch('.user-layer .icon-link@href', '<{Dever::load("main/content.config#contact")}>')
+
+# 搜索
+->fetch('.search-layer input@id', 'search')
+->fetch('.search-layer a@href', 'javascript:;')
+->fetch('.search-layer a@onclick', 'main/content.search')
+
+->fetch('.m-search-layer input@id', 'msearch')
+->fetch('.m-search-layer .icon-search@onclick', 'main/content.msearch')
+
 # 菜单
 ->loop
 (

+ 4 - 4
main/template/xuniren/news.php

@@ -11,10 +11,10 @@ $view
 ->fetch(array('script@src', 2),     Dever::assets('global.js'))
 ->fetch(array('script@src', 3),     Dever::assets('<{(isset($name) ? $name : "news")}>.js', 'js'))
 */
+   
+->import('inc/head') 
 
-->import('inc/head')
-
-# 焦点图
+# 焦点图 
 ->loop
 (
     '.index-slide .swiper-slide',
@@ -27,7 +27,7 @@ $view
             'title' => '$v.name',
         ),
 
-        'img' => array
+        'img' => array 
         (
             'src' => '$v.pic',
             'alt' => '$v.name',

+ 77 - 0
main/template/xuniren/search.php

@@ -0,0 +1,77 @@
+<?php
+
+$view
+
+->set('name', 'news')  
+->set('title', '搜索') 
+
+->import('inc/head') 
+
+->fetch('.index-slide@style', 'display:none')
+
+# 广告
+->loop
+(
+    '.ad-swiper .swiper-slide',
+    'main/content.ad|key=search_ad&name=搜索页广告',
+    array
+    (
+        'a' => array
+        (
+            'href' => '$v.link',
+            'title' => '$v.name',
+        ),
+
+        'img' => array
+        (
+            'src' => '$v.pic',
+            'alt' => '$v.name',
+        ),
+    )
+)
+
+->fetch('.ad-swiper@style', 'main/content.ad?key=search_ad&name=搜索页广告', 'none')
+
+->loop
+(
+    '.news-module dl',
+    'main/content.news|type=-1',
+    array
+    (
+        'a|0' => array
+        (
+            'href' => '$v.link',
+            'title' => '$v.name',
+
+            'img' => array
+            (
+                'src' => '$v.pic',
+                'alt' => '$v.name',
+            ),
+        ),
+
+        'a|1' => array
+        (
+            'href' => '$v.link',
+            'title' => '$v.name',
+            'html' => '$v.name ."<br/>". $v.desc',
+        ),
+        
+        'p' => array
+        (
+            'html' => '$v.info',
+        ),
+
+        'span' => array
+        (
+            'html' => '$v.pdate_string',
+        ),
+    )
+)
+
+->append('body', '<div id="page" dever-page-link="<{Dever::pageInfo()["link"]}>" dever-page-list=".news-module"></div>')
+
+
+->import('inc/foot')
+
+->display();  

+ 3 - 0
main/template/xuniren/xnr.php

@@ -9,6 +9,9 @@ $view
 
 ->fetch('body@test', '1')
 
+->fetch(array('.tabs img@src', 0), 'main/content.config#xnr_pic')
+->fetch(array('.tabs img@src', 1), 'main/content.config#zwz_pic')
+
 ->import('inc/foot')
 
 ->display();