From 840f1bc00fe22939a5fca9bc8738a5e9efb6008b Mon Sep 17 00:00:00 2001 From: devil Date: Sun, 19 Apr 2020 21:52:10 +0800 Subject: [PATCH] =?UTF-8?q?=20=E5=B0=8F=E7=A8=8B=E5=BA=8F=E7=9B=B4?= =?UTF-8?q?=E6=92=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/service/ResourcesService.php | 43 +++++ application/tags.php | 9 + extend/base/Wechat.php | 2 +- public/static/admin/default/css/article.css | 2 +- public/static/common/css/common.css | 6 + public/static/common/js/common.js | 6 +- sourcecode/weixin/app.js | 3 +- sourcecode/weixin/app.json | 12 +- .../plugins/weixinliveplayer/player-icon.png | Bin 0 -> 1733 bytes .../plugins/weixinliveplayer/share-icon.png | Bin 0 -> 1727 bytes .../plugins/weixinliveplayer/status-icon.png | Bin 0 -> 1380 bytes .../plugins/weixinliveplayer/time-icon.png | Bin 0 -> 2896 bytes .../plugins/weixinliveplayer/detail/detail.js | 160 +++++++++++++++++ .../weixinliveplayer/detail/detail.json | 4 + .../weixinliveplayer/detail/detail.wxml | 43 +++++ .../weixinliveplayer/detail/detail.wxss | 82 +++++++++ .../plugins/weixinliveplayer/index/index.js | 98 +++++++++++ .../plugins/weixinliveplayer/index/index.json | 7 + .../plugins/weixinliveplayer/index/index.wxml | 36 ++++ .../plugins/weixinliveplayer/index/index.wxss | 73 ++++++++ .../plugins/weixinliveplayer/search/search.js | 163 ++++++++++++++++++ .../weixinliveplayer/search/search.json | 4 + .../weixinliveplayer/search/search.wxml | 34 ++++ .../weixinliveplayer/search/search.wxss | 72 ++++++++ 24 files changed, 851 insertions(+), 8 deletions(-) create mode 100644 sourcecode/weixin/images/plugins/weixinliveplayer/player-icon.png create mode 100644 sourcecode/weixin/images/plugins/weixinliveplayer/share-icon.png create mode 100644 sourcecode/weixin/images/plugins/weixinliveplayer/status-icon.png create mode 100644 sourcecode/weixin/images/plugins/weixinliveplayer/time-icon.png create mode 100644 sourcecode/weixin/pages/plugins/weixinliveplayer/detail/detail.js create mode 100644 sourcecode/weixin/pages/plugins/weixinliveplayer/detail/detail.json create mode 100644 sourcecode/weixin/pages/plugins/weixinliveplayer/detail/detail.wxml create mode 100644 sourcecode/weixin/pages/plugins/weixinliveplayer/detail/detail.wxss create mode 100644 sourcecode/weixin/pages/plugins/weixinliveplayer/index/index.js create mode 100644 sourcecode/weixin/pages/plugins/weixinliveplayer/index/index.json create mode 100644 sourcecode/weixin/pages/plugins/weixinliveplayer/index/index.wxml create mode 100644 sourcecode/weixin/pages/plugins/weixinliveplayer/index/index.wxss create mode 100644 sourcecode/weixin/pages/plugins/weixinliveplayer/search/search.js create mode 100644 sourcecode/weixin/pages/plugins/weixinliveplayer/search/search.json create mode 100644 sourcecode/weixin/pages/plugins/weixinliveplayer/search/search.wxml create mode 100644 sourcecode/weixin/pages/plugins/weixinliveplayer/search/search.wxss 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 = '