From b0dc1309a05440960e56fecbf09383d3459a4d0d Mon Sep 17 00:00:00 2001 From: gongfuxiang Date: Fri, 4 Mar 2022 17:31:13 +0800 Subject: [PATCH] =?UTF-8?q?=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/common.php | 40 +++++++++++++++++-- config/shopxo.php | 9 ++++- .../admin/default/css/admin.logininfo.css | 5 ++- public/static/common/css/common.css | 2 +- public/static/index/default/js/user.js | 1 - 5 files changed, 49 insertions(+), 8 deletions(-) diff --git a/app/common.php b/app/common.php index ee2817d0a..1ff647e15 100755 --- a/app/common.php +++ b/app/common.php @@ -514,6 +514,20 @@ function MyInput($key = null, $default = null) } } + // 非数组则检查是否为json和xml数据 + if(!is_array($params)) + { + if(IsJson($params)) + { + $params = json_decode($params, true); + } else { + if(XmlParser($params)) + { + $params = XmlArray($params); + } + } + } + // 是否指定key if(!empty($key) && is_array($params)) { @@ -2189,13 +2203,33 @@ function FsockopenPost($url, $data = '') * @blog http://gong.gg/ * @version 0.0.1 * @datetime 2016-12-03T21:58:54+0800 - * @param [xml] $xmlstring [xml数据] + * @param [xml] $xml [xml数据] * @return [array] [array数组] */ -function XmlArray($xmlstring) { - return json_decode(json_encode((array) simplexml_load_string($xmlstring)), true); +function XmlArray($xml) { + return json_decode(json_encode(simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA)), true); } +/** + * 判断字符串是否为xml格式 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2019-01-07 + * @desc description + * @param [string] $string [字符串] + */ +function XmlParser($string) +{ + $xml_parser = xml_parser_create(); + if(!xml_parse($xml_parser, $string, true)) + { + xml_parser_free($xml_parser); + return false; + } else { + return (json_decode(json_encode(simplexml_load_string($string)),true)); + } +} /** * [CheckMobile 手机号码格式校验] diff --git a/config/shopxo.php b/config/shopxo.php index 17be8c358..a99c02907 100755 --- a/config/shopxo.php +++ b/config/shopxo.php @@ -139,12 +139,17 @@ return [ // 不删除的支付方式 'payment_cannot_deleted_list' => [ - 'DeliveryPayment', 'CashPayment', + 'DeliveryPayment', + 'ChargePayment', ], // 线下支付方式 - 'under_line_list' => ['CashPayment', 'DeliveryPayment'], + 'under_line_list' => [ + 'CashPayment', + 'DeliveryPayment', + 'ChargePayment', + ], // 小程序平台 'mini_app_type_list' => ['weixin', 'alipay', 'baidu', 'toutiao', 'qq'], diff --git a/public/static/admin/default/css/admin.logininfo.css b/public/static/admin/default/css/admin.logininfo.css index 298d94582..e1b77c1c8 100755 --- a/public/static/admin/default/css/admin.logininfo.css +++ b/public/static/admin/default/css/admin.logininfo.css @@ -66,7 +66,10 @@ body { font-size: 60px; font-weight: 500; color: #0e90d2; - text-shadow: -2px 1px #fff; + text-shadow: -1px 1px #fff; +} +.admin-login form { + padding: 5px 10px; } .admin-login .am-form-group { padding: 5px 0 !important; diff --git a/public/static/common/css/common.css b/public/static/common/css/common.css index d2e6de677..8b846c897 100755 --- a/public/static/common/css/common.css +++ b/public/static/common/css/common.css @@ -893,6 +893,6 @@ form .am-panel .business-form-group:last-child { vertical-align: middle; } .warehouse-item-container .warehouse-icon { - widows: 14px; + width: 14px; height: 14px; } \ No newline at end of file diff --git a/public/static/index/default/js/user.js b/public/static/index/default/js/user.js index 4e5550664..f02f1d8e9 100755 --- a/public/static/index/default/js/user.js +++ b/public/static/index/default/js/user.js @@ -136,5 +136,4 @@ $(function() $accounts.focus(); } }); - }); \ No newline at end of file