qinjie 4 年 前
コミット
13a6c3d176

+ 2 - 2
app/content/database/creater.php

@@ -84,8 +84,8 @@ return array
             'default'   => '',
             'desc'      => '地址',
             'match'     => 'option',
-            'update'    => 'textarea',
-            'list'      => true,
+            //'update'    => 'textarea',
+            //'list'      => true,
         ),
 
         'site'      => array

+ 3 - 3
app/content/database/news.php

@@ -200,7 +200,7 @@ return array
             'default'   => '',
             'desc'      => '分享标题',
             'match'     => 'option',
-            'update'    => 'text',
+            //'update'    => 'text',
         ),
 
         'share_pic'     => array
@@ -210,7 +210,7 @@ return array
             'default'   => '',
             'desc'      => '分享图片',
             'match'     => 'option',
-            'update'    => 'image',
+            //'update'    => 'image',
             'key'       => '1',
             'place'     => '200*200',
             //'upload'  => 'qiniu',
@@ -224,7 +224,7 @@ return array
             'default'   => '',
             'desc'      => '分享内容',
             'match'     => 'option',
-            'update'    => 'textarea',
+            //'update'    => 'textarea',
         ),
 
         'content'       => array

+ 16 - 6
app/content/database/xuniren.php

@@ -232,10 +232,20 @@ return array
             'update'    => 'textarea',
         ),
 
+        'home_info'      => array
+        (
+            'type'      => 'varchar-500',
+            'name'      => '首页简介-不能超过50字',
+            'default'   => '',
+            'desc'      => '首页简介',
+            'match'     => 'option',
+            'update'    => 'textarea',
+        ),
+
         'info'      => array
         (
             'type'      => 'varchar-500',
-            'name'      => '简介',
+            'name'      => '详情页简介-不能超过110字',
             'default'   => '',
             'desc'      => '简介',
             'match'     => 'is_string',
@@ -303,7 +313,7 @@ return array
             'default'   => '',
             'desc'      => '分享标题',
             'match'     => 'option',
-            'update'    => 'text',
+            //'update'    => 'text',
         ),
 
         'share_pic'     => array
@@ -313,7 +323,7 @@ return array
             'default'   => '',
             'desc'      => '分享图片',
             'match'     => 'option',
-            'update'    => 'image',
+            //'update'    => 'image',
             'key'       => '1',
             'place'     => '200*200',
             //'upload'  => 'qiniu',
@@ -327,7 +337,7 @@ return array
             'default'   => '',
             'desc'      => '分享内容',
             'match'     => 'option',
-            'update'    => 'textarea',
+            //'update'    => 'textarea',
         ),
 
         'weibo'     => array
@@ -363,9 +373,9 @@ return array
         'ins'       => array
         (
             'type'      => 'varchar-100',
-            'name'      => 'INS账号',
+            'name'      => 'INS分享内容',
             'default'   => '',
-            'desc'      => 'INS账号',
+            'desc'      => 'INS分享内容',
             'match'     => 'option',
             'update'    => 'text',
         ),

+ 3 - 0
app/content/lib/Xuniren.php

@@ -18,6 +18,9 @@ class Xuniren
             foreach ($data as $k => $v) {
                 $data[$k] = $this->getPic($v);
                 $data[$k]['link'] = Dever::url('main/xnr-detail?id=' . $v['id']);
+                if (!$v['home_info']) {
+                    $data[$k]['home_info'] = Dever::cut($v['info'], 50);
+                }
             }
         }
 

+ 5 - 3
main/assets/xuniren/index.html

@@ -416,11 +416,13 @@
 			</div>
 			<ol>
 				<dt>
-					<h3><a href="http://8.131.66.239/cms/main/?l=article&amp;type=3&amp;id=57"><br>ling</a></h3>
-					<p>今年推出原创国风虚拟KOL“翎-LING”,以超写实的画风和具有中国特色的审美形象在一众虚拟KOL中脱颖而出,目前翎已和VOGUE、特斯拉、奈雪的茶等品牌...</p>
+					<h3>
+						<a href="#">MIT研发新型医用贴片<br />可帮助手术机器人修复人体内损伤</a> 
+					</h3>
+					<p>虽然,目前已经有类似的粘合贴片在这类手术中使用,但是这种贴片的粘合存在一定缺陷,尤其是在处理炎症和疤痕组织的时候。</p>
 				</dt>
 				<dd>
-					<span>Apr 02, 2021 by zoe</span>
+					<span>Sep 23, 2020 by Liz Gioro</span>
 				</dd>
 			</ol>
 		</div>

+ 1 - 1
main/assets/xuniren/search.html

@@ -205,7 +205,7 @@
 		<div class="no-result">
 			暂无数据
 		</div>
-		<a class="more" href="#" target="_blank"><span class="a">查看更多</span></a>
+		<a class="more" href="#"><span class="a">查看更多</span></a>
 	</div>
 	<!-- end news -->
 

+ 5 - 5
main/database/config.php

@@ -161,7 +161,7 @@ return array
 			'default' 	=> '',
 			'desc' 		=> '抖音账号',
 			'match' 	=> 'option',
-			'update'	=> 'text',
+			//'update'	=> 'text',
 		),
 
 		'douyin_qrcode'		=> array
@@ -171,7 +171,7 @@ return array
 			'default' 	=> '',
 			'desc' 		=> '抖音二维码',
 			'match' 	=> 'option',
-			'update'	=> 'image',
+			//'update'	=> 'image',
 			'key' 		=> '1',
 			'place'		=> '150',
 		),
@@ -183,7 +183,7 @@ return array
 			'default' 	=> '',
 			'desc' 		=> 'B站地址',
 			'match' 	=> 'option',
-			'update'	=> 'text',
+			//'update'	=> 'text',
 		),
 
 		'ins'		=> array
@@ -193,7 +193,7 @@ return array
 			'default' 	=> '',
 			'desc' 		=> 'INS账号',
 			'match' 	=> 'option',
-			'update'	=> 'text',
+			//'update'	=> 'text',
 		),
 
 		'ins_link'       => array
@@ -203,7 +203,7 @@ return array
             'default'   => '',
             'desc'      => 'INS链接',
             'match'     => 'option',
-            'update'    => 'text',
+            //'update'    => 'text',
         ),
 		
 		'cdate'		=> array

+ 1 - 1
main/database/page.php

@@ -44,7 +44,7 @@ $config = array
             'default'   => '',
             'desc'      => '标识',
             'match'     => 'is_string',
-            'update'    =>  input('where_id') > 0 ? 'hidden' : 'text',
+            'update'    =>  Dever::input('where_id') > 0 ? 'hidden' : 'text',
             'search'    => 'fulltext',
             'list'      => true,
         ),

+ 0 - 6
main/lib/Core.php

@@ -16,12 +16,6 @@ class Core
 
     public function replacePic($pic, $type = 't1')
     {
-        //$pic = Dever::pic($pic, $type);
-
-        if (strstr($pic, 'http://')) {
-            $pic = str_replace('http://', 'https://', $pic);
-        }
-
         return $pic;
     }
 }

+ 2 - 1
main/src/Content.php

@@ -253,6 +253,7 @@ class Content
 
         if ($data) {
             $data[0]['sname'] = '<a href="'.$data[0]['link'].'">'.$data[0]['sname'].'</a>';
+            $data[0]['info'] = Dever::cut($data[0]['info'], 70);
             return $data[0];
         }
 
@@ -322,7 +323,7 @@ class Content
     # 获取资讯
     public function getNoNews()
     {
-        $pg = input('pg');
+        $pg = Dever::input('pg');
         $data = Dever::load('main/content.news');
         if ($data || $pg > 1) {
             return false;

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

@@ -45,6 +45,28 @@ $view
         
     )
 )
+
+# 广告
+->loop
+(
+    '.ad-swiper .swiper-slide',
+    'main/content.ad|key=act_ad&name=活动广告',
+    array
+    (
+        'a' => array
+        (
+            'href' => '$v.link',
+            'title' => '$v.name',
+        ),
+
+        'img' => array
+        (
+            'src' => '$v.pic',
+            'alt' => '$v.name',
+        ),
+    )
+)
+
 ->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>')

+ 2 - 0
main/template/xuniren/article.php

@@ -20,6 +20,8 @@ $view
 
 ->fetch(array('.article-content .article', 0), 'main/content.view#content')
 
+->fetch(array('.btn-link@data-clipboard-text', 0), 'main/content.view#link')
+
 # 页面上部视频 仅限视频模板
 ->fetch(array('.video-module@style', 0), 'main/content.view_video_1', 'none')
 ->fetch(array('.article-wrapper img@src', 0), 'main/content.view#pic')

+ 21 - 0
main/template/xuniren/contact.php

@@ -11,6 +11,27 @@ $view
 
 ->fetch('.contact-article', 'main/content.getAbout#content')
 
+# 广告
+->loop
+(
+    '.ad-swiper .swiper-slide',
+    'main/content.ad|key=contact_ad&name=联系我们广告',
+    array
+    (
+        'a' => array
+        (
+            'href' => '$v.link',
+            'title' => '$v.name',
+        ),
+
+        'img' => array
+        (
+            'src' => '$v.pic',
+            'alt' => '$v.name',
+        ),
+    )
+)
+
 ->import('inc/foot')
 
 ->display();   

+ 7 - 1
main/template/xuniren/home.php

@@ -138,7 +138,7 @@ $view
 
             'p' => array
             (
-                'html' => '$v.info',
+                'html' => '$v.home_info',
             ),
         ),
 
@@ -198,6 +198,12 @@ $view
 ->fetch('.videoplayer img@src', 'main/content.home_video_first#pic')
 ->fetch(array('.icon-play@data-url', 0), 'main/content.home_video_first#video_link')
 
+->fetch(array('.topic-video h3@html', 0), 'main/content.home_video_first#sname')
+->fetch(array('.topic-video p@html', 0), 'main/content.home_video_first#info')
+->fetch(array('.topic-video span@html', 0), 'main/content.home_video_first#pdate_string')
+
+->fetch('.topic-video@style', 'main/content.home_video_first', 'none')
+
 ->loop
 (
     '.video-module dl',

+ 21 - 0
main/template/xuniren/video.php

@@ -99,6 +99,27 @@ $view
     )
 )
 
+# 广告
+->loop
+(
+    '.ad-swiper .swiper-slide',
+    'main/content.ad|key=video_ad&name=视频广告',
+    array
+    (
+        'a' => array
+        (
+            'href' => '$v.link',
+            'title' => '$v.name',
+        ),
+
+        'img' => array
+        (
+            'src' => '$v.pic',
+            'alt' => '$v.name',
+        ),
+    )
+)
+
 
 ->fetch('.common-pagination', '<{Dever::pageInfo()["html"]}>')
 

+ 5 - 4
main/template/xuniren/xnr-detail.php

@@ -63,10 +63,11 @@ $view
 
 ->fetch('.links@style', 'main/content.getXnrOne_news', 'none')
 
-->fetch('.shares icon-weibo@href', 'main/content.getXnrOne#weibo')
-->fetch('.shares icon-bilibili@href', 'main/content.getXnrOne#bili')
-->fetch('.shares icon-douyin@href', 'main/content.getXnrOne#douyin')
-->fetch('.shares icon-ins@href', 'main/content.getXnrOne#ins')
+->fetch('.shares .icon-weibo@href', 'main/content.getXnrOne#weibo')
+->fetch('.shares .icon-bilibili@href', 'main/content.getXnrOne#bilibili')
+->fetch('.shares .icon-douyin@href', 'main/content.getXnrOne#douyin')
+->fetch('.shares .icon-ins@href', 'main/content.getXnrOne#ins_link')
+->fetch('.shares .ins-layer', 'main/content.getXnrOne#ins')
 
 ->import('inc/foot')