提交 b0dc1309 编写于 作者: G gongfuxiang

细节优化

上级 03afcf30
......@@ -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 手机号码格式校验]
......
......@@ -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'],
......
......@@ -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;
......
......@@ -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
......@@ -136,5 +136,4 @@ $(function()
$accounts.focus();
}
});
});
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册