Procházet zdrojové kódy

调整视频上传

赵启卫 před 2 roky
rodič
revize
1f2695eed8

+ 18 - 0
application/admin/controller/system/SystemAttachment.php

@@ -59,11 +59,29 @@ class SystemAttachment extends AuthController
             /* 上传图片 */
             /* 上传图片 */
             case 'uploadimage':
             case 'uploadimage':
                 /* 上传涂鸦 */
                 /* 上传涂鸦 */
+                echo json_encode($info);
+                break;
             case 'uploadscrawl':
             case 'uploadscrawl':
                 /* 上传视频 */
                 /* 上传视频 */
             case 'uploadvideo':
             case 'uploadvideo':
                 /* 上传文件 */
                 /* 上传文件 */
+                $res = Upload::file('upfile', 'editor/' . date('Ymd'));
+                //产品图片上传记录
+                $fileInfo = $res->fileInfo->getinfo();
+                //SystemAttachmentModel::attachmentAdd($res->fileInfo->getSaveName(), $fileInfo['size'], $fileInfo['type'], $res->dir, '', 0);
+                $info = array(
+                    "originalName" => $fileInfo['name'],
+                    "name" => $res->fileInfo->getSaveName(),
+                    "url" => '.' . $res->dir,
+                    "size" => $fileInfo['size'],
+                    "type" => $fileInfo['type'],
+                    "state" => "SUCCESS"
+                );
+                echo json_encode($info);
+                exit;
+                break;
             case 'uploadfile':
             case 'uploadfile':
+                
                 $result = json_encode([]);
                 $result = json_encode([]);
                 break;
                 break;
 
 

+ 3 - 3
extend/service/UploadService.php

@@ -18,11 +18,11 @@ class UploadService
     private static $uploadStatus;
     private static $uploadStatus;
 
 
     //上传图片的大小 2MB 单位字节
     //上传图片的大小 2MB 单位字节
-    private static $imageValidate = ['size' => 2097152, 'ext' => 'jpg,jpeg,png,gif', 'mime' => 'image/jpeg,image/gif,image/png'];
+    private static $imageValidate = ['size' => 2097152000, 'ext' => 'jpg,jpeg,png,gif', 'mime' => 'image/jpeg,image/gif,image/png'];
 
 
     private static $fileExt = ['pem', 'mp3', 'wma', 'wav', 'amr', 'mp4', 'key', 'xlsx'];//上传文件后缀类型
     private static $fileExt = ['pem', 'mp3', 'wma', 'wav', 'amr', 'mp4', 'key', 'xlsx'];//上传文件后缀类型
 
 
-    private static $fileMime = ['text/plain', 'audio/mpeg', 'application/x-x509-ca-cert', 'application/octet-stream', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet']; //上传文件类型
+    private static $fileMime = ['text/plain', 'audio/mpeg', 'video/mp4', 'application/x-x509-ca-cert', 'application/octet-stream', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet']; //上传文件类型
 
 
     /**
     /**
      * 初始化
      * 初始化
@@ -139,7 +139,7 @@ class UploadService
         $uploaded_size = $_FILES[$fileName]['size'];
         $uploaded_size = $_FILES[$fileName]['size'];
         $extension = strtolower(pathinfo($uploaded_name, PATHINFO_EXTENSION));
         $extension = strtolower(pathinfo($uploaded_name, PATHINFO_EXTENSION));
         if (strtolower($extension) === 'php' || !$extension) return self::setError('上传文件非法!');
         if (strtolower($extension) === 'php' || !$extension) return self::setError('上传文件非法!');
-        if (in_array(strtolower($uploaded_ext), self::$fileExt) && ($uploaded_size < 2097152) && in_array($uploaded_type, self::$fileMime)) {
+        if (in_array(strtolower($uploaded_ext), self::$fileExt) && ($uploaded_size < 2097152000) && in_array($uploaded_type, self::$fileMime)) {
             $file = request()->file($fileName);
             $file = request()->file($fileName);
             if (count($autoValidate) > 0) $file = $file->validate($autoValidate);
             if (count($autoValidate) > 0) $file = $file->validate($autoValidate);
             $fileInfo = $file->rule($rule)->move($dir, $moveName);
             $fileInfo = $file->rule($rule)->move($dir, $moveName);

+ 1 - 1
public/system/plug/ueditor/ueditor.config.js

@@ -40,7 +40,7 @@
             'directionalityltr', 'directionalityrtl', 'indent', '|',
             'directionalityltr', 'directionalityrtl', 'indent', '|',
             'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|', 'touppercase', 'tolowercase', '|',
             'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|', 'touppercase', 'tolowercase', '|',
             'link', 'unlink', 'anchor', '|', 'imagenone', 'imageleft', 'imageright', 'imagecenter', '|',
             'link', 'unlink', 'anchor', '|', 'imagenone', 'imageleft', 'imageright', 'imagecenter', '|',
-            'horizontal', 'date', 'time', 'spechars', 'snapscreen', 'wordimage',
+            'horizontal', 'date', 'time', 'spechars', 'snapscreen', 'wordimage', 'insertvideo', 'video',
         ]]
         ]]
         // 'insertvideo',
         // 'insertvideo',
         //当鼠标放在工具栏上时显示的tooltip提示,留空支持自动多语言配置,否则以配置值为准
         //当鼠标放在工具栏上时显示的tooltip提示,留空支持自动多语言配置,否则以配置值为准

+ 2 - 2
public/wap/first/zsff/css/style.css

@@ -13994,11 +13994,11 @@ input:-webkit-autofill:focus {
     width: 100%;
     width: 100%;
     height: 100%;
     height: 100%;
     border-radius: 50%;
     border-radius: 50%;
-    -webkit-transform: rotate(90deg);
+    /* -webkit-transform: rotate(90deg);
     -moz-transform: rotate(90deg);
     -moz-transform: rotate(90deg);
     -ms-transform: rotate(90deg);
     -ms-transform: rotate(90deg);
     -o-transform: rotate(90deg);
     -o-transform: rotate(90deg);
-    transform: rotate(90deg);
+    transform: rotate(90deg); */
     pointer-events: none;
     pointer-events: none;
     -webkit-touch-callout: none;
     -webkit-touch-callout: none;
 }
 }