diff --git a/application/service/ResourcesService.php b/application/service/ResourcesService.php index c06dad929..f208e0ca7 100755 --- a/application/service/ResourcesService.php +++ b/application/service/ResourcesService.php @@ -107,6 +107,49 @@ class ResourcesService return ''; } + /** + * 相对路径文件新增 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2020-04-16 + * @desc description + * @param [string] $value [相对路径文件 /static 开头] + * @param [string] $path_type [文件存储路径] + */ + public static function AttachmentPathAdd($value, $path_type) + { + // 文件是否存在 + $file = ROOT.'public'.$value; + if(!file_exists($file)) + { + return DataReturn('文件不存在', -1); + } + + // 配置信息 + $config = config('ueditor.'); + + // 文件信息 + $info = pathinfo($file); + $title = empty($info['basename']) ? substr(strrchr($file, '/'), 1) : $info['basename']; + $ext = strtolower(strrchr($file, '.')); + $type = in_array($ext, $config['imageAllowFiles']) ? 'image' : (in_array($ext, $config['videoAllowFiles']) ? 'video' : 'file'); + + // 添加文件 + $data = [ + "url" => $value, + "path" => $file, + "title" => $title, + "original" => $title, + "ext" => $ext, + "size" => filesize($file), + 'type' => $type, + "hash" => hash_file('sha256', $file, false), + 'path_type' => $path_type, + ]; + return self::AttachmentAdd($data); + } + /** * 附件添加 * @author Devil diff --git a/application/tags.php b/application/tags.php index 417ea5f33..c1b0bd59e 100755 --- a/application/tags.php +++ b/application/tags.php @@ -57,11 +57,19 @@ return array ( array ( 0 => 'app\\plugins\\orderexportprint\\Hook', ), + 'plugins_view_admin_order_top_operation' => + array ( + 0 => 'app\\plugins\\orderexportprint\\Hook', + ), 'plugins_view_admin_order_list_operate' => array ( 0 => 'app\\plugins\\orderexportprint\\Hook', 1 => 'app\\plugins\\orderpricerevision\\Hook', ), + 'plugins_view_admin_order_list_operation' => + array ( + 0 => 'app\\plugins\\orderexportprint\\Hook', + ), 'plugins_view_user_login_info_top' => array ( 0 => 'app\\plugins\\weixinwebauthorization\\Hook', @@ -146,6 +154,7 @@ return array ( 0 => 'app\\plugins\\coupon\\Hook', 1 => 'app\\plugins\\membershiplevelvip\\Hook', 2 => 'app\\plugins\\speedplaceorder\\Hook', + 3 => 'app\\plugins\\weixinliveplayer\\Hook', ), 'plugins_view_buy_goods_bottom' => array ( diff --git a/extend/base/Wechat.php b/extend/base/Wechat.php index 197c61fd4..314237422 100755 --- a/extend/base/Wechat.php +++ b/extend/base/Wechat.php @@ -186,7 +186,7 @@ class Wechat * @version 1.0.0 * @datetime 2018-01-02T19:53:42+0800 */ - private function GetMiniAccessToken() + public function GetMiniAccessToken() { // 缓存key $key = $this->_appid.'_access_token'; diff --git a/public/static/admin/default/css/article.css b/public/static/admin/default/css/article.css index 2760a2042..3efeb8eac 100755 --- a/public/static/admin/default/css/article.css +++ b/public/static/admin/default/css/article.css @@ -1,4 +1,4 @@ /** * 编辑/添加页面 */ -.colorpicker-submit img { width: 18px; height: 18px; } \ No newline at end of file +.colorpicker-submit img { width: 16px; height: 16px; } \ No newline at end of file diff --git a/public/static/common/css/common.css b/public/static/common/css/common.css index 3b824e775..037293581 100755 --- a/public/static/common/css/common.css +++ b/public/static/common/css/common.css @@ -276,6 +276,12 @@ button.colorpicker-submit:active { -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.15); box-shadow: inset 0 3px 5px rgba(255, 255, 255, 0.15); } +button.colorpicker-submit img { + margin-right: 7px; + width: 14px; + height: 14px; + float: right; +} /** diff --git a/public/static/common/js/common.js b/public/static/common/js/common.js index 1cb7e7dd9..a25e9d89c 100755 --- a/public/static/common/js/common.js +++ b/public/static/common/js/common.js @@ -777,7 +777,7 @@ function ModalLoad(url, title, tag, class_tag) var html = '