diff --git a/app/api/controller/BaseController.php b/app/api/controller/BaseController.php index 2bc7313..0e2b74e 100644 --- a/app/api/controller/BaseController.php +++ b/app/api/controller/BaseController.php @@ -83,7 +83,7 @@ class BaseController //多文件上传 $files = $request->file(); try { - $result = Storage::adapter('minio') + $result = Storage::adapter('oss') ->path($savePath) ->size($maxsize) ->extYes($mimetype) diff --git a/app/api/middleware/Auth.php b/app/api/middleware/Auth.php index c4cc702..8962d51 100644 --- a/app/api/middleware/Auth.php +++ b/app/api/middleware/Auth.php @@ -122,7 +122,7 @@ class Auth implements MiddlewareInterface ]); $IM = new \support\OpenImSdk\Client([ 'host' => 'http://127.0.0.1:10002', // OpenIM API地址 - 'secret' => 'openIM123', // OpenIM密钥 + 'secret' => 'n1e5a6s6m7', // OpenIM密钥 ]); $request->IM = $IM; $response = $next($request); diff --git a/config/plugin/shopwwi/filesystem/app.php b/config/plugin/shopwwi/filesystem/app.php index fdbd781..95db4fc 100644 --- a/config/plugin/shopwwi/filesystem/app.php +++ b/config/plugin/shopwwi/filesystem/app.php @@ -76,15 +76,30 @@ return [ 'url' => 'http://156.238.245.175:10005/openim' // 静态文件访问域名 ], 'oss' => [ + 'driver' => \Shopwwi\WebmanFilesystem\Adapter\AliyunOssAdapterFactory::class, + 'accessId' => 'LTAI5tAAVVWAyavjFEpjSqjP', + 'accessSecret' => 'qBOXJLe5xFGbH01UdcTYVZ1JKDV4ia', + 'bucket' => 'shunliao', + 'endpoint' => 'oss-cn-shenzhen.aliyuncs.com', + 'url' => '//shunliao.oss-accelerate.aliyuncs.com', // 静态文件访问域名 + // 'timeout' => 3600, + // 'connectTimeout' => 10, + 'isCName' => false, + // 'token' => null, + // 'proxy' => null, + 'prefix' => '', + ], + 'ossmy' => [ 'driver' => \Shopwwi\WebmanFilesystem\Adapter\AliyunOssAdapterFactory::class, 'accessId' => 'LTAI5tLsFoJAda5juPabytuU', 'accessSecret' => 'ZyiKpt6lqLBfHPZcvHd7SWM7eENRJW', 'bucket' => 'wjba', 'endpoint' => 'oss-cn-hongkong.aliyuncs.com', - 'url' => '//wjba.oss-accelerate.aliyuncs.com' // 静态文件访问域名 + 'url' => '//wjba.oss-accelerate.aliyuncs.com', // 静态文件访问域名 // 'timeout' => 3600, // 'connectTimeout' => 10, - // 'isCName' => false, + 'isCName' => false, + 'prefix' => '', // 'token' => null, // 'proxy' => null, ], diff --git a/plugin/admin/app/controller/FilesController.php b/plugin/admin/app/controller/FilesController.php index 755eb40..a83e6c9 100644 --- a/plugin/admin/app/controller/FilesController.php +++ b/plugin/admin/app/controller/FilesController.php @@ -92,7 +92,7 @@ class FilesController extends Crud } $mimetype = explode(',',Config('site.upload_mimetype')); $maxsize = Config('site.upload_maxsize')*1024*1024; - $result = Storage::adapter('minio') + $result = Storage::adapter('oss') ->path($savePath) ->size($maxsize) ->extYes($mimetype) diff --git a/plugin/admin/app/view/index/index.html b/plugin/admin/app/view/index/index.html index a16bf45..c85ccd7 100644 --- a/plugin/admin/app/view/index/index.html +++ b/plugin/admin/app/view/index/index.html @@ -15,6 +15,7 @@ var require = { config: {$config| json_encode=JSON_UNESCAPED_UNICODE|raw} }; + window.Config = require.config; var user = {$user|json_encode|raw}; diff --git a/plugin/admin/public/js/default.js b/plugin/admin/public/js/default.js index 38e4d85..a65f8f9 100644 --- a/plugin/admin/public/js/default.js +++ b/plugin/admin/public/js/default.js @@ -5,7 +5,7 @@ requirejs.config({ baseUrl: window.Config.cdnurl+window.Config.admin_path+'/js/', packages: [{ name: 'moment', - location: '../libs/moment', + location: window.Config.admin_path+'/libs/moment', main: 'moment' }], paths: { @@ -48,7 +48,7 @@ requirejs.config({ }, map: { '*': { - 'css': '../libs/require-css.min.js' // or whatever the path to require-css is + 'css': window.Config.admin_path+'/libs/require-css.min.js' // or whatever the path to require-css is } }, shim: { diff --git a/plugin/admin/public/js/index.js b/plugin/admin/public/js/index.js index 8363088..8e15180 100644 --- a/plugin/admin/public/js/index.js +++ b/plugin/admin/public/js/index.js @@ -98,7 +98,7 @@ define(['lightyear','multitabs', '../libs/Chart','form','bootstrap'], function ( init: [{ type: 'main', title: '首页', - url: 'index/'+Config.fixedpage + url: Fast.api.fixurl('index/'+Config.fixedpage) }] });