dever 4 سال پیش
والد
کامیت
3c6828c619

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

@@ -68,13 +68,13 @@ return array
         'logo'      => array
         (
             'type'      => 'varchar-150',
-            'name'      => 'logo-图片尺寸290*570px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
+            'name'      => 'logo-图片尺寸900*460px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
             'default'   => '',
             'desc'      => 'logo',
             'match'     => 'is_string',
             'update'    => 'image',
             'key'       => '1',
-            'place'     => '290*570',
+            'place'     => '900*460',
         ),
 
         'address'      => array

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

@@ -429,5 +429,23 @@ return array
             'page' => array(5, 'list'),
             'col' => '*',
         ),
+
+        'getAllVideo' => array
+        (
+            # 匹配的正则或函数 选填项
+            'option' => array
+            (
+                'type' => 'yes',
+                'name' => array('yes', 'like', 'and('),
+                'tag' => array('yes', 'like', 'or)'),
+                'pdate' => array($time, '<='),
+                'status' => 1,
+                'state' => 1,
+            ),
+            'type' => 'all',
+            'order' => array('reorder' => 'desc', 'id' => 'desc'),
+            'page' => array(12, 'list'),
+            'col' => '*',
+        ),
     ),
 );

+ 40 - 0
app/content/database/xuniren.php

@@ -298,6 +298,46 @@ return array
             'update'    => 'textarea',
         ),
 
+        'douyin'        => array
+        (
+            'type'      => 'varchar-600',
+            'name'      => '抖音地址',
+            'default'   => '',
+            'desc'      => '抖音地址',
+            'match'     => 'option',
+            'update'    => 'text',
+        ),
+
+        'bilibili'      => array
+        (
+            'type'      => 'varchar-600',
+            'name'      => 'B站地址',
+            'default'   => '',
+            'desc'      => 'B站地址',
+            'match'     => 'option',
+            'update'    => 'text',
+        ),
+
+        'ins'       => array
+        (
+            'type'      => 'varchar-100',
+            'name'      => 'INS账号',
+            'default'   => '',
+            'desc'      => 'INS账号',
+            'match'     => 'option',
+            'update'    => 'text',
+        ),
+
+        'ins_link'       => array
+        (
+            'type'      => 'varchar-600',
+            'name'      => 'INS链接',
+            'default'   => '',
+            'desc'      => 'INS链接',
+            'match'     => 'option',
+            'update'    => 'text',
+        ),
+
         'beizhu'      => array
         (
             'type'      => 'varchar-500',

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

@@ -40,7 +40,11 @@ class News
             $where['tag'] = $name;
         }
 
-        $data = Dever::db('content/news')->getAll($where);
+        if ($type == 3) {
+            $data = Dever::db('content/news')->getAllVideo($where);
+        } else {
+            $data = Dever::db('content/news')->getAll($where);
+        }
 
         if ($data) {
             foreach ($data as $k => $v) {

+ 9 - 7
app/push/lib/Data.php

@@ -60,12 +60,14 @@ class Data
             $id = $info[$id];
             unset($info[$id]);
             if ($id > 0) {
-                if ($info['type'] >= 3) {
-                    $info['link'] = Dever::url('main/article?type='.($info['type']-2).'&id=' . $id);
-                } elseif ($info['type'] == 1) {
-                    $info['link'] = Dever::url('main/xnr-detail?id=' . $id);
-                } elseif ($info['type'] == 2) {
-                    $info['link'] = Dever::url('main/zwz-detail?id=' . $id);
+                if (!$info['link']) {
+                    if ($info['type'] >= 3) {
+                        $info['link'] = Dever::url('main/article?type='.($info['type']-2).'&id=' . $id);
+                    } elseif ($info['type'] == 1) {
+                        $info['link'] = Dever::url('main/zwz-detail?id=' . $id);
+                    } elseif ($info['type'] == 2) {
+                        $info['link'] = Dever::url('main/xnr-detail?id=' . $id);
+                    }
                 }
 
                 $info['id'] = $id;
@@ -96,7 +98,7 @@ class Data
                     }
 
                     if (isset($data['small_pic']) && $data['small_pic'] && !$info['pic']) {
-                        $info['small_pic'] = $data['small_pic'];
+                        $info['pic'] = $data['small_pic'];
                     }
 
                     if (isset($data['link']) && $data['link'] && !$info['link']) {

+ 24 - 2
main/database/config.php

@@ -66,13 +66,25 @@ return array
 		'logo'		=> array
 		(
 			'type' 		=> 'varchar-150',
-			'name' 		=> '站点logo-图片尺寸170*60px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
+			'name' 		=> '站点logo-图片尺寸530*200px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
 			'default' 	=> '',
 			'desc' 		=> '站点logo',
 			'match' 	=> 'is_string',
 			'update'	=> 'image',
 			'key' 		=> '1',
-			'place'		=> '170*60',
+			'place'		=> '530*200',
+		),
+
+		'logo_black'		=> array
+		(
+			'type' 		=> 'varchar-150',
+			'name' 		=> '站点黑夜logo-图片尺寸530*200px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
+			'default' 	=> '',
+			'desc' 		=> '站点logo',
+			'match' 	=> 'is_string',
+			'update'	=> 'image',
+			'key' 		=> '1',
+			'place'		=> '530*200',
 		),
 
 		'beian'		=> array
@@ -183,6 +195,16 @@ return array
 			'match' 	=> 'option',
 			'update'	=> 'text',
 		),
+
+		'ins_link'       => array
+        (
+            'type'      => 'varchar-600',
+            'name'      => 'INS链接',
+            'default'   => '',
+            'desc'      => 'INS链接',
+            'match'     => 'option',
+            'update'    => 'text',
+        ),
 		
 		'cdate'		=> array
 		(

+ 27 - 4
main/src/Content.php

@@ -24,6 +24,7 @@ class Content
     {
         $title = '';
         $pic = '';
+        $content = '';
 
         $uri = Uri::$value;
 
@@ -32,6 +33,19 @@ class Content
         if ($id) {
             if ($uri == 'xnr-detail') {
                 $data = Dever::db('content/xuniren')->one($id);
+                if (isset($data['ins']) && $data['ins']) {
+                    $config['ins'] = $data['ins'];
+                }
+                if (isset($data['ins_link']) && $data['ins_link']) {
+                    $config['ins_link'] = $data['ins_link'];
+                }
+                if (isset($data['douyin']) && $data['douyin']) {
+                    $config['douyin'] = $data['douyin'];
+                }
+                if (isset($data['bilibili']) && $data['bilibili']) {
+                    $config['bilibili'] = $data['bilibili'];
+                }
+                
             } elseif ($uri == 'zwz-detail') {
                 $data = Dever::db('content/creater')->one($id);
                 $data['pic'] = $data['logo'];
@@ -50,6 +64,13 @@ class Content
             } else {
                 $pic = $data['pic'];
             }
+
+            if (isset($data['share_content']) && $data['share_content']) {
+                $pic = $data['share_content'];
+            } else {
+                $pic = $data['info'];
+            }
+
         } else {
             $title = $config['name'];
             $pic = $config['logo'];
@@ -65,12 +86,14 @@ class Content
             url: "'.$url.'",
             pic: "'.$pic.'",
             ralateUid: "'.$ralateUid.'",
-            appkey: "'.$appkey.'"
+            appkey: "'.$appkey.'",
+            content: "'.$content.'"
         }';
 
 
         $share .= ';config.ins="'.$config['ins'].'"';
-        $share .= ';config.douyin="'.$config['douyin_qrcode'].'"';
+        $share .= ';config.ins_link="'.$config['ins_link'].'"';
+        $share .= ';config.douyin="'.$config['douyin'].'"';
         $share .= ';config.bili="'.$config['bilibili'].'"';
 
         return $share;
@@ -224,7 +247,7 @@ class Content
         //$data = Dever::load('push/lib/data')->get('home_video', '首页视频', 5, '1,2,3,4,5,6,7');
         $data = false;
         if (!$data) {
-            $data = Dever::load('content/lib/news')->getHome(3, 5);
+            $data = Dever::load('content/lib/news')->getHome(3, 3);
         }
 
         if ($data) {
@@ -240,7 +263,7 @@ class Content
         //$data = Dever::load('push/lib/data')->get('home_video', '首页视频', 5, '1,2,3,4,5,6,7');
         $data = false;
         if (!$data) {
-            $data = Dever::load('content/lib/news')->getHome(3, 5);
+            $data = Dever::load('content/lib/news')->getHome(3, 3);
         }
 
         if ($data) {

+ 9 - 6
main/template/xuniren/activity.php

@@ -22,11 +22,6 @@ $view
                 'alt' => '$v.name',
             ),
 
-            'p' => array
-            (
-                'html' => '$v.info',
-            ),
-
             'span' => array
             (
                 'html' => '$v.pdate_s',
@@ -34,7 +29,15 @@ $view
 
             'href' => '$v.link',
             'title' => '$v.name',
-            'h3' => '$v.sname',
+            'div' => array
+            (
+                'h3' => '$v.sname',
+                'p' => array
+                (
+                    'html' => '$v.info',
+                ),
+            ),
+            
         ),
         
     )

+ 11 - 7
main/template/xuniren/feature.php

@@ -33,16 +33,20 @@ $view
             'html' => '$v.name ."<br/>". $v.desc',
         ),
         
-
-        'p' => array
+        'div' => array
         (
-            'html' => '$v.info',
-        ),
+            'p' => array
+            (
+                'html' => '$v.info',
+            ),
 
-        'span' => array
-        (
-            'html' => '$v.pdate_string',
+            'span' => array
+            (
+                'html' => '$v.pdate_string',
+            ),
         ),
+
+        
     )
 )
 ->fetch('.features-module@style', 'main/content.home_feature', 'none')

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

@@ -6,6 +6,11 @@ $view
 ->fetch('meta[name="Description"]@content',                    '<{isset($info) ? Dever::load("main/content.config#info") . "," . $info : Dever::load("main/content.config#info")}>')
 ->fetch('.logo img@src',                    'main/content.config#logo')
 ->fetch('.blogo img@src',                    'main/content.config#logo')
+
+->fetch('.logo img@black-src',                    'main/content.config#logo_black')
+->fetch('.blogo img@black-src',                    'main/content.config#logo_black')
+
+
 ->fetch('.copyright img@src',                    'main/content.config#weixin_qrcode')
 ->fetch('footer span',                    'main/content.config#beian')
 //->fetch('.logo img@style',                    'width:100px')