dever 4 years ago
parent
commit
b710450d76

+ 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

+ 28 - 10
app/content/database/news.php

@@ -24,6 +24,24 @@ $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_size = '288*384';
+    $small_pic_update = 'hidden';
+    $small_pic_match = 'option';
+}
+
 $name = $type[$type_value];
 
 return array
@@ -114,25 +132,25 @@ 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
@@ -187,13 +205,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,
         ),
@@ -236,13 +254,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,
         ),

+ 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'];
                     }