From 13eb1ddd4492612819fcef171e5a2aab1583c19f Mon Sep 17 00:00:00 2001 From: gongfuxiang Date: Fri, 21 Oct 2022 16:59:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E5=B1=82=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E3=80=81=E7=BB=86=E8=8A=82=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/controller/Common.php | 6 +- .../view/default/public/page_loading.html | 10 +- app/index/controller/Common.php | 4 +- .../view/default/public/page_loading.html | 10 +- app/service/GoodsService.php | 8 +- public/static/admin/default/js/index.js | 23 ++ public/static/common/css/color/black.css | 249 ++++++++++++++++-- public/static/common/css/common.css | 33 +++ 8 files changed, 302 insertions(+), 41 deletions(-) diff --git a/app/admin/controller/Common.php b/app/admin/controller/Common.php index 428a63b9c..e63022803 100755 --- a/app/admin/controller/Common.php +++ b/app/admin/controller/Common.php @@ -265,7 +265,8 @@ class Common extends BaseController $assign['default_price_regex'] = MyConst('common_regex_price'); // 附件host地址 - $assign['attachment_host'] = SystemBaseService::AttachmentHost(); + $attachment_host = SystemBaseService::AttachmentHost(); + $assign['attachment_host'] = $attachment_host; // css/js引入host地址 $assign['public_host'] = MyConfig('shopxo.public_host'); @@ -290,7 +291,8 @@ class Common extends BaseController // 加载页面加载层、是否加载图片动画 $assign['is_page_loading'] = ($this->module_name.$this->controller_name.$this->action_name == 'adminindexindex') ? 0 : 1; - $assign['is_page_loading_images'] = 1; + $assign['is_page_loading_images'] = 0; + $assign['page_loading_images_url'] = $attachment_host.'/static/common/images/loading.gif'; // 是否加载视频播放器组件 $assign['is_load_ckplayer'] = 0; diff --git a/app/admin/view/default/public/page_loading.html b/app/admin/view/default/public/page_loading.html index 05927e004..5ad9350b9 100644 --- a/app/admin/view/default/public/page_loading.html +++ b/app/admin/view/default/public/page_loading.html @@ -1,7 +1,11 @@
- {{if isset($is_page_loading_images) and $is_page_loading_images eq 1}} - + {{if isset($is_page_loading_images) and $is_page_loading_images eq 1 and !empty($page_loading_images_url)}} + {{else /}} - +
+
+
+
+
{{/if}}
\ No newline at end of file diff --git a/app/index/controller/Common.php b/app/index/controller/Common.php index cc154a259..1e3e7ca8c 100755 --- a/app/index/controller/Common.php +++ b/app/index/controller/Common.php @@ -327,7 +327,8 @@ class Common extends BaseController $assign['default_price_regex'] = MyConst('common_regex_price'); // 附件host地址 - $assign['attachment_host'] = SystemBaseService::AttachmentHost(); + $attachment_host = SystemBaseService::AttachmentHost(); + $assign['attachment_host'] = $attachment_host; // css/js引入host地址 $assign['public_host'] = MyConfig('shopxo.public_host'); @@ -373,6 +374,7 @@ class Common extends BaseController // 默认不加载页面加载层、是否加载图片动画 $assign['is_page_loading'] = 0; $assign['is_page_loading_images'] = 0; + $assign['page_loading_images_url'] = $attachment_host.'/static/common/images/loading.gif'; // 顶部右侧导航 $assign['common_nav_top_right_list'] = NavigationService::HomeHavTopRight(['user'=>$this->user]); diff --git a/app/index/view/default/public/page_loading.html b/app/index/view/default/public/page_loading.html index 05927e004..5ad9350b9 100644 --- a/app/index/view/default/public/page_loading.html +++ b/app/index/view/default/public/page_loading.html @@ -1,7 +1,11 @@
- {{if isset($is_page_loading_images) and $is_page_loading_images eq 1}} - + {{if isset($is_page_loading_images) and $is_page_loading_images eq 1 and !empty($page_loading_images_url)}} + {{else /}} - +
+
+
+
+
{{/if}}
\ No newline at end of file diff --git a/app/service/GoodsService.php b/app/service/GoodsService.php index c7dff8988..8e619ceea 100755 --- a/app/service/GoodsService.php +++ b/app/service/GoodsService.php @@ -1501,9 +1501,10 @@ class GoodsService * @blog http://gong.gg/ * @version 1.0.0 * @datetime 2018-12-16T01:56:42+0800 - * @param [int] $goods_id [商品id] + * @param [int] $goods_id [商品id] + * @param [array] $params [输入参数] */ - public static function GoodsSaveBaseUpdate($goods_id) + public static function GoodsSaveBaseUpdate($goods_id, $params = []) { $data = Db::name('GoodsSpecBase')->field('min(price) AS min_price, max(price) AS max_price, sum(inventory) AS inventory, min(original_price) AS min_original_price, max(original_price) AS max_original_price')->where(['goods_id'=>$goods_id])->find(); if(empty($data)) @@ -1529,7 +1530,8 @@ class GoodsService $ret = EventReturnHandle(MyEventTrigger($hook_name, [ 'hook_name' => $hook_name, 'is_backend' => true, - 'goods_id' => $goods_id + 'goods_id' => $goods_id, + 'params' => $params, ])); if(isset($ret['code']) && $ret['code'] != 0) { diff --git a/public/static/admin/default/js/index.js b/public/static/admin/default/js/index.js index 4f1ecd951..116e4f9ba 100755 --- a/public/static/admin/default/js/index.js +++ b/public/static/admin/default/js/index.js @@ -1,5 +1,25 @@ +/** + * 顶部导航页面打开容器处理 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2022-10-21 + * @desc description + */ +function HeaderMenuPagesListHandle() +{ + if($('.header-menu-open-pages-list').length > 0) + { + var width = $('.admin-header .am-topbar-brand').width()+$('.admin-header .am-topbar-right').width()+215; + $('.header-menu-open-pages-list').css('width', $(window).width()-width); + } +} + $(function() { + // 处理顶部导航页面列表宽度 + HeaderMenuPagesListHandle(); + // 左侧菜单箭头方向回调处理 $('#admin-offcanvas li.admin-parent').on('open.collapse.amui', function() { @@ -183,6 +203,9 @@ $(function() $('header.admin-header').css({'left': '160px'}); } } + + // 处理顶部导航页面列表宽度 + HeaderMenuPagesListHandle(); }); // 页面切换 diff --git a/public/static/common/css/color/black.css b/public/static/common/css/color/black.css index 82dfec8cb..f908558af 100644 --- a/public/static/common/css/color/black.css +++ b/public/static/common/css/color/black.css @@ -11,7 +11,7 @@ html,body { } .am-table-hover > tbody > tr:hover > td, .am-table-hover > tbody > tr:hover > th { - background-color: #262727; + background-color: #181818; } .am-table-bordered > thead > tr > th, .am-table-bordered > tbody > tr > th, @@ -19,7 +19,7 @@ html,body { .am-table-bordered > thead > tr > td, .am-table-bordered > tbody > tr > td, .am-table-bordered > tfoot > tr > td { - border-left: 1px solid #4c4d4f; + border-left: 1px solid #232323; } .am-table > thead > tr > th, .am-table > tbody > tr > th, @@ -32,30 +32,34 @@ html,body { .form-table-fields-button-container, #inspect-upgrade-popup .upgrade-bottom-content, .form-inventory-submit { - border-top: 1px solid #4c4d4f; + border-top: 1px solid #232323; } .am-table > thead > tr > td { - border-bottom: 1px solid #4c4d4f !important; + border-bottom: 1px solid #232323 !important; } .am-popup, .popup-not-title .am-popup-inner { - border: 1px solid #4c4d4f; + border: 1px solid #232323; } .am-tagsinput, .data-list thead th { background-color: transparent; } -iframe, -.am-popup, -.admin-offcanvas-bar, .admin-offcanvas-bar .am-list > li, +.admin-offcanvas-bar, +.admin-offcanvas-bar .am-list > li, .am-popup-inner, .am-popup-bd, .am-panel, .am-list > li, .am-slider-default, .tree-list li .item-content, -.popup-not-title .am-popup-inner { - background-color: #141414; +.popup-not-title .am-popup-inner, +.form-legend-fixed, +.table-thead-beautify thead th { + background-color: #1d1d1d !important; +} +.admin-offcanvas-bar .am-list > li { + border-color: #222224; } .am-popup-hd, .am-panel > .am-panel-hd, @@ -72,6 +76,12 @@ iframe, border-color: transparent; background: transparent; } +.dl-content dt:hover, .dl-content dd:hover, .data-avg-text-list li:hover { + background: #202020; +} +.data-avg-text-list li:hover .data-avg-text-list-content { + color: #e9e9e9; +} .am-close, .am-popup-hd .am-popup-title, .am-popup-hd, @@ -95,8 +105,8 @@ ul.am-dropdown-content > li > a:focus { legend, ul.am-dropdown-content > li > a:hover, ul.am-dropdown-content > li > a:focus { - border-color: #999; - color: #f5f5f5; + border-color: #282828; + color: #a8a8a8; } .am-table > thead > tr > th, .am-form select, @@ -173,13 +183,14 @@ form.am-form .am-form-group, .forth-selection-list .forth-selection-items .forth-selection-content, .forth-selection-list .forth-selection-items .forth-selection-content li, .spec-inventory-list ul li:not(:last-child), -#package-upgrade-modal .am-scrollable-vertical { - border-color: #4c4d4f; +#package-upgrade-modal .am-scrollable-vertical, +.product-container table tbody tr td select, .product-container table tbody tr td textarea, .product-container table tbody tr td input[type="text"], .product-container table tbody tr td input[type="password"], .product-container table tbody tr td input[type="datetime"], .product-container table tbody tr td input[type="datetime-local"], .product-container table tbody tr td input[type="date"], .product-container table tbody tr td input[type="month"], .product-container table tbody tr td input[type="time"], .product-container table tbody tr td input[type="week"], .product-container table tbody tr td input[type="number"], .product-container table tbody tr td input[type="email"], .product-container table tbody tr td input[type="url"], .product-container table tbody tr td input[type="search"], .product-container table tbody tr td input[type="tel"], .product-container table tbody tr td input[type="color"] { + border-color: #232323; } .am-nav > li.am-active > a, .am-nav > li.am-active > a:hover, .am-nav > li.am-active > a:focus { - background: #4c4d4f; + background: #232323; } .am-nav > li > a:hover, .am-nav > li > a:focus, @@ -202,7 +213,7 @@ form.am-form .am-form-group, .coupon-content-module .module-items, #inspect-upgrade-popup .upgrade-bottom-content, .form-inventory-submit { - background: #252525; + background: #1e1e1e; } .business-operations-submit:hover, .plug-file-upload-submit:hover, @@ -213,7 +224,7 @@ hr, .am-divider-default, .am-divider-dashed, .am-divider-dashed { - border-color: #4c4d4f; + border-color: #232323; } .am-img-thumbnail { background-color: #484848; @@ -305,7 +316,7 @@ table.am-table .am-btn-default, .chosen-container-single .chosen-single, .chosen-container-multi .chosen-choices { background-color: transparent; - color: #f5f5f5 !important; + color: #888 !important; } .chosen-container.chosen-with-drop .chosen-drop { background: #1d1e1f; @@ -323,7 +334,7 @@ table.am-table .am-btn-default, .am-selected-list li:hover, .admin-multilingual-select, .common-nav-bar { - background: #262727; + background: #262727 !important; } .chosen-container-single .chosen-drop .result-selected, .chosen-container-multi .chosen-drop .result-selected { @@ -339,15 +350,43 @@ table.am-table .am-btn-default, -webkit-box-shadow: none; box-shadow: none; } +.chosen-container-active.chosen-with-drop .chosen-single { + -webkit-box-shadow: none; + box-shadow: none; +} +.not-product-detail-list-tips i, +.not-product-detail-list-tips p, +.not-product-detail-list-tips a, +.table-no > i, +.table-no > p { + color: #353535 !important; +} +.am-text-primary, +.am-text-success, +.am-text-secondary, +.am-text-warning, +.am-btn, +.am-badge, +.right-operate .echarts-where-submit:hover, +.am-switch .am-switch-handle-on.am-switch-success, .am-switch .am-switch-handle-off.am-switch-success { + opacity: 0.5; +} +.am-icon-btn, +.am-popover.am-active { + opacity: 0.8; +} .am-page-loading, -.multilingual-page-loading, .chosen-container-multi .chosen-choices li.search-choice .search-choice-close, .am-tagsinput .am-badge-primary { - background: #333; + background: #171717; } .am-table-scrollable-horizontal { - border: 1px solid #4c4d4f; + border: 1px solid #232323; } +.am-pagination > li > a:hover, .am-pagination > li > span:hover, .am-pagination > li > a:focus, .am-pagination > li > span:focus { + background-color: #5e5e5e; +} +iframe, .am-table-scrollable-horizontal .am-table tr th, .form-table-search, .am-table-scrollable-horizontal .am-table tr td.am-grid-fixed-left, @@ -401,7 +440,8 @@ ul.am-dropdown-content > li > a, .plug-file-upload-submit:hover, .content-right [class*="-content"] .nav-items:hover, .chosen-container-single .chosen-default, -.chosen-container-multi .chosen-choices li.search-field input[type="text"] { +.chosen-container-multi .chosen-choices li.search-field input[type="text"], +.am-modal-dialog .am-modal-hd { color: #999 !important; } .admin-multilingual-select, @@ -414,8 +454,7 @@ table.am-table .am-btn-secondary, table.am-table .am-btn-success, table.am-table .am-btn-warning, table.am-table .am-btn-danger, -.table-no, -.table-thead-beautify thead th { +.table-no { background: transparent; } .am-alert, @@ -442,7 +481,7 @@ ul.am-dropdown-content { color: #f5f5f5; } form.am-form .am-form-group:hover, .plug-file-upload-view:hover { - background: #262727; + background: #1c1c1c; } form.am-form .am-form-group-refreshing:hover { background: none; @@ -459,7 +498,7 @@ form.am-form .am-form-group-refreshing:hover { .am-btn-default.am-active, .am-dropdown.am-active .am-btn-default.am-dropdown-toggle, button.colorpicker-submit:hover { - border: 1px solid #999; + border: 1px solid #353535; } button.colorpicker-submit:hover, .am-tagsinput .tag [data-role="remove"]:hover { @@ -560,9 +599,10 @@ header { } .admin-sidebar-sub li { background: #262626 !important; - border-color: #323232 !important; + border-color: #1d1d1d !important; } -.common-left-menu-active { +.common-left-menu-active, +.menu-mini-container-popup ul li a.common-left-menu-active { background: #19222c !important; } .base-content-top .vip-active { @@ -610,9 +650,160 @@ header { .admin-login { background: rgba(0,0,0,.85); } +ul.plug-file-upload-view li { + border-color: #383838; +} +.admin-nav-bar, +.index-multilingual-select { + background-color: #212121; + box-shadow: 0 0 15px rgb(0 0 0 / 50%); +} +.am-icon-btn:hover, .am-icon-btn:focus { + background-color: #494949; +} +#modal-plugins-multilingual-select-container .am-modal-bd ul { + border: 1px solid #2b2b2b; +} + /** * 编辑器还是使用白底色 */ .edui-default iframe { background: transparent !important; +} + +/** + * 进销存 + */ +.stats-base li:nth-child(1) .li-content, .stats-base li:nth-child(1) .item-content { + background: rgb(0 142 255 / 30%); +} +.stats-base li:nth-child(2) .li-content, .stats-base li:nth-child(2) .item-content { + background: rgb(255 152 0 / 30%); +} +.stats-base li:nth-child(3) .li-content, .stats-base li:nth-child(3) .item-content { + background: rgb(230 58 117 / 30%); +} +.stats-base li:nth-child(4) .li-content, .stats-base li:nth-child(4) .item-content { + background: rgb(156 64 172 / 30%); +} +.stats-base li:nth-child(5) .li-content, .stats-base li:nth-child(5) .item-content { + background: rgb(244 67 54 / 30%); +} +.stats-base li:nth-child(6) .li-content, .stats-base li:nth-child(6) .item-content { + background: rgb(61 169 61 / 30%); +} +.stats-base li:nth-child(7) .li-content, .stats-base li:nth-child(7) .item-content { + background: rgb(0 188 212 / 30%); +} +.stats-base li:nth-child(8) .li-content, .stats-base li:nth-child(8) .item-content { + background: rgb(255 87 34 / 30%); +} +.stats-base li:nth-child(9) .li-content, .stats-base li:nth-child(9) .item-content { + background: rgb(121 85 72 / 30%); +} +.stats-base li:nth-child(10) .li-content, .stats-base li:nth-child(10) .item-content { + background: rgb(63 81 181 / 30%); +} +.stats-base li:nth-child(11) .li-content, .stats-base li:nth-child(11) .item-content { + background: rgb(255 193 7 / 30%); +} +.stats-base li:nth-child(12) .li-content, .stats-base li:nth-child(12) .item-content { + background: rgb(1 176 255 / 30%); +} +.product-container-fixed-operate table thead tr > th:last-child, +.product-container-fixed-operate table thead tr > th:last-child, .product-container-fixed-operate table tbody tr > td:last-child { + background: rgb(20 20 20); +} +.stats-base li .name > p, +.stats-base li .li-content .total { + color: #888; +} +.admin-header { + -webkit-box-shadow: 0 1px 2px #25303c; + box-shadow: 0 1px 2px #25303c; +} +.form-bottom-nav-fixed { + background: #242424; + border-top: 1px solid #2b2b2b; +} +.admin-sidebar-list li a { + color: #676767; +} +.menu-mini-container-popup ul li a, +.admin-sidebar-list li a:hover, +.common-left-menu-active { + color: #c6c6c6 !important; +} +.header-menu-open-pages-list ul li { + border-color: #3d3d3d; +} +.header-menu-open-pages-list ul li.am-active { + color: #506cb1; + border-color: #5873b4; +} +.header-menu-open-pages-list ul li.am-active a, +.header-menu-open-pages-list ul li a:hover { + color: #802c12; +} +.product-unit-table thead tr > th:last-child, .product-unit-table tbody tr > td:last-child { + background: rgb(30 30 30); + box-shadow: rgb(136 136 136 / 10%) -5px 0px 8px; +} +.position-data-list { + border-color: #292929; +} +.menu-mini-container-popup { + background: #36373c; +} +.menu-mini-container-popup .mui-mbar-tab-tip { + color: #36373c; +} +.admin-header .am-topbar-nav > li > a:hover, .admin-header .am-topbar-nav > li > a:focus, .admin-header .am-topbar-nav > li.am-active > a { + background-color: rgba(0, 0, 0, 0.05); + color: #b2b2b2 !important; +} +.am-list > li > a, +.am-topbar-inverse .am-topbar-nav > li > a { + color: #666; +} +.menu-scaling-submit { + color: #c2c2c2; +} +.am-modal-dialog { + box-shadow: rgb(62 62 62 / 60%) 0px 0px 10px; +} +#modal-unit-list .am-selected-list li:not(:last-child) { + border-bottom: 1px solid #222222; +} +@media only screen and (max-width: 640px) { + .admin-offcanvas-bar:after { + background: #2c2c2c; + } +} + +/** + * 滚动条样式 + */ +::-webkit-scrollbar-track-piece { + background-color: #191919; +} +::-webkit-scrollbar-track-piece { + border-top: 1px solid rgba(0,0,0,.01); +} +::-webkit-scrollbar-thumb, +::-webkit-scrollbar-thumb:vertical { + background-color: #353535; +} +::-webkit-scrollbar-thumb:hover, +::-webkit-scrollbar-thumb:vertical:hover { + background-color: #444; +} +::-webkit-scrollbar-corner, +::-webkit-scrollbar-corner:vertical { + background-color: #f9f9f9; +} +::-webkit-scrollbar-resizer, +::-webkit-scrollbar-resizer:vertical { + background-color: #ff6e00; } \ No newline at end of file diff --git a/public/static/common/css/common.css b/public/static/common/css/common.css index 3eb3d6e52..317f0d0ef 100755 --- a/public/static/common/css/common.css +++ b/public/static/common/css/common.css @@ -974,6 +974,39 @@ button.colorpicker-submit img { background: #fafafa; display: block; } +.am-page-loading>div { + display: inline-block; + width: 8px; + height: 20px; + background: #03a9f4; + border-radius: 5px; + animation: am-page-loading 0.3s ease-in-out infinite alternate; +} +.am-page-loading>div:nth-child(2) { + animation-delay: 0.2s; + background: #f44336; +} +.am-page-loading>div:nth-child(3) { + animation-delay: 0.4s; + background: #9c27b0; +} +.am-page-loading>div:nth-child(4) { + animation-delay: 0.6s; + background: #009688; +} +.am-page-loading>div:nth-child(5) { + animation-delay: 0.8s; + background: #ff9800; +} +@keyframes am-page-loading { + from { + transform: scaleY(1); + } + to { + transform: scaleY(1.5); + background: lightblue; + } +} /** * 表格-基础样式