Pārlūkot izejas kodu

一些配置,关闭oss

lizhen 1 nedēļu atpakaļ
vecāks
revīzija
1d15f0718e

+ 0 - 0
public/assets/addons/alioss/js/spark.js → addons/alioss/assets/js/spark.js


+ 1 - 1
addons/alioss/info.ini

@@ -4,7 +4,7 @@ intro = 使用阿里云OSS云储存,支持直传、服务器中转、分片上
 author = FastAdmin
 website = https://www.fastadmin.net
 version = 1.2.0
-state = 1
+state = 0
 url = /addons/alioss
 license = regular
 licenseto = 19079

+ 3 - 3
addons/epay/config.php

@@ -22,9 +22,9 @@ return [
             'appid' => '',
             'app_id' => '',
             'app_secret' => '',
-            'miniapp_id' => 'wx1ed359bf9ef1525f',
-            'mch_id' => '1691702429',
-            'key' => 'X1qt6aYRSLkcvwUmWLJZI4itVcIPvLQn',
+            'miniapp_id' => '',
+            'mch_id' => '',
+            'key' => '',
             'key_v3' => '',
             'mode' => 'normal',
             'sub_mch_id' => '',

+ 4 - 14
application/extra/addons.php

@@ -3,20 +3,6 @@
 return [
     'autoload' => false,
     'hooks' => [
-        'app_init' => [
-            'alioss',
-            'qrcode',
-            'unishop',
-        ],
-        'module_init' => [
-            'alioss',
-        ],
-        'upload_config_init' => [
-            'alioss',
-        ],
-        'upload_delete' => [
-            'alioss',
-        ],
         'epay_config_init' => [
             'epay',
         ],
@@ -32,6 +18,10 @@ return [
         'user_sidenav_after' => [
             'poster',
         ],
+        'app_init' => [
+            'qrcode',
+            'unishop',
+        ],
         'config_init' => [
             'summernote',
         ],

+ 8 - 9
application/extra/site.php

@@ -1,10 +1,10 @@
 <?php
 
 return array (
-  'name' => '游艇预约',
+  'name' => '幸福里未来社区',
   'beian' => '',
   'cdnurl' => '',
-  'version' => '1.0.3',
+  'version' => '1.0.0',
   'timezone' => 'Asia/Shanghai',
   'forbiddenip' => '',
   'languages' => 
@@ -12,7 +12,7 @@ return array (
     'backend' => 'zh-cn',
     'frontend' => 'zh-cn',
   ),
-  'fixedpage' => 'unishop/dashboard',
+  'fixedpage' => 'dashboard',
   'categorytype' => 
   array (
     'default' => '默认',
@@ -25,8 +25,6 @@ return array (
     'basic' => '基础配置',
     'email' => '邮件配置',
     'dictionary' => '字典配置',
-    'user' => '会员配置',
-    'example' => '示例分组',
     'website' => '全站基础配置',
     'takecash' => '提现配置',
   ),
@@ -48,10 +46,11 @@ return array (
   'kefu_mobile' => '13018525577',
   'order_refund_rule' => '未使用、未激活可随时申请退订,订单不支持部分退。 
 如需改期,请申请退订后重新预订。',
-  'kefu_qrcode' => '/uploads/20240906/aeeb86c804d5097559fe2948b8258155.png',
+  'kefu_qrcode' => '/uploads/20241017/9c906c9714fb1b7268b8096120e33256.jpg',
   'min_takecash_money' => '1',
   'max_takecash_money' => '10000',
-  'takecash_plat_bili' => '6',
-  'unishop_order_intromoney_bili' => '10',
-  'take_cash_rule' => '提现手续费千分之六',
+  'takecash_plat_bili' => '0.6',
+  'unishop_order_intromoney_bili' => '0',
+  'take_cash_rule' => '单次提现最低一元,最高一万元。提现手续费千分之六',
+  'mini_login_bgimage' => '/uploads/20250605/bc0270dd56731960da4a373c06e1bdf9.png',
 );

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

@@ -1,246 +1,5 @@
 define([], function () {
-    if (typeof Config.upload.storage !== 'undefined' && Config.upload.storage === 'alioss') {
-    require(['upload'], function (Upload) {
-        //获取文件MD5值
-        var getFileMd5 = function (file, cb) {
-            require(['../addons/alioss/js/spark'], function (SparkMD5) {
-                var blobSlice = File.prototype.slice || File.prototype.mozSlice || File.prototype.webkitSlice,
-                    chunkSize = 10 * 1024 * 1024,
-                    chunks = Math.ceil(file.size / chunkSize),
-                    currentChunk = 0,
-                    spark = new SparkMD5.ArrayBuffer(),
-                    fileReader = new FileReader();
-
-                fileReader.onload = function (e) {
-                    spark.append(e.target.result);
-                    currentChunk++;
-                    if (currentChunk < chunks) {
-                        loadNext();
-                    } else {
-                        cb && cb(spark.end());
-                    }
-                };
-
-                fileReader.onerror = function () {
-                    console.warn('文件读取错误');
-                };
-
-                function loadNext() {
-                    var start = currentChunk * chunkSize,
-                        end = ((start + chunkSize) >= file.size) ? file.size : start + chunkSize;
-
-                    fileReader.readAsArrayBuffer(blobSlice.call(file, start, end));
-                }
-
-                loadNext();
-
-            });
-        };
-
-        var _onInit = Upload.events.onInit;
-        //初始化中完成判断
-        Upload.events.onInit = function () {
-            _onInit.apply(this, Array.prototype.slice.apply(arguments));
-            //如果上传接口不是阿里OSS,则不处理
-            if (this.options.url !== Config.upload.uploadurl) {
-                return;
-            }
-            $.extend(this.options, {
-                //关闭自动处理队列功能
-                autoQueue: false,
-                params: function (files, xhr, chunk) {
-                    var params = Config.upload.multipart;
-                    if (chunk) {
-                        return $.extend({}, params, {
-                            filesize: chunk.file.size,
-                            filename: chunk.file.name,
-                            chunkid: chunk.file.upload.uuid,
-                            chunkindex: chunk.index,
-                            chunkcount: chunk.file.upload.totalChunkCount,
-                            chunksize: this.options.chunkSize,
-                            chunkfilesize: chunk.dataBlock.data.size,
-                            width: chunk.file.width || 0,
-                            height: chunk.file.height || 0,
-                            type: chunk.file.type,
-                            uploadId: chunk.file.uploadId,
-                            key: chunk.file.key,
-                        });
-                    } else {
-                        params = $.extend({}, params, files[0].params);
-                        params.category = files[0].category || '';
-                    }
-                    return params;
-                },
-                chunkSuccess: function (chunk, file, response) {
-                    var etag = chunk.xhr.getResponseHeader("ETag").replace(/(^")|("$)/g, '');
-                    file.etags = file.etags ? file.etags : [];
-                    file.etags[chunk.index] = etag;
-                },
-                chunksUploaded: function (file, done) {
-                    var that = this;
-                    Fast.api.ajax({
-                        url: "/addons/alioss/index/upload",
-                        data: {
-                            action: 'merge',
-                            filesize: file.size,
-                            filename: file.name,
-                            chunkid: file.upload.uuid,
-                            chunkcount: file.upload.totalChunkCount,
-                            md5: file.md5,
-                            key: file.key,
-                            uploadId: file.uploadId,
-                            etags: file.etags,
-                            category: file.category || '',
-                            aliosstoken: Config.upload.multipart.aliosstoken,
-                        },
-                    }, function (data, ret) {
-                        done(JSON.stringify(ret));
-                        return false;
-                    }, function (data, ret) {
-                        file.accepted = false;
-                        that._errorProcessing([file], ret.msg);
-                        return false;
-                    });
-
-                },
-            });
-
-            var _success = this.options.success;
-            //先移除已有的事件
-            this.off("success", _success).on("success", function (file, response) {
-                var ret = {code: 0, msg: response};
-                try {
-                    if (response) {
-                        ret = typeof response === 'string' ? JSON.parse(response) : response;
-                    }
-                    if (file.xhr.status === 200) {
-                        if (Config.upload.uploadmode === 'client') {
-                            ret = {code: 1, data: {url: '/' + file.key}};
-                        }
-                        if (ret.code == 1) {
-                            var url = ret.data.url || '';
-
-                            Fast.api.ajax({
-                                url: "/addons/alioss/index/notify",
-                                data: {name: file.name, url: url, md5: file.md5, size: file.size, width: file.width || 0, height: file.height || 0, type: file.type, category: file.category || '', aliosstoken: Config.upload.multipart.aliosstoken}
-                            }, function () {
-                                return false;
-                            }, function () {
-                                return false;
-                            });
-                        } else {
-                            console.error(ret);
-                        }
-                    } else {
-                        console.error(file.xhr);
-                    }
-                } catch (e) {
-                    console.error(e);
-                }
-                _success.call(this, file, ret);
-            });
-
-            this.on("addedfile", function (file) {
-                var that = this;
-                setTimeout(function () {
-                    if (file.status === 'error') {
-                        return;
-                    }
-                    getFileMd5(file, function (md5) {
-                        var chunk = that.options.chunking && file.size > that.options.chunkSize ? 1 : 0;
-                        var params = $(that.element).data("params") || {};
-                        var category = typeof params.category !== 'undefined' ? params.category : ($(that.element).data("category") || '');
-                        category = typeof category === 'function' ? category.call(that, file) : category;
-                        Fast.api.ajax({
-                            url: "/addons/alioss/index/params",
-                            data: {method: 'POST', category: category, md5: md5, name: file.name, type: file.type, size: file.size, chunk: chunk, chunksize: that.options.chunkSize, aliosstoken: Config.upload.multipart.aliosstoken},
-                        }, function (data) {
-                            file.md5 = md5;
-                            file.id = data.id;
-                            file.key = data.key;
-                            file.date = data.date;
-                            file.uploadId = data.uploadId;
-                            file.policy = data.policy;
-                            file.signature = data.signature;
-                            file.partsAuthorization = data.partsAuthorization;
-                            file.params = data;
-                            file.category = category;
-
-                            if (file.status != 'error') {
-                                //开始上传
-                                that.enqueueFile(file);
-                            } else {
-                                that.removeFile(file);
-                            }
-                            return false;
-                        }, function () {
-                            that.removeFile(file);
-                        });
-                    });
-                }, 0);
-            });
-
-            if (Config.upload.uploadmode === 'client') {
-                var _method = this.options.method;
-                var _url = this.options.url;
-                this.options.method = function (files) {
-                    if (files[0].upload.chunked) {
-                        var chunk = null;
-                        files[0].upload.chunks.forEach(function (item) {
-                            if (item.status === 'uploading') {
-                                chunk = item;
-                            }
-                        });
-                        if (!chunk) {
-                            return "POST";
-                        } else {
-                            return "PUT";
-                        }
-                    }
-                    return _method;
-                };
-                this.options.url = function (files) {
-                    if (files[0].upload.chunked) {
-                        var chunk = null;
-                        files[0].upload.chunks.forEach(function (item) {
-                            if (item.status === 'uploading') {
-                                chunk = item;
-                            }
-                        });
-                        var index = chunk.dataBlock.chunkIndex;
-                        // debugger;
-                        this.options.headers = {"Authorization": "OSS " + files[0]['id'] + ":" + files[0]['partsAuthorization'][index], "x-oss-date": files[0]['date']};
-                        if (!chunk) {
-                            return Config.upload.uploadurl + "/" + files[0].key + "?uploadId=" + files[0].uploadId;
-                        } else {
-                            return Config.upload.uploadurl + "/" + files[0].key + "?partNumber=" + (index + 1) + "&uploadId=" + files[0].uploadId;
-                        }
-                    }
-                    return _url;
-                };
-                this.on("sending", function (file, xhr, formData) {
-                    var that = this;
-                    if (file.upload.chunked) {
-                        var _send = xhr.send;
-                        xhr.send = function () {
-                            var chunk = null;
-                            file.upload.chunks.forEach(function (item) {
-                                if (item.status == 'uploading') {
-                                    chunk = item;
-                                }
-                            });
-                            if (chunk) {
-                                _send.call(xhr, chunk.dataBlock.data);
-                            }
-                        };
-                    }
-                });
-            }
-        };
-    });
-}
-
-require.config({
+    require.config({
     paths: {
         'designer': '../addons/poster/js/designer',
         'jquery.contextMenu': '../addons/poster/js/jquery.contextMenu',