Browse Source

Merge branch 'master' of http://git.dever.cc/project/cms

qinjie 4 years ago
parent
commit
2fe6b5351d

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

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

+ 31 - 12
app/content/database/news.php

@@ -24,6 +24,25 @@ $type = array
 
 $type_value = Dever::input('search_option_type', 1);
 
+if ($type_value == 2) {
+    # 专题
+    $small_pic_name = '首页专题封面图';
+    $small_pic_size = '700*460';
+    $small_pic_update = 'image';
+    $small_pic_match = 'is_string';
+} elseif ($type_value == 4) {
+    # 活动
+    $small_pic_name = '活动封面小图';
+    $small_pic_size = '288*384';
+    $small_pic_update = 'image';
+    $small_pic_match = 'is_string';
+} else {
+    $small_pic_name = '活动封面小图';
+    $small_pic_size = '288*384';
+    $small_pic_update = 'hidden';
+    $small_pic_match = 'option';
+}
+
 $name = $type[$type_value];
 
 return array
@@ -114,31 +133,31 @@ return array
         'pic'       => array
         (
             'type'      => 'varchar-150',
-            'name'      => '封面图-图片尺寸1200*500px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
+            'name'      => '封面图-图片尺寸'.($type_value == 3 ? '1200*670' : '1200*530').'px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
             'default'   => '',
             'desc'      => '封面图',
             'match'     => 'is_string',
             'update'    => 'image',
             'key'       => '1',
-            'place'     => '1200*500',
+            'place'     => $type_value == 3 ? '1200*670' : '1200*530',
         ),
 
         'small_pic'       => array
         (
             'type'      => 'varchar-150',
-            'name'      => '封面小图-图片尺寸270*363px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
+            'name'      => $small_pic_name . '-图片尺寸'.$small_pic_size.'px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
             'default'   => '',
             'desc'      => '封面图',
-            'match'     => $type_value == 4 ? 'is_string' : 'option',
-            'update'    => $type_value == 4 ? 'image' : 'hidden',
+            'match'     => $small_pic_match,
+            'update'    => $small_pic_update,
             'key'       => '1',
-            'place'     => '270*363',
+            'place'     => $small_pic_size,
         ),
 
         'video'     => array
         (
             'type'      => 'varchar-800',
-            'name'      => '上传视频-视频格式mp4,上传大小不能超过4G,上述封面图将作为视频封面',
+            'name'      => '上传视频-视频格式为MP4,上传大小不能超过4M。如需添加腾讯视频,请将腾讯视频分享链接添加至【上传视频】按钮下方地址输入框中',
             'default'   => '',
             'desc'      => '上传推荐视频',
             'match'     => $type_value == 3 ? 'is_string' : 'option',
@@ -187,13 +206,13 @@ return array
         'share_pic'     => array
         (
             'type'      => 'varchar-150',
-            'name'      => '分享图片-图片尺寸570*570px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
+            'name'      => '分享图片-图片尺寸200*200px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
             'default'   => '',
             'desc'      => '分享图片',
             'match'     => 'option',
             'update'    => 'image',
             'key'       => '1',
-            'place'     => '150',
+            'place'     => '200*200',
             //'upload'  => 'qiniu',
             //'large'   => true,
         ),
@@ -222,7 +241,7 @@ return array
         'content_video'     => array
         (
             'type'      => 'varchar-800',
-            'name'      => '上传内容视频-视频格式mp4,上传大小不能超过4G,如果上传了视频',
+            'name'      => '上传内容视频-视频格式为MP4,上传大小不能超过4M。如需添加腾讯视频,请将腾讯视频分享链接添加至【上传视频】按钮下方地址输入框中',
             'default'   => '',
             'desc'      => '上传推荐视频',
             'match'     => $type_value != 3 ? 'option' : 'option',
@@ -236,13 +255,13 @@ return array
         'content_video_pic'       => array
         (
             'type'      => 'varchar-150',
-            'name'      => '内容视频封面图-图片尺寸1200*500px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
+            'name'      => '内容视频封面图-图片尺寸1200*670px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
             'default'   => '',
             'desc'      => '封面图',
             'match'     => $type_value != 3 ? 'option' : 'option',
             'update'    => $type_value != 3 ? 'image' : 'hidden',
             'key'       => '1',
-            'place'     => '1200*500',
+            'place'     => '1200*670',
         ),
 
         'beizhu'      => array

+ 4 - 4
app/content/database/xuniren.php

@@ -110,13 +110,13 @@ return array
         'pic'      => array
         (
             'type'      => 'text-255',
-            'name'      => '形象大图-可以上传多张,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
+            'name'      => '形象大图-可以上传多张,图片尺寸530*800px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
             'default'   => '',
             'desc'      => '形象大图',
             'match'     => 'option',
             'update'    => 'images',
             'key'       => '1',
-            'place'     => '1242*1863',
+            'place'     => '530*800',
         ),
 
         'sex'        => array
@@ -277,13 +277,13 @@ return array
         'share_pic'     => array
         (
             'type'      => 'varchar-150',
-            'name'      => '分享图片-图片尺寸570*570px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
+            'name'      => '分享图片-图片尺寸200*200px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
             'default'   => '',
             'desc'      => '分享图片',
             'match'     => 'option',
             'update'    => 'image',
             'key'       => '1',
-            'place'     => '150',
+            'place'     => '200*200',
             //'upload'  => 'qiniu',
             //'large'   => true,
         ),

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

@@ -201,7 +201,7 @@ return array
         (
             'type'      => 'varchar-20',
             'name'      => '图片尺寸提醒-请直接输入提醒的文字即可,如100*100',
-            'default'   => '1200*500',
+            'default'   => '',
             'desc'      => '图片尺寸提醒',
             'match'     => 'is_string',
             'update'    => 'text',

+ 4 - 0
app/push/lib/Data.php

@@ -95,6 +95,10 @@ class Data
                         $info['pic'] = $data['pic'];
                     }
 
+                    if (isset($data['small_pic']) && $data['small_pic'] && !$info['pic']) {
+                        $info['small_pic'] = $data['small_pic'];
+                    }
+
                     if (isset($data['link']) && $data['link'] && !$info['link']) {
                         $info['link'] = $data['link'];
                     }

+ 8 - 8
main/database/config.php

@@ -66,13 +66,13 @@ return array
 		'logo'		=> array
 		(
 			'type' 		=> 'varchar-150',
-			'name' 		=> '站点logo',
+			'name' 		=> '站点logo-图片尺寸170*60px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
 			'default' 	=> '',
 			'desc' 		=> '站点logo',
 			'match' 	=> 'is_string',
 			'update'	=> 'image',
 			'key' 		=> '1',
-			'place'		=> '150',
+			'place'		=> '170*60',
 		),
 
 		'beian'		=> array
@@ -88,25 +88,25 @@ return array
 		'xnr_pic'       => array
         (
             'type'      => 'varchar-150',
-            'name'      => '虚拟人封面图-图片尺寸822*542px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
+            'name'      => '虚拟人封面图-图片尺寸595*330px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
             'default'   => '',
             'desc'      => '虚拟人封面图',
             'match'     => 'is_string',
             'update'    => 'image',
             'key'       => '1',
-            'place'     => '822*542',
+            'place'     => '595*330',
         ),
 
         'zwz_pic'       => array
         (
             'type'      => 'varchar-150',
-            'name'      => '造物主封面图-图片尺寸822*542px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
+            'name'      => '造物主封面图-图片尺寸595*330px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
             'default'   => '',
             'desc'      => '造物主封面图',
             'match'     => 'is_string',
             'update'    => 'image',
             'key'       => '1',
-            'place'     => '822*542',
+            'place'     => '595*330',
         ),
 
 		'weibo'		=> array
@@ -122,13 +122,13 @@ return array
 		'weixin_qrcode'		=> array
 		(
 			'type' 		=> 'varchar-150',
-			'name' 		=> '微信二维码',
+			'name' 		=> '微信二维码-图片尺寸250*250px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
 			'default' 	=> '',
 			'desc' 		=> '微信二维码',
 			'match' 	=> 'option',
 			'update'	=> 'image',
 			'key' 		=> '1',
-			'place'		=> '150',
+			'place'		=> '250*250',
 		),
 		/*
 		'email'		=> array

+ 12 - 0
main/src/Content.php

@@ -148,6 +148,18 @@ class Content
         return $data;
     }
 
+    # 获取列表页专题
+    public function list_feature()
+    {
+        $data = Dever::load('push/lib/data')->get('list_feature', '专题列表顶部推荐位', 5, '1,2,3,4,5,6,7');
+        //$data = false;
+        if (!$data) {
+            $data = Dever::load('content/lib/news')->getHome(2, 5);
+        }
+
+        return $data;
+    }
+
     # 获取首页视频
     public function home_video_first()
     {

+ 1 - 1
main/template/xuniren/feature.php

@@ -11,7 +11,7 @@ $view
 ->loop
 (
     '.features-module .swiper-slide',
-    'main/content.home_feature',
+    'main/content.list_feature',
     array
     (
         'a|0' => array