Browse Source

后台修改

xxxrrrdddd 3 years ago
parent
commit
8889c333d2

+ 1 - 1
addons/alioss/info.ini

@@ -4,5 +4,5 @@ intro = 使用阿里OSS存储,上传时直传阿里云OSS
 author = Karson
 website = http://www.fastadmin.net
 version = 1.1.7
-state = 1
+state = 0
 url = /addons/alioss

+ 2 - 2
application/admin/view/feedback/index.html

@@ -14,13 +14,13 @@
                         <a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('feedback/import')?'':'hide'}" title="{:__('Import')}" id="btn-import-file" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> {:__('Import')}</a>
 -->
 
-                        <div class="dropdown btn-group {:$auth->check('feedback/multi')?'':'hide'}">
+                       <!-- <div class="dropdown btn-group {:$auth->check('feedback/multi')?'':'hide'}">
                             <a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>
                             <ul class="dropdown-menu text-left" role="menu">
                                 <li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li>
                                 <li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li>
                             </ul>
-                        </div>
+                        </div>-->
 
                         
                     </div>

+ 0 - 6
application/extra/addons.php

@@ -3,12 +3,6 @@
 return [
     'autoload' => false,
     'hooks' => [
-        'upload_config_init' => [
-            'alioss',
-        ],
-        'upload_after' => [
-            'alioss',
-        ],
         'sms_send' => [
             'aliyunsms',
         ],

File diff suppressed because it is too large
+ 0 - 0
public/assets/addons/alioss/js/spark.js


+ 1 - 83
public/assets/js/addons.js

@@ -1,87 +1,5 @@
 define([], function () {
-    //如果开启了alioss客户端上传模式
-if (typeof Config.upload.storage !== 'undefined' && Config.upload.storage === 'alioss') {
-    require(['upload', '../addons/alioss/js/spark'], function (Upload, SparkMD5) {
-        var _onFileAdded = Upload.events.onFileAdded;
-        var _onUploadResponse = Upload.events.onUploadResponse;
-        var _process = function (up, file) {
-            (function (up, file) {
-                var blob = file.getNative();
-                var loadedBytes = file.loaded;
-                var chunkSize = 2097152;
-                var chunkBlob = blob.slice(loadedBytes, loadedBytes + chunkSize);
-                var reader = new FileReader();
-                reader.addEventListener('loadend', function (e) {
-                    var spark = new SparkMD5.ArrayBuffer();
-                    spark.append(e.target.result);
-                    var md5 = spark.end();
-                    Fast.api.ajax({
-                        url: "/addons/alioss/index/params",
-                        data: {method: 'POST', md5: md5, name: file.name, type: file.type, size: file.size},
-                    }, function (data) {
-                        file.md5 = md5;
-                        file.status = 1;
-                        file.key = data.key;
-                        file.OSSAccessKeyId = data.id;
-                        file.policy = data.policy;
-                        file.signature = data.signature;
-                        up.start();
-                        return false;
-                    });
-                    return;
-                });
-                reader.readAsArrayBuffer(chunkBlob);
-            })(up, file);
-        };
-        Upload.events.onFileAdded = function (up, files) {
-            return _onFileAdded.call(this, up, files);
-        };
-        Upload.events.onBeforeUpload = function (up, file) {
-            if (typeof file.md5 === 'undefined') {
-                up.stop();
-                _process(up, file);
-            } else {
-                up.settings.headers = up.settings.headers || {};
-                up.settings.multipart_params.key = file.key;
-                up.settings.multipart_params.OSSAccessKeyId = file.OSSAccessKeyId;
-                up.settings.multipart_params.success_action_status = 200;
-                if (typeof file.callback !== 'undefined') {
-                    up.settings.multipart_params.callback = file.callback;
-                }
-                up.settings.multipart_params.policy = file.policy;
-                up.settings.multipart_params.signature = file.signature;
-                //up.settings.send_file_name = false;
-            }
-        };
-        Upload.events.onUploadResponse = function (response, info, up, file) {
-            try {
-                var ret = {};
-                if (info.status === 200) {
-                    var url = '/' + file.key;
-                    Fast.api.ajax({
-                        url: "/addons/alioss/index/notify",
-                        data: {method: 'POST', name: file.name, url: url, md5: file.md5, size: file.size, type: file.type, policy: file.policy, signature: file.signature}
-                    }, function () {
-                        return false;
-                    });
-                    ret.code = 1;
-                    ret.data = {
-                        url: url
-                    };
-                } else {
-                    ret.code = 0;
-                    ret.msg = info.response;
-                }
-                return _onUploadResponse.call(this, JSON.stringify(ret));
-
-            } catch (e) {
-            }
-            return _onUploadResponse.call(this, response);
-
-        };
-    });
-}
-require.config({
+    require.config({
     paths: {
         'simditor': '../addons/simditor/js/simditor.min',
     },

Some files were not shown because too many files changed in this diff