diff --git a/application/index/view/default/order/detail.html b/application/index/view/default/order/detail.html
index 122bfe81e..6f5296333 100755
--- a/application/index/view/default/order/detail.html
+++ b/application/index/view/default/order/detail.html
@@ -140,7 +140,18 @@
{{if !empty($data['warehouse_name'])}}
出货服务:
-
{{$data.warehouse_name}}
+
+
+ {{if !empty($data['warehouse_icon'])}}{{/if}}
+ {{if empty($data['warehouse_url'])}}
+ {{$data.warehouse_name}}
+ {{else /}}
+
+ {{$data.warehouse_name}}
+
+ {{/if}}
+
+
{{/if}}
diff --git a/application/index/view/default/order/module/goods.html b/application/index/view/default/order/module/goods.html
index 93cb21c5a..a57df74c8 100644
--- a/application/index/view/default/order/module/goods.html
+++ b/application/index/view/default/order/module/goods.html
@@ -24,10 +24,44 @@
+
{{$module_data.order_no}}
+
+
{{if !empty($module_data['warehouse_name'])}}
- {{$module_data.warehouse_name}}
+
+ {{if !empty($module_data['warehouse_icon'])}}{{/if}}
+ {{if empty($module_data['warehouse_url'])}}
+ {{$module_data.warehouse_name}}
+ {{else /}}
+
+ {{$module_data.warehouse_name}}
+
+ {{/if}}
+
{{/if}}
+
+
+ {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}}
+
+ plugins_view_user_order_list_base_nav_bottom
+
+ {{/if}}
+ {{php}}
+ $hook_name = 'plugins_view_user_order_list_base_nav_bottom';
+ $hook_data = Hook::listen($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>false, 'data'=>$module_data]);
+ if(!empty($hook_data) && is_array($hook_data))
+ {
+ foreach($hook_data as $hook)
+ {
+ if(is_string($hook) || is_int($hook))
+ {
+ echo htmlspecialchars_decode($hook);
+ }
+ }
+ }
+ {{/php}}
+
diff --git a/application/index/view/default/public/header_top_nav.html b/application/index/view/default/public/header_top_nav.html
index 45d889a9c..d5ad1318f 100755
--- a/application/index/view/default/public/header_top_nav.html
+++ b/application/index/view/default/public/header_top_nav.html
@@ -69,6 +69,18 @@
{{/foreach}}
{{/if}}
+
+ {{if MyC('home_header_top_is_home', 0) eq 1 and $module_name.$controller_name.$action_name neq 'indexindexindex'}}
+
+
+
+ {{/if}}
+
{{if !empty($common_nav_top_right_list) and is_array($common_nav_top_right_list)}}
{{foreach $common_nav_top_right_list as $nav}}
diff --git a/application/index/view/default/search/index.html b/application/index/view/default/search/index.html
index fc5bed849..240383645 100755
--- a/application/index/view/default/search/index.html
+++ b/application/index/view/default/search/index.html
@@ -50,7 +50,7 @@
...
条数据
-
+
diff --git a/application/lang/zh-cn.php b/application/lang/zh-cn.php
index 65809e4a1..7598fbe31 100755
--- a/application/lang/zh-cn.php
+++ b/application/lang/zh-cn.php
@@ -425,5 +425,8 @@ return array(
// 图片比例值
'common_regex_image_proportion' => '^([1-9]{1}[0-9]?|[1-9]{1}[0-9]?\.{1}[0-9]{1,2}|100|0)?$',
+
+ // 版本号
+ 'common_regex_version' => '^[0-9]{1,6}\.[0-9]{1,6}\.[0-9]{1,6}$',
);
?>
\ No newline at end of file
diff --git a/application/service/AppMiniService.php b/application/service/AppMiniService.php
index c6c3f931c..fb0b8ae53 100755
--- a/application/service/AppMiniService.php
+++ b/application/service/AppMiniService.php
@@ -10,6 +10,8 @@
// +----------------------------------------------------------------------
namespace app\service;
+use app\service\ResourcesService;
+
/**
* 小程序服务层
* @author Devil
@@ -171,7 +173,7 @@ class AppMiniService
}
// 文件格式化校验
- $type = array('application/zip', 'application/octet-stream', 'application/x-zip-compressed');
+ $type = ResourcesService::ZipExtTypeList();
if(!in_array($_FILES['theme']['type'], $type))
{
return DataReturn('文件格式有误,请上传zip压缩包', -2);
diff --git a/application/service/GoodsService.php b/application/service/GoodsService.php
index 229d0568a..7e8fd8b90 100755
--- a/application/service/GoodsService.php
+++ b/application/service/GoodsService.php
@@ -1433,7 +1433,7 @@ class GoodsService
return DataReturn('规格名称列之间不能重复['.implode(',', array_unique($repeat_names_all)).']', -1);
}
} else {
- if(empty($data[0][0]) || $data[0][0] <= 0)
+ if(!isset($data[0][0]) || $data[0][0] < 0)
{
return DataReturn('请填写有效的规格销售价格', -1);
}
diff --git a/application/service/OrderAftersaleService.php b/application/service/OrderAftersaleService.php
index 86210456e..6e7fc45d9 100644
--- a/application/service/OrderAftersaleService.php
+++ b/application/service/OrderAftersaleService.php
@@ -923,8 +923,9 @@ class OrderAftersaleService
}
// 是否仅退款操作需要退数量操作
+ // 如果是仅退、订单状态为待发货或虚拟订单则退回数量
$is_refund_only_number = false;
- if($aftersale['type'] == 0 && $order['data']['status'] <= 2)
+ if($aftersale['type'] == 0 && ($order['data']['status'] <= 2 || $order['data']['order_model'] == 3))
{
$is_refund_only_number = true;
$aftersale['number'] = $order['data']['items']['buy_number'];
@@ -1090,6 +1091,7 @@ class OrderAftersaleService
'refund_price' => $aftersale['price'],
'client_type' => $order['client_type'],
'refund_reason' => $order['order_no'].'订单退款'.$aftersale['price'].'元',
+ 'pay_time' => $pay_log['pay_time'],
];
$ret = (new $pay_name($payment[0]['config']))->Refund($pay_params);
if(!isset($ret['code']))
diff --git a/application/service/OrderService.php b/application/service/OrderService.php
index 939e3fed5..3728b829d 100755
--- a/application/service/OrderService.php
+++ b/application/service/OrderService.php
@@ -23,6 +23,7 @@ use app\service\UserService;
use app\service\GoodsService;
use app\service\OrderAftersaleService;
use app\service\OrderCurrencyService;
+use app\service\WarehouseService;
/**
* 订单服务层
@@ -1043,9 +1044,12 @@ class OrderService
// 仓库信息
if(in_array('warehouse_id', $keys))
{
- // 地区数据
$we_ids = array_unique(array_column($data, 'warehouse_id'));
- $warehouse_list = Db::name('Warehouse')->where(['id'=>$we_ids])->column('name', 'id');
+ $warehouse_list = WarehouseService::DataHandle(Db::name('Warehouse')->where(['id'=>$we_ids])->field('id,name')->select());
+ if(!empty($warehouse_list))
+ {
+ $warehouse_list = array_column($warehouse_list, null, 'id');
+ }
}
// 默认货币
@@ -1095,7 +1099,16 @@ class OrderService
// 订单所属仓库
if(isset($v['warehouse_id']))
{
- $v['warehouse_name'] = (!empty($warehouse_list) && is_array($warehouse_list) && array_key_exists($v['warehouse_id'], $warehouse_list)) ? $warehouse_list[$v['warehouse_id']] : '';
+ if(!empty($warehouse_list) && is_array($warehouse_list) && array_key_exists($v['warehouse_id'], $warehouse_list))
+ {
+ $v['warehouse_name'] = $warehouse_list[$v['warehouse_id']]['name'];
+ $v['warehouse_icon'] = $warehouse_list[$v['warehouse_id']]['icon'];
+ $v['warehouse_url'] = $warehouse_list[$v['warehouse_id']]['url'];
+ } else {
+ $v['warehouse_name'] = '';
+ $v['warehouse_icon'] = '';
+ $v['warehouse_url'] = '';
+ }
}
// 订单模式处理
diff --git a/application/service/PaymentService.php b/application/service/PaymentService.php
index 557e011cd..afb6537ac 100755
--- a/application/service/PaymentService.php
+++ b/application/service/PaymentService.php
@@ -472,7 +472,7 @@ class PaymentService
}
// 文件格式化校验
- $type = array('application/zip', 'application/octet-stream', 'application/x-zip-compressed');
+ $type = ResourcesService::ZipExtTypeList();
if(!in_array($_FILES['file']['type'], $type))
{
return DataReturn('文件格式有误,请上传zip压缩包', -2);
diff --git a/application/service/PluginsAdminService.php b/application/service/PluginsAdminService.php
index 2839d6ffa..1130585b4 100755
--- a/application/service/PluginsAdminService.php
+++ b/application/service/PluginsAdminService.php
@@ -1013,7 +1013,7 @@ php;
}
// 文件格式化校验
- $type = array('application/zip', 'application/octet-stream', 'application/x-zip-compressed');
+ $type = ResourcesService::ZipExtTypeList();
if(!in_array($_FILES['file']['type'], $type))
{
return DataReturn('文件格式有误,请上传zip压缩包', -2);
diff --git a/application/service/ResourcesService.php b/application/service/ResourcesService.php
index 5d870cd5d..d7b547784 100755
--- a/application/service/ResourcesService.php
+++ b/application/service/ResourcesService.php
@@ -654,5 +654,23 @@ class ResourcesService
return $value;
}
+
+ /**
+ * zip压缩包扩展可用格式
+ * @author Devil
+ * @blog http://gong.gg/
+ * @version 1.0.0
+ * @date 2021-02-02
+ * @desc description
+ * @param array $params [description]
+ */
+ public static function ZipExtTypeList($params = [])
+ {
+ return [
+ 'application/zip',
+ 'application/octet-stream',
+ 'application/x-zip-compressed',
+ ];
+ }
}
?>
\ No newline at end of file
diff --git a/application/service/SearchService.php b/application/service/SearchService.php
index c9e9d0d26..f5634499c 100755
--- a/application/service/SearchService.php
+++ b/application/service/SearchService.php
@@ -335,40 +335,45 @@ class SearchService
*/
public static function CategoryBrandList($params = [])
{
- // 基础条件
- $brand_where = [
- ['is_enable', '=', 1],
- ];
-
- // 搜索条件
- $where = self::SearchWhereHandle($params);
- $base_where = $where['base'];
- $where_keywords = $where['keywords'];
- $where_screening_price = $where['screening_price'];
-
- // 一维数组、参数值去重
- if(!empty($base_where) || !empty($where_keywords) || !empty($where_screening_price))
+ $data = [];
+ if(MyC('home_search_is_brand', 0) == 1)
{
- $ids = Db::name('Goods')->alias('g')->join(['__GOODS_CATEGORY_JOIN__'=>'gci'], 'g.id=gci.goods_id')->where($base_where)->where(function($query) use($where_keywords) {
- $query->whereOr($where_keywords);
- })->where(function($query) use($where_screening_price) {
- $query->whereOr($where_screening_price);
- })->group('g.brand_id')->column('g.brand_id');
- if(!empty($ids))
- {
- $brand_where[] = ['id', 'in', array_unique($ids)];
- }
- }
+ // 基础条件
+ $brand_where = [
+ ['is_enable', '=', 1],
+ ];
- // 获取品牌列表
- $data_params = [
- 'field' => 'id,name,logo,website_url',
- 'where' => $brand_where,
- 'm' => 0,
- 'n' => 0,
- ];
- $ret = BrandService::BrandList($data_params);
- return $ret['data'];
+ // 搜索条件
+ $where = self::SearchWhereHandle($params);
+ $base_where = $where['base'];
+ $where_keywords = $where['keywords'];
+ $where_screening_price = $where['screening_price'];
+
+ // 一维数组、参数值去重
+ if(!empty($base_where) || !empty($where_keywords) || !empty($where_screening_price))
+ {
+ $ids = Db::name('Goods')->alias('g')->join(['__GOODS_CATEGORY_JOIN__'=>'gci'], 'g.id=gci.goods_id')->where($base_where)->where(function($query) use($where_keywords) {
+ $query->whereOr($where_keywords);
+ })->where(function($query) use($where_screening_price) {
+ $query->whereOr($where_screening_price);
+ })->group('g.brand_id')->column('g.brand_id');
+ if(!empty($ids))
+ {
+ $brand_where[] = ['id', 'in', array_unique($ids)];
+ }
+ }
+
+ // 获取品牌列表
+ $data_params = [
+ 'field' => 'id,name,logo,website_url',
+ 'where' => $brand_where,
+ 'm' => 0,
+ 'n' => 0,
+ ];
+ $ret = BrandService::BrandList($data_params);
+ $data = empty($ret['data']) ? [] : $ret['data'];
+ }
+ return $data;
}
/**
@@ -382,8 +387,13 @@ class SearchService
*/
public static function GoodsCategoryList($params = [])
{
- $pid = empty($params['category_id']) ? 0 : intval($params['category_id']);
- return GoodsService::GoodsCategoryList(['where'=>['pid'=>$pid], 'field'=>'id,name']);
+ $data = [];
+ if(MyC('home_search_is_category', 0) == 1)
+ {
+ $pid = empty($params['category_id']) ? 0 : intval($params['category_id']);
+ $data = GoodsService::GoodsCategoryList(['where'=>['pid'=>$pid], 'field'=>'id,name']);
+ }
+ return $data;
}
/**
diff --git a/application/service/StoreService.php b/application/service/StoreService.php
index 190f5c36d..9fc856491 100644
--- a/application/service/StoreService.php
+++ b/application/service/StoreService.php
@@ -21,41 +21,58 @@ class StoreService
{
/**
* 应用商店地址
- * @author Devil
- * @blog http://gong.gg/
- * @version 1.0.0
- * @datetime 2019-06-16T00:33:28+0800
- * @param [array] $params [输入参数]
+ * @author Devil
+ * @blog http://gong.gg/
+ * @version 1.0.0
+ * @date 2021-02-12
+ * @desc description
+ * @param [array] $params [输入参数]
*/
public static function StoreUrl($params = [])
{
- return config('shopxo.store_url').'?ver='.APPLICATION_VERSION.'&url='.urlencode(__MY_URL__);
+ return config('shopxo.store_url').self::RequestParamsString($params);
}
/**
* 应用商店支付插件地址
- * @author Devil
- * @blog http://gong.gg/
- * @version 1.0.0
- * @datetime 2019-06-16T00:33:28+0800
- * @param [array] $params [输入参数]
+ * @author Devil
+ * @blog http://gong.gg/
+ * @version 1.0.0
+ * @date 2021-02-12
+ * @desc description
+ * @param [array] $params [输入参数]
*/
public static function StorePaymentUrl($params = [])
{
- return config('shopxo.store_payment_url').'?ver='.APPLICATION_VERSION.'&url='.urlencode(__MY_URL__);
+ return config('shopxo.store_payment_url').self::RequestParamsString($params);
}
-
+
/**
* 应用商店主题地址
- * @author Devil
- * @blog http://gong.gg/
- * @version 1.0.0
- * @datetime 2019-06-16T00:33:28+0800
- * @param [array] $params [输入参数]
+ * @author Devil
+ * @blog http://gong.gg/
+ * @version 1.0.0
+ * @date 2021-02-12
+ * @desc description
+ * @param [array] $params [输入参数]
*/
public static function StoreThemeUrl($params = [])
{
- return config('shopxo.store_theme_url').'?ver='.APPLICATION_VERSION.'&url='.urlencode(__MY_URL__);
+ return config('shopxo.store_theme_url').self::RequestParamsString($params);
+ }
+
+ /**
+ * 请求参数
+ * @author Devil
+ * @blog http://gong.gg/
+ * @version 1.0.0
+ * @date 2021-02-12
+ * @desc description
+ * @param [array] $params [输入参数]
+ */
+ public static function RequestParamsString($params = [])
+ {
+ return '?ver='.APPLICATION_VERSION.'&url='.urlencode(__MY_URL__).'&host='.urlencode(__MY_HOST__).'&ip='.urlencode(__MY_ADDR__);
}
}
?>
\ No newline at end of file
diff --git a/application/service/ThemeService.php b/application/service/ThemeService.php
index 6853517d8..aa2829c43 100755
--- a/application/service/ThemeService.php
+++ b/application/service/ThemeService.php
@@ -11,6 +11,7 @@
namespace app\service;
use think\Db;
+use app\service\ResourcesService;
/**
* 主题服务层
@@ -116,7 +117,7 @@ class ThemeService
}
// 文件格式化校验
- $type = array('application/zip', 'application/octet-stream', 'application/x-zip-compressed');
+ $type = ResourcesService::ZipExtTypeList();
if(!in_array($_FILES['theme']['type'], $type))
{
return DataReturn('文件格式有误,请上传zip压缩包', -2);
diff --git a/application/service/WarehouseService.php b/application/service/WarehouseService.php
index f6b8b7829..a8402ac0d 100644
--- a/application/service/WarehouseService.php
+++ b/application/service/WarehouseService.php
@@ -11,6 +11,7 @@
namespace app\service;
use think\Db;
+use think\facade\Hook;
use app\service\RegionService;
use app\service\WarehouseGoodsService;
@@ -39,7 +40,7 @@ class WarehouseService
$field = empty($params['field']) ? '*' : $params['field'];
$order_by = empty($params['order_by']) ? 'level desc, id desc' : trim($params['order_by']);
$data = Db::name('Warehouse')->field($field)->where($where)->order($order_by)->select();
- return DataReturn('处理成功', 0, self::DataHandle($data));
+ return DataReturn('处理成功', 0, self::DataHandle($data, $params));
}
/**
@@ -49,15 +50,19 @@ class WarehouseService
* @version 1.0.0
* @date 2020-07-18
* @desc description
- * @param [array] $data [仓库数据]
+ * @param [array] $data [仓库数据]
+ * @param [array] $params [输入参数]
*/
- public static function DataHandle($data)
+ public static function DataHandle($data, $params = [])
{
if(!empty($data))
{
// 字段列表
$keys = ArrayKeys($data);
+ // 基础数据
+ $data_key_field = empty($params['data_key_field']) ? 'id' : $params['data_key_field'];
+
// 获取商品信息
if(in_array('province', $keys) && in_array('city', $keys) && in_array('county', $keys))
{
@@ -69,6 +74,25 @@ class WarehouseService
// 循环处理数据
foreach($data as &$v)
{
+ // 数据主键id
+ $data_id = isset($v[$data_key_field]) ? $v[$data_key_field] : 0;
+
+ // 仓库处理前钩子
+ $hook_name = 'plugins_service_warehouse_handle_inside_begin';
+ Hook::listen($hook_name, [
+ 'hook_name' => $hook_name,
+ 'is_backend' => true,
+ 'params' => &$params,
+ 'warehouse' => &$v,
+ 'warehouse_id' => $data_id,
+ ]);
+
+ // icon
+ $v['icon'] = 'am-icon-cube';
+
+ // url地址
+ $v['url'] = '';
+
// 地区
if(isset($v['province']))
{
@@ -92,7 +116,26 @@ class WarehouseService
{
$v['upd_time'] = empty($v['upd_time']) ? '' : date('Y-m-d H:i:s', $v['upd_time']);
}
+
+ // 仓库处理后钩子
+ $hook_name = 'plugins_service_warehouse_handle_inside_end';
+ Hook::listen($hook_name, [
+ 'hook_name' => $hook_name,
+ 'is_backend' => true,
+ 'params' => &$params,
+ 'warehouse' => &$v,
+ 'warehouse_id' => $data_id,
+ ]);
}
+
+ // 仓库处理列表钩子
+ $hook_name = 'plugins_service_warehouse_handle_end';
+ Hook::listen($hook_name, [
+ 'hook_name' => $hook_name,
+ 'is_backend' => true,
+ 'params' => &$params,
+ 'data' => &$data,
+ ]);
}
return $data;
}
diff --git a/application/tags.php b/application/tags.php
index 75e794b4d..e8f78c117 100755
--- a/application/tags.php
+++ b/application/tags.php
@@ -32,6 +32,18 @@ return array (
'log_write' =>
array (
),
+ 'plugins_admin_css' =>
+ array (
+ 0 => 'app\\plugins\\store\\Hook',
+ ),
+ 'plugins_css' =>
+ array (
+ 0 => 'app\\plugins\\store\\Hook',
+ ),
+ 'plugins_js' =>
+ array (
+ 0 => 'app\\plugins\\store\\Hook',
+ ),
'plugins_service_navigation_header_handle' =>
array (
0 => 'app\\plugins\\store\\Hook',
@@ -39,10 +51,12 @@ return array (
'plugins_service_users_center_left_menu_handle' =>
array (
0 => 'app\\plugins\\store\\Hook',
+ 1 => 'app\\plugins\\wallet\\Hook',
),
'plugins_service_header_navigation_top_right_handle' =>
array (
0 => 'app\\plugins\\store\\Hook',
+ 1 => 'app\\plugins\\wallet\\Hook',
),
'plugins_service_warehouse_goods_inventory_deduct' =>
array (
@@ -72,5 +86,57 @@ return array (
array (
0 => 'app\\plugins\\store\\Hook',
),
+ 'plugins_view_goods_detail_right_content_bottom' =>
+ array (
+ 0 => 'app\\plugins\\store\\Hook',
+ ),
+ 'plugins_view_goods_detail_base_bottom' =>
+ array (
+ 0 => 'app\\plugins\\store\\Hook',
+ ),
+ 'plugins_view_goods_detail_base_buy_nav_min_inside_begin' =>
+ array (
+ 0 => 'app\\plugins\\store\\Hook',
+ ),
+ 'plugins_service_warehouse_handle_end' =>
+ array (
+ 0 => 'app\\plugins\\store\\Hook',
+ ),
+ 'plugins_service_buy_order_insert_begin' =>
+ array (
+ 0 => 'app\\plugins\\store\\Hook',
+ ),
+ 'plugins_service_buy_order_insert_end' =>
+ array (
+ 0 => 'app\\plugins\\store\\Hook',
+ ),
+ 'plugins_service_system_begin' =>
+ array (
+ 0 => 'app\\plugins\\store\\Hook',
+ ),
+ 'plugins_view_buy_form_inside' =>
+ array (
+ 0 => 'app\\plugins\\store\\Hook',
+ ),
+ 'plugins_view_buy_base_confirm_top' =>
+ array (
+ 0 => 'app\\plugins\\store\\Hook',
+ ),
+ 'plugins_view_admin_order_list_operate' =>
+ array (
+ 0 => 'app\\plugins\\store\\Hook',
+ ),
+ 'plugins_service_order_status_change_history_success_handle' =>
+ array (
+ 0 => 'app\\plugins\\store\\Hook',
+ ),
+ 'plugins_service_order_aftersale_audit_handle_end' =>
+ array (
+ 0 => 'app\\plugins\\store\\Hook',
+ ),
+ 'plugins_service_user_register_end' =>
+ array (
+ 0 => 'app\\plugins\\wallet\\Hook',
+ ),
);
?>
\ No newline at end of file
diff --git a/extend/base/FileUpload.php b/extend/base/FileUpload.php
index d091f7b74..c2e4c10ce 100755
--- a/extend/base/FileUpload.php
+++ b/extend/base/FileUpload.php
@@ -34,7 +34,7 @@ class FileUpload
*/
public function __construct($params = [])
{
- $this->config['root_path'] = isset($params['root_path']) ? $params['root_path'] : ROOT.'public';
+ $this->config['dir'] = isset($params['dir']) ? $params['dir'] : ROOT.'public';
$this->config['path'] = isset($params['path']) ? $params['path'] : DS.'static'.DS.'upload'.DS.'file'.DS.date('Y').DS.date('m').DS.date('d').DS;
}
@@ -55,11 +55,11 @@ class FileUpload
$error = FileUploadError($name, $index);
if($error !== true)
{
- return ['status'=>false, 'msg'=>$error];
+ return DataReturn($error, -1);
}
// 存储目录校验
- $dir = str_replace(['//', '\\\\'], ['/', '\\'], $this->config['root_path'].$this->config['path']);
+ $dir = str_replace(['//', '\\\\'], ['/', '\\'], $this->config['dir'].$this->config['path']);
$this->IsMkdir($dir);
// 临时文件数据
@@ -85,18 +85,19 @@ class FileUpload
if(move_uploaded_file($temp_file, $dir.$filename))
{
$data = [
- 'name' => $original_name,
- 'url' => $this->config['path'].$filename,
- 'file_path' => $this->config['path'],
- 'file_name' => $filename,
- 'file_ext' => $ext,
- 'file_size' => $size,
- 'file_type' => $type,
- 'file_hash' => hash_file('sha256', $dir.$filename, false),
+ 'title' => $original_name,
+ 'url' => $this->config['path'].$filename,
+ 'path' => $this->config['path'],
+ 'name' => $filename,
+ 'ext' => $ext,
+ 'size' => $size,
+ 'type' => $type,
+ 'hash' => hash_file('sha256', $dir.$filename, false),
+ 'md5' => md5_file($dir.$filename),
];
- return ['status'=>true, 'msg'=>'上传成功', 'data'=>$data];
+ return DataReturn('上传成功', 0, $data);
}
- return ['status'=>false, 'msg'=>'文件存储失败'];
+ return DataReturn('文件存储失败', -1);
}
/**
@@ -127,7 +128,7 @@ class FileUpload
*/
private function RandNewFilename()
{
- return date('YmdHis').rand(0,9).rand(0,9).rand(0,9).rand(0,9).rand(0,9);
+ return date('YmdHis').GetNumberCode();
}
}
?>
\ No newline at end of file
diff --git a/extend/payment/Bestpay.php b/extend/payment/Bestpay.php
new file mode 100644
index 000000000..2d9d61bde
--- /dev/null
+++ b/extend/payment/Bestpay.php
@@ -0,0 +1,510 @@
+config = $params;
+ }
+
+ /**
+ * 配置信息
+ * @author Devil
+ * @blog http://gong.gg/
+ * @version 1.0.0
+ * @date 2018-09-19
+ * @desc description
+ */
+ public function Config()
+ {
+ // 基础信息
+ $base = [
+ 'name' => '翼支付', // 插件名称
+ 'version' => '1.0.0', // 插件版本
+ 'apply_version' => '不限', // 适用系统版本描述
+ 'apply_terminal'=> ['pc', 'h5'], // 适用终端 默认全部 ['pc', 'h5', 'ios', 'android', 'alipay', 'weixin', 'baidu', 'toutiao']
+ 'desc' => '适用翼支付APP中子应用模式发起支付,即时到帐支付方式,买家的交易资金直接打入卖家账户,快速回笼交易资金。
立即申请', // 插件描述(支持html)
+ 'author' => 'Devil', // 开发者
+ 'author_url' => 'http://shopxo.net/', // 开发者主页
+ ];
+
+ // 配置信息
+ $element = [
+ [
+ 'element' => 'input',
+ 'type' => 'text',
+ 'default' => '',
+ 'name' => 'mch_id',
+ 'placeholder' => '支付商户号',
+ 'title' => '支付商户号',
+ 'is_required' => 0,
+ 'message' => '请填写支付分配的商户号',
+ ],
+ [
+ 'element' => 'input',
+ 'type' => 'text',
+ 'default' => '',
+ 'name' => 'password',
+ 'placeholder' => '证书密码',
+ 'title' => '证书密码',
+ 'is_required' => 0,
+ 'message' => '请填写证书密码',
+ ],
+ [
+ 'element' => 'message',
+ 'message' => '将p12证书按照[bestpay.P12]命名放入目录中['.$this->p12_dir_file.']、如目录不存在自行创建即可',
+ ],
+ ];
+
+ return [
+ 'base' => $base,
+ 'element' => $element,
+ ];
+ }
+
+ /**
+ * 支付入口
+ * @author Devil
+ * @blog http://gong.gg/
+ * @version 1.0.0
+ * @date 2018-09-19
+ * @desc description
+ * @param [array] $params [输入参数]
+ */
+ public function Pay($params = [])
+ {
+ // 参数
+ if(empty($params))
+ {
+ return DataReturn('参数不能为空', -1);
+ }
+
+ // 配置信息
+ if(empty($this->config) || empty($this->config['mch_id']) || empty($this->config['password']))
+ {
+ return DataReturn('支付缺少配置', -1);
+ }
+ if(!file_exists($this->p12_dir_file))
+ {
+ return DataReturn('p12证书不存在', -1);
+ }
+
+ // 支付参数
+ $parameter = [
+ 'merchantNo' => $this->config['mch_id'],
+ 'outTradeNo' => $params['order_no'],
+ 'tradeAmt' => (string) (($params['total_price']*1000)/10),
+ 'ccy' => '156',
+ 'requestDate' => date('Y-m-d H:i:s'),
+ 'tradeChannel' => 'APP',
+ 'accessCode' => 'CASHIER',
+ 'mediumType' => 'WIRELESS',
+ 'subject' => $params['name'],
+ 'goodsInfo' => $params['name'],
+ 'operator' => $this->config['mch_id'],
+ 'notifyUrl' => $params['notify_url'],
+ ];
+ // 风控参数
+ $risk_control_info = [
+ 'service_identify' => $params['order_no'],
+ 'subject' => $params['name'],
+ 'product_type' => '1',
+ 'order_ip' => GetClientIP(),
+ ];
+ $parameter['riskControlInfo'] = json_encode($risk_control_info, JSON_UNESCAPED_UNICODE);
+
+ // 生成签名参数+签名
+ $parameter['sign'] = $this->CreateSign($this->GetSignContent($parameter));
+
+ // 下单
+ $result = $this->HttpRequest('https://mapi.bestpay.com.cn/mapi/uniformReceipt/proCreateOrder', $parameter);
+ if(!empty($result) && isset($result['success']) && $result['success'] == 1 && !empty($result['result']))
+ {
+ // 根据当前环境判断支付方式
+ if(!empty($_SERVER['HTTP_USER_AGENT']) && stripos($_SERVER['HTTP_USER_AGENT'], 'Bestpay') !== false)
+ {
+ // APP中子应用发起支付
+ $this->AppLaunchPay($parameter, $result['result'], $params);
+ } else {
+ return DataReturn('非APP环境中正在开发中...', -1);
+ }
+ }
+ $msg = empty($result) ? '支付异常错误' : ((empty($result['errorMsg']) || !is_array($result)) ? $result : $result['errorMsg']);
+ return DataReturn($msg, -1);
+ }
+
+ /**
+ * 发起支付
+ * @author Devil
+ * @blog http://gong.gg/
+ * @version 1.0.0
+ * @date 2021-02-07
+ * @desc description
+ * @param [array] $data [支付参数]
+ * @param [array] $result [返回数据]
+ * @param [array] $params [支付参数]
+ */
+ public function AppLaunchPay($data, $result, $params)
+ {
+ // 支付参数
+ $parameter = [
+ 'merchantNo' => $data['merchantNo'],
+ 'institutionCode' => $data['merchantNo'],
+ 'institutionType' => 'MERCHANT',
+ 'signType' => 'CA',
+ 'platform' => $this->ClientType(),
+ 'tradeType' => 'acquiring',
+ 'outTradeNo' => $data['outTradeNo'],
+ 'tradeNo' => $result['tradeNo'],
+ 'tradeAmt' => $data['tradeAmt'],
+ 'tradeDesc' => $data['subject'],
+ ];
+ $parameter['sign'] = $this->CreateSign($this->GetSignContent($parameter));
+
+ // 拼接html
+ $html = '
+
+
+
+
安全支付
+
+
+
+
+
+ ';
+ die($html);
+ }
+
+ /**
+ * 客户端
+ * @author Devil
+ * @blog http://gong.gg/
+ * @version 1.0.0
+ * @date 2021-02-08
+ * @desc description
+ */
+ public function ClientType()
+ {
+ if(!empty($_SERVER['HTTP_USER_AGENT']))
+ {
+ // 安卓手机
+ if(stripos($_SERVER['HTTP_USER_AGENT'], 'Android') !== false)
+ {
+ return 'android_4.0';
+ }
+
+ // ios手机/ipad
+ if(stripos($_SERVER['HTTP_USER_AGENT'], 'iPhone') !== false || stripos($_SERVER['HTTP_USER_AGENT'], 'ipad'))
+ {
+ return 'ios_4.0';
+ }
+ }
+ return 'other';
+ }
+
+ /**
+ * 支付回调处理
+ * @author Devil
+ * @blog http://gong.gg/
+ * @version 1.0.0
+ * @date 2018-09-19
+ * @desc description
+ * @param [array] $params [输入参数]
+ */
+ public function Respond($params = [])
+ {
+ if(!empty($params['outTradeNo']))
+ {
+ // 查询订单
+ $parameter = [
+ 'outTradeNo' => $params['outTradeNo'],
+ 'merchantNo' => $this->config['mch_id'],
+ 'tradeDate' => date('Y-m-d H:i:s'),
+ ];
+
+ // 生成签名参数+签名
+ $parameter['sign'] = $this->CreateSign($this->GetSignContent($parameter));
+
+ // 查询订单
+ $result = $this->HttpRequest('https://mapi.bestpay.com.cn/mapi/uniformReceipt/tradeQuery', $parameter);
+ if(!empty($result) && isset($result['success']) && $result['success'] == 1 && !empty($result['result']) && isset($result['result']['tradeStatus']) && $result['result']['tradeStatus'] == 'SUCCESS')
+ {
+ return DataReturn('支付成功', 0, $this->ReturnData($result['result']));
+ }
+ }
+ return DataReturn('处理异常错误', -100);
+ }
+
+ /**
+ * 返回数据统一格式
+ * @author Devil
+ * @blog http://gong.gg/
+ * @version 1.0.0
+ * @date 2021-02-08
+ * @desc description
+ * @param [array] $data [支付数据]
+ */
+ private function ReturnData($data)
+ {
+ // 返回数据固定基础参数
+ $data['trade_no'] = $data['tradeNo']; // 支付平台 - 订单号
+ $data['buyer_user'] = $data['buyerLoginNo']; // 支付平台 - 用户
+ $data['out_trade_no'] = $data['outTradeNo']; // 本系统发起支付的 - 订单号
+ $data['subject'] = $data['subject']; // 本系统发起支付的 - 商品名称
+ $data['pay_price'] = $data['tradeAmt']/100; // 本系统发起支付的 - 总价
+ return $data;
+ }
+
+ /**
+ * 退款处理
+ * @author Devil
+ * @blog http://gong.gg/
+ * @version 1.0.0
+ * @date 2019-05-28
+ * @desc description
+ * @param [array] $params [输入参数]
+ */
+ public function Refund($params = [])
+ {
+ // 参数
+ $p = [
+ [
+ 'checked_type' => 'empty',
+ 'key_name' => 'order_no',
+ 'error_msg' => '订单号不能为空',
+ ],
+ [
+ 'checked_type' => 'empty',
+ 'key_name' => 'trade_no',
+ 'error_msg' => '交易平台订单号不能为空',
+ ],
+ [
+ 'checked_type' => 'empty',
+ 'key_name' => 'pay_price',
+ 'error_msg' => '支付金额不能为空',
+ ],
+ [
+ 'checked_type' => 'empty',
+ 'key_name' => 'refund_price',
+ 'error_msg' => '退款金额不能为空',
+ ],
+ [
+ 'checked_type' => 'empty',
+ 'key_name' => 'pay_time',
+ 'error_msg' => '支付时间不能为空',
+ ],
+ ];
+ $ret = ParamsChecked($params, $p);
+ if($ret !== true)
+ {
+ return DataReturn($ret, -1);
+ }
+
+ // 退款原因
+ $refund_reason = empty($params['refund_reason']) ? $params['order_no'].'订单退款'.$params['refund_price'].'元' : $params['refund_reason'];
+
+ // 请求参数
+ $parameter = [
+ 'merchantNo' => $this->config['mch_id'],
+ 'outTradeNo' => $params['order_no'],
+ 'outRequestNo' => $params['order_no'].GetNumberCode(),
+ 'originalTradeDate' => date('Y-m-d H:i:s', $params['pay_time']),
+ 'refundAmt' => (int) (($params['refund_price']*1000)/10),
+ 'requestDate' => date('Y-m-d H:i:s'),
+ 'operator' => $this->config['mch_id'],
+ 'tradeChannel' => 'APP',
+ 'ccy' => '156',
+ 'accessCode' => 'CASHIER',
+ 'remark' => $refund_reason,
+ ];
+
+ // 生成签名参数+签名
+ $parameter['sign'] = $this->CreateSign($this->GetSignContent($parameter));
+
+ // 退款
+ $result = $this->HttpRequest('https://mapi.bestpay.com.cn/mapi/uniformReceipt/tradeRefund', $parameter);
+ if(!empty($result) && isset($result['success']) && $result['success'] == 1)
+ {
+ if(!empty($result['result']) && isset($result['result']['tradeStatus']) && $result['result']['tradeStatus'] == 'SUCCESS')
+ {
+ // 统一返回格式
+ $data = [
+ 'out_trade_no' => isset($result['result']['outTradeNo']) ? $result['result']['outTradeNo'] : '',
+ 'trade_no' => isset($result['result']['tradeNo']) ? $result['result']['tradeNo'] : (isset($result['err_code_des']) ? $result['err_code_des'] : ''),
+ 'buyer_user' => isset($result['result']['buyerLoginNo']) ? $result['result']['buyerLoginNo'] : '',
+ 'refund_price' => isset($result['result']['refundAmt']) ? $result['result']['refundAmt']/100 : 0.00,
+ 'return_params' => $result['result'],
+ ];
+ return DataReturn('退款成功', 0, $data);
+ } else {
+ return DataReturn($result['result']['tradeResultDesc'], -1);
+ }
+ }
+
+ $msg = empty($result) ? '退款接口异常' : ((empty($result['errorMsg']) || !is_array($result)) ? $result : $result['errorMsg']);
+ return DataReturn($msg, -1);
+ }
+
+ /**
+ * 网络请求
+ * @author Devil
+ * @blog http://gong.gg/
+ * @version 1.0.0
+ * @datetime 2017-09-25T09:10:46+0800
+ * @param [string] $url [请求url]
+ * @param [array] $data [发送数据]
+ * @param [int] $second [超时]
+ * @return [mixed] [请求返回数据]
+ */
+ private function HttpRequest($url, $data, $second = 30)
+ {
+ $ch = curl_init();
+ $header = ['Content-Type: application/json'];
+ curl_setopt_array($ch, array(
+ CURLOPT_URL => $url,
+ CURLOPT_HTTPHEADER => $header,
+ CURLOPT_POST => true,
+ CURLOPT_SSL_VERIFYPEER => false,
+ CURLOPT_SSL_VERIFYHOST => false,
+ CURLOPT_RETURNTRANSFER => true,
+ CURLOPT_POSTFIELDS => json_encode($data),
+ CURLOPT_TIMEOUT => $second,
+ ));
+ $result = curl_exec($ch);
+
+ //返回结果
+ if($result)
+ {
+ curl_close($ch);
+ return json_decode($result, true);
+ } else {
+ $error = curl_errno($ch);
+ curl_close($ch);
+ return "curl出错,错误码:$error";
+ }
+ }
+
+ /**
+ * 获取签名内容
+ * @author Devil
+ * @blog http://gong.gg/
+ * @version 1.0.0
+ * @date 2021-02-07
+ * @desc description
+ * @param [array] $params [需要签名的参数]
+ */
+ public function GetSignContent($params)
+ {
+ ksort($params);
+ $string = "";
+ $i = 0;
+ foreach($params as $k => $v)
+ {
+ if(!empty($v) && "@" != substr($v, 0, 1) && $k != 'sign')
+ {
+ if ($i == 0) {
+ $string .= "$k" . "=" . "$v";
+ } else {
+ $string .= "&" . "$k" . "=" . "$v";
+ }
+ $i++;
+ }
+ }
+ unset($k, $v);
+ return $string;
+ }
+
+ /**
+ * 签名生成
+ * @author Devil
+ * @blog http://gong.gg/
+ * @version 1.0.0
+ * @date 2021-02-07
+ * @desc description
+ * @param [string] $params [需要签名的参数]
+ */
+ public function CreateSign($params)
+ {
+ $cer_key = file_get_contents($this->p12_dir_file);
+ openssl_pkcs12_read($cer_key, $certs, $this->config['password']);
+ openssl_sign($params, $sign_msg, $certs['pkey'], OPENSSL_ALGO_SHA256);
+ return $sign_msg ? base64_encode($sign_msg) : '';
+ }
+
+ /**
+ * 自定义成功返回内容
+ * @author Devil
+ * @blog http://gong.gg/
+ * @version 1.0.0
+ * @date 2020-07-01
+ * @desc description
+ * @param [string] $params [需要签名的参数]
+ */
+ public function SuccessReturn($params = [])
+ {
+ if(empty($params))
+ {
+ $params = input();
+ }
+ return '{"success":true,"result":{"statusCode": 200,"outTradeNo":"'.$params['outTradeNo'].'","tradeNo":"'.$params['tradeNo'].'"}}';
+ }
+
+ /**
+ * 自定义失败返回内容
+ * @author Devil
+ * @blog http://gong.gg/
+ * @version 1.0.0
+ * @date 2020-07-01
+ * @desc description
+ * @param [string] $params [需要签名的参数]
+ */
+ public function ErrorReturn($params = [])
+ {
+ return '{"success":false,"result":{"statusCode":400,"outTradeNo":"","tradeNo":""}}';
+ }
+}
+?>
\ No newline at end of file
diff --git a/public/core.php b/public/core.php
index cbacf4cf0..007d8c17b 100755
--- a/public/core.php
+++ b/public/core.php
@@ -34,6 +34,9 @@ $my_root = empty($_SERVER['SCRIPT_NAME']) ? '' : substr($_SERVER['SCRIPT_NAME'],
define('__MY_ROOT__', defined('IS_ROOT_ACCESS') ? $my_root : str_replace('public'.DS, '', $my_root));
define('__MY_ROOT_PUBLIC__', defined('IS_ROOT_ACCESS') ? DS.$my_root.'public'.DS : DS.$my_root);
+// 当前服务器ip
+define('__MY_ADDR__', empty($_SERVER['SERVER_ADDR']) ? '' : $_SERVER['SERVER_ADDR']);
+
// 项目HOST
define('__MY_HOST__', empty($_SERVER['HTTP_HOST']) ? '' : $_SERVER['HTTP_HOST']);
diff --git a/public/static/admin/default/css/common.css b/public/static/admin/default/css/common.css
index 6aedc143a..61241ccdf 100755
--- a/public/static/admin/default/css/common.css
+++ b/public/static/admin/default/css/common.css
@@ -75,8 +75,8 @@ input:hover, select:hover, textarea:hover, .chosen-choices:hover, .chosen-single
body {margin:0;color:#666;}
html,body {position:relative;background:#fff;height:100%;width:100%;}
h1,h2,h3,h4,h5,h6 {font-family:'Karla',sans-serif;margin:10px 0;}
-h1 {line-height:43px;}
-h2 {line-height:35px;}
+h1 {line-height:42px;}
+h2 {line-height:32px;}
h3 small {color:#444444;}
h4 {line-height:22px;}
h4 small {color:#444444;}
@@ -383,11 +383,11 @@ a:focus {outline:0;text-decoration:none;}
header .tpl-header-list-user-nick {color:#fff;}
}
header { background-color:#4386fb !important; border-color:#4386fb; color:#fff; }
-header, header.am-topbar { min-height:35px; }
-header .am-topbar-brand { height:35px; }
+header, header.am-topbar { min-height:32px; }
+header .am-topbar-brand { height:32px; }
header .am-dropdown-content {border-radius:2px;}
header .am-topbar-brand h2 { margin: 0; }
-header .header-nav-submit { margin: 4px 10px 0 0; }
+header .header-nav-submit { margin: 4px 10px 0 0; padding: 4px 10px;}
ul {margin-top:0;}
.admin-header {position:fixed;top:0;right:0;z-index:1000;font-size:1.4rem;margin-bottom:0;}
.admin-sidebar {width:260px;min-height:100%;float:left;border-right:1px solid #cecece;}
@@ -403,9 +403,9 @@ ul {margin-top:0;}
.admin-sidebar {height:100%;overflow-x:hidden;overflow-y:scroll;-webkit-overflow-scrolling:touch;}
.admin-sidebar .am-icon-angle-down {margin-top: 2px;}
@media only screen and (min-width:641px) {
- header { left: 169px; }
- header .am-topbar-brand, .am-topbar-nav > li > a { line-height: 35px; }
- .admin-sidebar {display:block;width:170px;z-index:1; position: fixed; top: 0; left: 0;}
+ header { left: 129px; }
+ header .am-topbar-brand, .am-topbar-nav > li > a { line-height: 32px; }
+ .admin-sidebar {display:block;width:130px;z-index:1; position: fixed; top: 0; left: 0;}
.admin-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:visible;min-height:100%;}
.admin-offcanvas-bar:after {content:none;}
}
@@ -418,12 +418,11 @@ ul {margin-top:0;}
.admin-sidebar .am-offcanvas-bar { width: 70%; }
}
.common-nav-bar {position:fixed;z-index:10;bottom:30px;right:20px;box-shadow: 0 0 10px 2px #c4c4c4;opacity: 0.8;}
-.admin {width:100%;height:100%;display:flex;display:-webkit-flex;padding-top:35px;background:#fff;}
+.admin {width:100%;height:100%;display:flex;display:-webkit-flex;padding-top:33px;background:#fff;}
.admin .am-g {padding-left:0;padding-right:0;}
/*---right Content---*/
.content-right .content {padding:10px 10px 0 10px;}
.admin-sidebar-list li a {padding:0.6rem;}
-.admin-sidebar-list li a .iconfont { vertical-align: middle; }
.common-left-menu a:hover { background:rgba(118, 119, 120, 0.45); }
.common-left-menu-active {background:#1cc09f !important;color:#fff !important;}
#ifcontent {border:0px;}
@@ -468,7 +467,7 @@ ul {margin-top:0;}
/**
* mini开关
*/
-.menu-scaling-submit{position:fixed;left:174px;top:40px;opacity:.6;width:16px;height:25px;padding:2px;box-shadow:0 0 3px 1px #208fd5;font-size: 18px;}
+.menu-scaling-submit{position:fixed;left:134px;top:40px;opacity:.6;width:16px;height:25px;padding:2px;box-shadow:0 0 3px 1px #208fd5;font-size: 18px;}
/**
* mini小icon
diff --git a/public/static/admin/default/css/iconfontmenu.css b/public/static/admin/default/css/iconfontmenu.css
index c64b77b6d..674a841d1 100755
--- a/public/static/admin/default/css/iconfontmenu.css
+++ b/public/static/admin/default/css/iconfontmenu.css
@@ -9,7 +9,7 @@
.iconfont {
font-family: "iconfont" !important;
- font-size: 16px;
+ font-size: 12px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
diff --git a/public/static/admin/default/css/index.index.css b/public/static/admin/default/css/index.index.css
index de4d35974..e8f0227d1 100644
--- a/public/static/admin/default/css/index.index.css
+++ b/public/static/admin/default/css/index.index.css
@@ -1,5 +1,5 @@
@media only screen and (min-width: 641px) {
#ifcontent {
- padding-left: 170px;
+ padding-left: 130px;
}
}
\ No newline at end of file
diff --git a/public/static/admin/default/js/index.js b/public/static/admin/default/js/index.js
index 6bf6c7b62..a9d69d8d6 100755
--- a/public/static/admin/default/js/index.js
+++ b/public/static/admin/default/js/index.js
@@ -67,11 +67,11 @@ $(function()
$('#ifcontent').animate({paddingLeft: "55px"}, 300);
$('header.admin-header').animate({left: "54px"}, 300);
} else {
- $(this).animate({left: "174px"}, 300);
+ $(this).animate({left: "134px"}, 300);
$(this).removeClass('am-icon-angle-double-right').addClass('am-icon-angle-double-left');
- $('#admin-offcanvas').animate({width: "170px"}, 300);
- $('#ifcontent').animate({paddingLeft: "170px"}, 300);
- $('header.admin-header').animate({left: "169px"}, 300);
+ $('#admin-offcanvas').animate({width: "130px"}, 300);
+ $('#ifcontent').animate({paddingLeft: "130px"}, 300);
+ $('header.admin-header').animate({left: "129px"}, 300);
$('#admin-offcanvas').removeClass('menu-mini-event');
setTimeout(function() {
$('#admin-offcanvas').removeClass('menu-mini');
@@ -162,7 +162,7 @@ $(function()
if($(document).width() <= 640)
{
$('.menu-scaling-submit').attr('data-status', 0);
- $('.menu-scaling-submit').css({"left": "174px"});
+ $('.menu-scaling-submit').css({"left": "134px"});
$('.menu-scaling-submit').removeClass('am-icon-angle-double-right').addClass('am-icon-angle-double-left');
$('#admin-offcanvas').css({"width": "inherit"});
$('#admin-offcanvas').removeClass('menu-mini').removeClass('menu-mini-event');
@@ -171,9 +171,9 @@ $(function()
} else {
if(($('.menu-scaling-submit').attr('data-status') || 0) == 0)
{
- $('#admin-offcanvas').css({"width": "170px"});
- $('#ifcontent').css({"padding-left":"170px"});
- $('header.admin-header').css({"left": "169px"});
+ $('#admin-offcanvas').css({"width": "130px"});
+ $('#ifcontent').css({"padding-left":"130px"});
+ $('header.admin-header').css({"left": "129px"});
}
}
});
diff --git a/public/static/common/css/common.css b/public/static/common/css/common.css
index 7f9a2ce54..0957c53b9 100755
--- a/public/static/common/css/common.css
+++ b/public/static/common/css/common.css
@@ -5,13 +5,14 @@
ul { list-style: none; }
.none { display:none !important; }
.block { display:block !important; }
+.text-deco-none { text-decoration: none !important; }
+.text-deco-line { text-decoration: underline !important; }
/* 没数据 */
.table-no {text-align:center;padding:115px 0;background:#FFF !important;color: #888; }
/* 公共dl样式 */
-.dl-content dt { float: left; padding-left: 5px; overflow: hidden; clear: left;
- width: 120px; }
+.dl-content dt { float: left; padding-left: 5px; overflow: hidden; width: 120px; }
.dl-content dd { padding-left: 120px; }
.dl-content dd:not(:last-child) { border-bottom: 1px solid #efefef; }
.dl-content dt, .dl-content dd { font-weight: normal !important; text-align: left; margin-top: 0px; line-height: 20px; min-height: 40px; padding-top: 10px; padding-bottom: 10px; }
@@ -161,7 +162,7 @@ iframe { border: 0; }
.region-linkage select:not(:first-child) { margin-bottom: 5px; }
/* 表单 */
- form.am-form .am-form-group, .plug-file-upload-view, .business-form-group, .business-form-block { padding: 5px 0 10px 0px; }
+ form.am-form .am-form-group, .plug-file-upload-view, .business-form-group, .business-form-block { padding: 15px 0 10px 0px; }
}
/**
diff --git a/public/static/index/default/css/goods.css b/public/static/index/default/css/goods.css
index 88b43b81b..b26f1cb56 100755
--- a/public/static/index/default/css/goods.css
+++ b/public/static/index/default/css/goods.css
@@ -275,9 +275,9 @@ flex: 1 1 0%;line-height: 16px;cursor: pointer;}
@media only screen and (min-width:640px) {
/*导航固定*/
ul.am-tabs-nav.am-nav.am-nav-tabs {margin-right:10px ;margin-left: 10px;width: auto;}
- .scoll{float: left;width: calc(45% - 10px);max-width:360px;padding-right:20px; }
+ .scoll{float: left;width: calc(45% - 20px);}
.scoll .slider-content { border: 1px solid #eee; }
- .clearfix-right{float:left;width:55%;min-height: 270px;}
+ .clearfix-right{float:right;width:55%;min-height: 270px;}
.iteminfo_parameter.freight{display: block;margin-top: 10px;margin-bottom:10px ;}
.iteminfo_parameter.freight dt{margin-left:-70px ;float: left;margin-right:10px ;padding-top:5px ;padding-bottom:20px ;}
.buy-nav{position: static; margin-top: 20px; overflow: hidden; }
@@ -354,7 +354,7 @@ flex: 1 1 0%;line-height: 16px;cursor: pointer;}
.scoll{display: none;}
.item-inform{max-width:1000px; background:#fff; margin-top: 20px; margin-bottom: 30px; }
- .clearfix-left{display:block;float: left;width:360px;}
+ .clearfix-left{display:block;float: left;width:350px;}
.clearfix-right{width:calc(100% - 370px);margin-left:10px;}
.freight{width:400px;float: left;}
.iteminfo_parameter.freight dt{padding-top:6px ;padding-bottom:0px ;}
@@ -407,7 +407,7 @@ flex: 1 1 0%;line-height: 16px;cursor: pointer;}
/* 小于1025 */
@media only screen and (max-width:1025px) {
ul.am-tabs-nav.am-nav.am-nav-tabs { width:100% !important; left: 0px !important; }
- .goods-detail { padding: 10px; }
+ .goods-detail { padding: 10px 5px; }
}
/* 手机模式下 */
diff --git a/resources/.gitignore b/resources/.gitignore
new file mode 100644
index 000000000..c96a04f00
--- /dev/null
+++ b/resources/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
\ No newline at end of file