From 05d342339fdee2bbc27c762798ef521b69fa31bb Mon Sep 17 00:00:00 2001 From: Devil Date: Sun, 16 May 2021 23:03:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=94=A8=E6=88=B7=E9=9A=90?= =?UTF-8?q?=E7=A7=81=E6=94=BF=E7=AD=96=E3=80=81=E5=8A=A8=E6=80=81=E8=A1=A8?= =?UTF-8?q?=E6=A0=BC=E5=B1=82=E7=BA=A7=E6=A0=B7=E5=BC=8F=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 --- application/admin/controller/Agreement.php | 13 ++ .../admin/view/default/agreement/nav.html | 14 +- .../admin/view/default/agreement/privacy.html | 33 +++ .../view/default/agreement/register.html | 2 +- .../view/default/useraddress/save_info.html | 2 + application/index/controller/Agreement.php | 5 + .../index/view/default/agreement/index.html | 20 +- .../view/default/public/header_top_nav.html | 2 +- .../index/view/default/user/reg_info.html | 8 +- .../view/default/useraddress/save_info.html | 2 + application/service/ConfigService.php | 1 + application/service/OrderService.php | 17 +- application/service/ResourcesService.php | 8 +- application/service/UserAddressService.php | 34 +-- application/tags.php | 214 ++++++++++++++++++ changelog.txt | 21 ++ config/app.php | 2 +- .../static/admin/default/css/useraddress.css | 24 ++ public/static/common/css/common.css | 16 +- public/static/common/js/common.js | 21 +- .../lib/colorpicker/jquery.colorpicker.js | 24 +- public/static/index/default/css/common.css | 10 +- 22 files changed, 419 insertions(+), 74 deletions(-) create mode 100644 application/admin/view/default/agreement/privacy.html create mode 100644 public/static/admin/default/css/useraddress.css diff --git a/application/admin/controller/Agreement.php b/application/admin/controller/Agreement.php index 9490ccb36..1bea9e1ab 100644 --- a/application/admin/controller/Agreement.php +++ b/application/admin/controller/Agreement.php @@ -57,6 +57,19 @@ class Agreement extends Common // 编辑器文件存放地址 $this->assign('editor_path_type', ResourcesService::EditorPathTypeValue('agreement')); + // 导航数据 + $nav_data = [ + [ + 'name' => '用户注册协议', + 'type' => 'register', + ], + [ + 'name' => '用户隐私政策', + 'type' => 'privacy', + ] + ]; + $this->assign('nav_data', $nav_data); + // 导航/视图 $nav_type = input('nav_type', 'register'); $this->assign('nav_type', $nav_type); diff --git a/application/admin/view/default/agreement/nav.html b/application/admin/view/default/agreement/nav.html index aa7469616..5b5902624 100644 --- a/application/admin/view/default/agreement/nav.html +++ b/application/admin/view/default/agreement/nav.html @@ -1,5 +1,11 @@ \ No newline at end of file + {{foreach $nav_data as $v}} +
  • + {{$v.name}} +
  • + {{/foreach}} + +
    + +

    前端访问协议地址增加参数 is_content=0 则仅展示纯协议内容

    +
    \ No newline at end of file diff --git a/application/admin/view/default/agreement/privacy.html b/application/admin/view/default/agreement/privacy.html new file mode 100644 index 000000000..67d59225e --- /dev/null +++ b/application/admin/view/default/agreement/privacy.html @@ -0,0 +1,33 @@ +{{include file="public/header" /}} + + +
    + + {{include file="agreement/nav" /}} + + +
    + +
    +
    +
    + + 查看详情 +
    + +
    +
    + + + + +
    +
    + +
    +
    + + + +{{include file="public/footer" /}} + \ No newline at end of file diff --git a/application/admin/view/default/agreement/register.html b/application/admin/view/default/agreement/register.html index 76d30195f..dae202c91 100644 --- a/application/admin/view/default/agreement/register.html +++ b/application/admin/view/default/agreement/register.html @@ -8,7 +8,7 @@
    -
    +
    diff --git a/application/admin/view/default/useraddress/save_info.html b/application/admin/view/default/useraddress/save_info.html index 775e97502..951e16e1d 100644 --- a/application/admin/view/default/useraddress/save_info.html +++ b/application/admin/view/default/useraddress/save_info.html @@ -79,6 +79,7 @@ {{/if}} + ×
    +上传人像面图片
    @@ -90,6 +91,7 @@ {{/if}} + ×
    +上传国微面图片
    diff --git a/application/index/controller/Agreement.php b/application/index/controller/Agreement.php index 5a9587247..6996f713a 100644 --- a/application/index/controller/Agreement.php +++ b/application/index/controller/Agreement.php @@ -62,6 +62,11 @@ class Agreement extends Common } $data = $ret['data']; } + + // 是否隐藏头尾、默认显示 + $is_content = isset($params['is_content']) ? intval($params['is_content']) : 1; + $this->assign('is_header', $is_content); + $this->assign('is_footer', $is_content); $this->assign('data', $data); return $this->fetch(); } diff --git a/application/index/view/default/agreement/index.html b/application/index/view/default/agreement/index.html index ba4345cfd..e02017174 100644 --- a/application/index/view/default/agreement/index.html +++ b/application/index/view/default/agreement/index.html @@ -1,16 +1,20 @@ {{include file="public/header" /}} - -{{include file="public/header_top_nav" /}} + +{{if isset($is_header) and $is_header eq 1}} + + {{include file="public/header_top_nav" /}} - -{{include file="public/nav_search" /}} + + {{include file="public/nav_search" /}} - -{{include file="public/header_nav" /}} + + {{include file="public/header_nav" /}} - -{{include file="public/goods_category" /}} + + {{include file="public/goods_category" /}} +{{/if}} +
    diff --git a/application/index/view/default/public/header_top_nav.html b/application/index/view/default/public/header_top_nav.html index c9f8dc88e..11240ce68 100755 --- a/application/index/view/default/public/header_top_nav.html +++ b/application/index/view/default/public/header_top_nav.html @@ -137,4 +137,4 @@
    - \ No newline at end of file diff --git a/application/index/view/default/user/reg_info.html b/application/index/view/default/user/reg_info.html index 6841c84ba..494937e6a 100755 --- a/application/index/view/default/user/reg_info.html +++ b/application/index/view/default/user/reg_info.html @@ -103,9 +103,11 @@ {{if MyC('home_is_enable_userregister_agreement') eq 1}}
    《服务协议》 + + 《隐私政策》
    {{/if}} @@ -149,7 +151,7 @@ {{if MyC('home_is_enable_userregister_agreement') eq 1}}
    《服务协议》
    @@ -195,7 +197,7 @@ {{if MyC('home_is_enable_userregister_agreement') eq 1}}
    《服务协议》
    diff --git a/application/index/view/default/useraddress/save_info.html b/application/index/view/default/useraddress/save_info.html index 02697ee3e..9669ce6c5 100755 --- a/application/index/view/default/useraddress/save_info.html +++ b/application/index/view/default/useraddress/save_info.html @@ -59,6 +59,7 @@ {{/if}} + ×
    +上传人像面图片
    @@ -70,6 +71,7 @@ {{/if}} + ×
    +上传国微面图片
    diff --git a/application/service/ConfigService.php b/application/service/ConfigService.php index 649495c65..60b289f31 100755 --- a/application/service/ConfigService.php +++ b/application/service/ConfigService.php @@ -32,6 +32,7 @@ class ConfigService 'home_email_user_email_binding', 'home_site_close_reason', 'common_agreement_userregister', + 'common_agreement_userprivacy', 'common_self_extraction_address', 'home_index_floor_top_right_keywords', 'home_index_floor_manual_mode_goods', diff --git a/application/service/OrderService.php b/application/service/OrderService.php index 928eeb4e0..adb11cc33 100755 --- a/application/service/OrderService.php +++ b/application/service/OrderService.php @@ -207,6 +207,21 @@ class OrderService } } + // 是否指定同步回调地址 + if(!empty($params['redirect_url'])) + { + $redirect_url = base64_decode(urldecode($params['redirect_url'])); + if(!empty($redirect_url)) + { + // 赋值同步返回地址 + $call_back_url = $redirect_url; + } + } + if(empty($redirect_url)) + { + $redirect_url = MyUrl('index/order/index'); + } + // 新增支付日志 $pay_log = self::OrderPayLogInsert([ 'user_id' => $params['user']['id'], @@ -235,7 +250,7 @@ class OrderService 'client_type' => $client_type, 'notify_url' => $url.'_notify.php', 'call_back_url' => $call_back_url, - 'redirect_url' => MyUrl('index/order/index'), + 'redirect_url' => $redirect_url, 'site_name' => MyC('home_site_name', 'ShopXO', true), 'ajax_url' => MyUrl('index/order/paycheck'), ]; diff --git a/application/service/ResourcesService.php b/application/service/ResourcesService.php index 0b8716c2d..303d9a08d 100755 --- a/application/service/ResourcesService.php +++ b/application/service/ResourcesService.php @@ -65,7 +65,7 @@ class ResourcesService /** * 附件路径处理 - * @author Devil + * @author Devil * @blog http://gong.gg/ * @version 1.0.0 * @date 2018-12-12 @@ -89,12 +89,12 @@ class ResourcesService /** * 附件集合处理 - * @author Devil + * @author Devil * @blog http://gong.gg/ * @version 1.0.0 * @date 2018-08-07 * @desc description - * @param [array] $params [输入参数] + * @param [array] $params [输入参数] * @param [array] $data [字段列表] */ public static function AttachmentParams($params, $data) @@ -117,7 +117,7 @@ class ResourcesService * @blog http://gong.gg/ * @version 1.0.0 * @datetime 2019-01-13T15:13:30+0800 - * @param [type] $value [description] + * @param [string] $value [description] */ public static function AttachmentPathViewHandle($value) { diff --git a/application/service/UserAddressService.php b/application/service/UserAddressService.php index c987009ba..dd1a2d613 100644 --- a/application/service/UserAddressService.php +++ b/application/service/UserAddressService.php @@ -362,37 +362,15 @@ class UserAddressService 'city' => intval($params['city']), 'county' => isset($params['county']) ? intval($params['county']) : 0, 'address' => $params['address'], + 'lng' => isset($params['lng']) ? floatval($params['lng']) : 0, + 'lat' => isset($params['lat']) ? floatval($params['lat']) : 0 , + 'idcard_name' => empty($params['idcard_name']) ? '' : $params['idcard_name'], + 'idcard_number' => empty($params['idcard_number']) ? '' : $params['idcard_number'], + 'idcard_front' => $attachment['data']['idcard_front'], + 'idcard_back' => $attachment['data']['idcard_back'], 'is_default' => $is_default, ]; - // 坐标 - if(!empty($params['lng']) && $params['lng'] != 0) - { - $data['lng'] = floatval($params['lng']); - } - if(!empty($params['lat']) && $params['lat'] != 0) - { - $data['lat'] = floatval($params['lat']); - } - - // 身份证信息 - if(!empty($params['idcard_name'])) - { - $data['idcard_name'] = $params['idcard_name']; - } - if(!empty($params['idcard_number'])) - { - $data['idcard_number'] = $params['idcard_number']; - } - if(!empty($attachment['data']['idcard_front'])) - { - $data['idcard_front'] = $attachment['data']['idcard_front']; - } - if(!empty($attachment['data']['idcard_back'])) - { - $data['idcard_back'] = $attachment['data']['idcard_back']; - } - // 用户地址保存前钩子 $hook_name = 'plugins_service_user_address_save_begin'; $ret = HookReturnHandle(Hook::listen($hook_name, [ diff --git a/application/tags.php b/application/tags.php index 975bac18d..a7758872a 100755 --- a/application/tags.php +++ b/application/tags.php @@ -32,5 +32,219 @@ return array ( 'log_write' => array ( ), + 'plugins_admin_css' => + array ( + 0 => 'app\\plugins\\shop\\Hook', + ), + 'plugins_css' => + array ( + 0 => 'app\\plugins\\shop\\Hook', + 1 => 'app\\plugins\\excellentbuyreturntocash\\Hook', + 2 => 'app\\plugins\\coupon\\Hook', + 3 => 'app\\plugins\\distribution\\Hook', + ), + 'plugins_js' => + array ( + 0 => 'app\\plugins\\shop\\Hook', + 1 => 'app\\plugins\\coupon\\Hook', + 2 => 'app\\plugins\\distribution\\Hook', + ), + 'plugins_service_navigation_header_handle' => + array ( + 0 => 'app\\plugins\\shop\\Hook', + 1 => 'app\\plugins\\coupon\\Hook', + ), + 'plugins_service_users_center_left_menu_handle' => + array ( + 0 => 'app\\plugins\\shop\\Hook', + 1 => 'app\\plugins\\excellentbuyreturntocash\\Hook', + 2 => 'app\\plugins\\coupon\\Hook', + 3 => 'app\\plugins\\distribution\\Hook', + ), + 'plugins_service_header_navigation_top_right_handle' => + array ( + 0 => 'app\\plugins\\shop\\Hook', + 1 => 'app\\plugins\\excellentbuyreturntocash\\Hook', + 2 => 'app\\plugins\\coupon\\Hook', + 3 => 'app\\plugins\\distribution\\Hook', + ), + 'plugins_service_goods_save_handle' => + array ( + 0 => 'app\\plugins\\shop\\Hook', + ), + 'plugins_service_editor_path_type_admin_goods_saveinfo' => + array ( + 0 => 'app\\plugins\\shop\\Hook', + ), + 'plugins_view_goods_detail_right_content_bottom' => + array ( + 0 => 'app\\plugins\\shop\\Hook', + ), + 'plugins_view_goods_detail_base_bottom' => + array ( + 0 => 'app\\plugins\\shop\\Hook', + ), + 'plugins_view_goods_detail_base_buy_nav_min_inside_begin' => + array ( + 0 => 'app\\plugins\\shop\\Hook', + ), + 'plugins_service_warehouse_handle_end' => + array ( + 0 => 'app\\plugins\\shop\\Hook', + ), + 'plugins_service_buy_handle' => + array ( + 0 => 'app\\plugins\\shop\\Hook', + ), + 'plugins_service_buy_order_insert_begin' => + array ( + 0 => 'app\\plugins\\shop\\Hook', + 1 => 'app\\plugins\\excellentbuyreturntocash\\Hook', + ), + 'plugins_service_buy_order_insert_end' => + array ( + 0 => 'app\\plugins\\shop\\Hook', + 1 => 'app\\plugins\\excellentbuyreturntocash\\Hook', + 2 => 'app\\plugins\\distribution\\Hook', + ), + 'plugins_service_order_status_change_history_success_handle' => + array ( + 0 => 'app\\plugins\\shop\\Hook', + 1 => 'app\\plugins\\excellentbuyreturntocash\\Hook', + 2 => 'app\\plugins\\coupon\\Hook', + 3 => 'app\\plugins\\distribution\\Hook', + ), + 'plugins_service_order_aftersale_audit_handle_end' => + array ( + 0 => 'app\\plugins\\shop\\Hook', + 1 => 'app\\plugins\\excellentbuyreturntocash\\Hook', + 2 => 'app\\plugins\\distribution\\Hook', + ), + 'plugins_view_admin_goods_save' => + array ( + 0 => 'app\\plugins\\shop\\Hook', + ), + 'plugins_service_goods_handle_end' => + array ( + 0 => 'app\\plugins\\shop\\Hook', + 1 => 'app\\plugins\\distribution\\Hook', + ), + 'plugins_module_form_admin_goods_index' => + array ( + 0 => 'app\\plugins\\shop\\Hook', + ), + 'plugins_module_form_admin_goods_detail' => + array ( + 0 => 'app\\plugins\\shop\\Hook', + ), + 'plugins_service_goods_buy_nav_button_handle' => + array ( + 0 => 'app\\plugins\\shop\\Hook', + ), + 'plugins_view_goods_detail_panel_bottom' => + array ( + 0 => 'app\\plugins\\excellentbuyreturntocash\\Hook', + 1 => 'app\\plugins\\coupon\\Hook', + ), + 'plugins_view_goods_detail_title' => + array ( + 0 => 'app\\plugins\\excellentbuyreturntocash\\Hook', + ), + 'plugins_view_buy_group_goods_inside_bottom' => + array ( + 0 => 'app\\plugins\\coupon\\Hook', + ), + 'plugins_service_buy_group_goods_handle' => + array ( + 0 => 'app\\plugins\\coupon\\Hook', + ), + 'plugins_view_buy_form_inside' => + array ( + 0 => 'app\\plugins\\coupon\\Hook', + ), + 'plugins_service_buy_order_insert_success' => + array ( + 0 => 'app\\plugins\\coupon\\Hook', + ), + 'plugins_service_user_register_end' => + array ( + 0 => 'app\\plugins\\coupon\\Hook', + ), + 'plugins_service_base_data_return_api_goods_detail' => + array ( + 0 => 'app\\plugins\\coupon\\Hook', + ), + 'plugins_service_base_data_return_api_buy_index' => + array ( + 0 => 'app\\plugins\\coupon\\Hook', + ), + 'plugins_view_admin_goods_list_operate' => + array ( + 0 => 'app\\plugins\\intellectstools\\Hook', + ), + 'plugins_view_admin_order_list_operate' => + array ( + 0 => 'app\\plugins\\intellectstools\\Hook', + ), + 'plugins_service_site_extraction_address_list' => + array ( + 0 => 'app\\plugins\\distribution\\Hook', + ), + 'plugins_service_goods_spec_extends_handle' => + array ( + 0 => 'app\\plugins\\distribution\\Hook', + ), + 'plugins_view_admin_user_save' => + array ( + 0 => 'app\\plugins\\distribution\\Hook', + ), + 'plugins_service_user_save_handle' => + array ( + 0 => 'app\\plugins\\distribution\\Hook', + ), + 'plugins_service_goods_spec_base' => + array ( + 0 => 'app\\plugins\\distribution\\Hook', + ), + 'plugins_view_goods_detail_panel_price_top' => + array ( + 0 => 'app\\plugins\\distribution\\Hook', + ), + 'plugins_module_form_admin_user_index' => + array ( + 0 => 'app\\plugins\\distribution\\Hook', + ), + 'plugins_module_form_admin_user_detail' => + array ( + 0 => 'app\\plugins\\distribution\\Hook', + ), + 'plugins_service_quick_navigation_pc' => + array ( + 0 => 'app\\plugins\\distribution\\Hook', + ), + 'plugins_service_quick_navigation_h5' => + array ( + 0 => 'app\\plugins\\distribution\\Hook', + ), + 'plugins_service_quick_navigation_weixin' => + array ( + 0 => 'app\\plugins\\distribution\\Hook', + ), + 'plugins_service_quick_navigation_alipay' => + array ( + 0 => 'app\\plugins\\distribution\\Hook', + ), + 'plugins_service_quick_navigation_baidu' => + array ( + 0 => 'app\\plugins\\distribution\\Hook', + ), + 'plugins_service_quick_navigation_qq' => + array ( + 0 => 'app\\plugins\\distribution\\Hook', + ), + 'plugins_service_quick_navigation_toutiao' => + array ( + 0 => 'app\\plugins\\distribution\\Hook', + ), ); ?> \ No newline at end of file diff --git a/changelog.txt b/changelog.txt index cff997959..c1d381144 100755 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,24 @@ ++=========================================================+ + ShopXO 2.0.3 Release 000000 http://shopxo.net ++=========================================================+ +全局 + 1. + +web端 + 1. 系统更新+插件更新优化 + 2. 支付宝支付金额兼容性优化、支持异步返回 + 3. 后台左侧菜单宽度调整 + 4. 插件/主题打包新增版本号 + 5. 商品编辑优化 + 6. api接口新增更多配置信息 + 7. 用户注册新增用户隐私协议 + +插件 + 1. 优购返现插件新增按照订单金额返券 + 2. 优惠券插件修复web端未登录点击领取无响应 + 3. 新增智能工具箱插件 + + +=========================================================+ ShopXO 2.0.2 Release 20210426 http://shopxo.net +=========================================================+ diff --git a/config/app.php b/config/app.php index 726db50bb..6d3a2b114 100755 --- a/config/app.php +++ b/config/app.php @@ -19,7 +19,7 @@ return [ // 应用地址 'app_host' => '', // 应用调试模式 - 'app_debug' => false, + 'app_debug' => true, // 应用Trace 'app_trace' => false, // 是否支持多模块 diff --git a/public/static/admin/default/css/useraddress.css b/public/static/admin/default/css/useraddress.css new file mode 100644 index 000000000..506e1acae --- /dev/null +++ b/public/static/admin/default/css/useraddress.css @@ -0,0 +1,24 @@ +/** + * 地址添加/编辑 + */ +.user-address-idcard-images ul li { + margin: 0; +} +@media only screen and (min-width: 641px) { + .user-address-idcard-images ul li, + .user-address-idcard-images .plug-file-upload-submit { + width: 200px; + } + .user-address-idcard-images ul li { + height: 132px; + } +} +@media only screen and (max-width: 641px) { + .user-address-idcard-images ul li, + .user-address-idcard-images .plug-file-upload-submit { + width: 128px; + } + .user-address-idcard-images ul li { + height: 85px; + } +} \ No newline at end of file diff --git a/public/static/common/css/common.css b/public/static/common/css/common.css index d85a9f552..d7a1b6d3d 100755 --- a/public/static/common/css/common.css +++ b/public/static/common/css/common.css @@ -97,7 +97,8 @@ form.am-form .am-form-group-refreshing, .plug-file-upload-view { border-bottom: -webkit-box-shadow: 0 0 30px rgba(0,0,0,0.4); box-shadow: 0 0 30px rgba(0,0,0,0.4); } -.popup-not-title .am-close { +.popup-not-title .am-close, +.modal-dialog-not-title .am-close { position: absolute; right: 10px; top: 10px; @@ -112,7 +113,12 @@ form.am-form .am-form-group-refreshing, .plug-file-upload-view { border-bottom: height: 32px; z-index: 1; } -.popup-not-title .am-close:hover { +.modal-dialog-not-title .am-close { + top: -15px; + right: -15px; +} +.popup-not-title .am-close:hover, +.modal-dialog-not-title .am-close:hover { background: #f22a30; } .am-popup-hd .am-close, .am-popup-hd .am-full { @@ -585,7 +591,7 @@ button.colorpicker-submit img { background: #e8e6e6; min-width: 100px; position: sticky; - z-index: 1011; + z-index: 1; top: 0; } .am-table-scrollable-horizontal .am-table tr .am-grid-xxxl { @@ -621,11 +627,11 @@ button.colorpicker-submit img { .am-table-scrollable-horizontal .am-table tr td.am-grid-fixed-left, .am-table-scrollable-horizontal .am-table tr td.am-grid-fixed-right { background: #fff; - z-index: 1011; + z-index: 1; } .am-table-scrollable-horizontal .am-table tr th.am-grid-fixed-left, .am-table-scrollable-horizontal .am-table tr th.am-grid-fixed-right { - z-index: 1012; + z-index: 2; } .am-table-scrollable-horizontal .am-table tr .am-grid-fixed-left { -webkit-box-shadow: 1px 0px 1px #ddd; diff --git a/public/static/common/js/common.js b/public/static/common/js/common.js index 3618b24a6..52963c859 100755 --- a/public/static/common/js/common.js +++ b/public/static/common/js/common.js @@ -2556,16 +2556,27 @@ $(function() fillcolor:true, success:function(o, color) { - var style = o.context.dataset.colorStyle || 'color'; - $(o.context.dataset.inputTag).css(style, color); + var style_arr = (o.context.dataset.colorStyle || 'color').split('|'); + var style_value = {}; + for(var i in style_arr) + { + style_value[style_arr[i]] = color; + } + $(o.context.dataset.inputTag).css(style_value); $(o.context.dataset.colorTag).val(color); $(o.context.dataset.colorTag).trigger('change'); }, reset:function(o) { - var style = o.context.dataset.colorStyle || 'color'; - $(o.context.dataset.inputTag).css(style, ''); - $(o.context.dataset.colorTag).val(''); + var color = ''; + var style_arr = (o.context.dataset.colorStyle || 'color').split('|'); + var style_value = {}; + for(var i in style_arr) + { + style_value[style_arr[i]] = color; + } + $(o.context.dataset.inputTag).css(style_value); + $(o.context.dataset.colorTag).val(color); $(o.context.dataset.colorTag).trigger('change'); } }); diff --git a/public/static/common/lib/colorpicker/jquery.colorpicker.js b/public/static/common/lib/colorpicker/jquery.colorpicker.js index 45dce328c..cd2be263c 100755 --- a/public/static/common/lib/colorpicker/jquery.colorpicker.js +++ b/public/static/common/lib/colorpicker/jquery.colorpicker.js @@ -15,13 +15,21 @@ return this.each(function(){ var obj = $(this); obj.bind(opts.event,function(){ - //定位 + // 上、左距离、浮动类型处理 + var top_inc = parseInt($(this).data('top-inc')) || 0; + var top_dec = parseInt($(this).data('top-dec')) || 0; + var left_inc = parseInt($(this).data('left-inc')) || 0; + var left_dec = $(this).data('left-inc') == undefined ? 1 : parseInt($(this).data('left-dec')) || 0; + var position = $(this).data('position') || 'absolute'; + + // 定位 var ttop = $(this).offset().top; //控件的定位点高 - var thei = $(this).height(); //控件本身的高 + var thei = $(this).outerHeight(); //控件本身的高 var tleft = $(this).offset().left+$(this).outerWidth()-232; //控件的定位点宽 $("#colorpanel").css({ - top:ttop+thei+16, - left:tleft + "top":ttop+thei+top_inc-top_dec, + "left":tleft+left_inc-left_dec, + "position":position }).show(); var target = opts.target ? $(opts.target) : obj; if(target.data("color") == null){ @@ -82,12 +90,12 @@ } } } - colorTable='' + colorTable='
    ' +'
    ' +'' - +'' - +'
    确定 | 关闭 | 清除
    ' - +'' + +'' + +'
    确定 | 关闭 | 清除
    ' + +'' +colorTable+'
    '; $("#colorpanel").html(colorTable); $("#_cclose").on('click',function(){ diff --git a/public/static/index/default/css/common.css b/public/static/index/default/css/common.css index 286360c9e..c660d9f5d 100755 --- a/public/static/index/default/css/common.css +++ b/public/static/index/default/css/common.css @@ -98,7 +98,7 @@ input.add,input.min{width:15px} .mobile-navigation li.active a{ color:#d2364c; } .hot-icon { position: absolute; top: 1%; left: 53%; z-index: 2; border: 1px solid #fff; } -@media only screen and (min-width: 640px) { +@media only screen and (min-width: 641px) { .am-container {padding-left:0px;padding-right:0px ;} .nav-search{background: #fff; margin: 20px 0 5px 0;} .header-top { display:block;} @@ -455,7 +455,7 @@ ul.am-dropdown-content > .am-active > a:focus, margin-top: 0; } } -@media only screen and (max-width: 641px) { +@media only screen and (max-width: 640px) { .common-login-modal { height: 410px; top: calc(50% - 210px); @@ -811,7 +811,7 @@ table.am-table .am-btn-danger:hover { width: 100%; } } -@media only screen and (max-width:641px) { +@media only screen and (max-width:640px) { .shop-navigation { background: #d2354c; margin-top: 0; @@ -889,7 +889,7 @@ img.common-user-icon { .user-content {display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;background:#fff;} .user-offcanvas-bar { z-index: 900; } -@media only screen and (min-width:640px) { +@media only screen and (min-width:641px) { .user-sidebar {display:block;position:relative;background:none; border-top: 5px solid #ED5564;z-index: 0;} .user-offcanvas-bar {position:static;width:auto;background:none;-webkit-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);transform:translate3d(0,0,0);overflow-y:hidden;} .user-offcanvas-bar:after {content:none;} @@ -934,7 +934,7 @@ button { outline: none !important; } .common-cropper-popup .am-form-group { width: auto; } .common-cropper-popup form.am-form .am-form-group-refreshing { padding: 0 !important; } .common-cropper-popup .am-form-file input[type="file"] { width: 106px !important; top: 0; } -@media only screen and (max-width:641px){ +@media only screen and (max-width:640px){ .common-cropper-popup .img-preview { margin-left:10px; } .common-cropper-popup .preview-md, .common-cropper-popup .preview-sm { margin:0 0 5px 8px; } -- GitLab