diff --git a/application/api/controller/Search.php b/application/api/controller/Search.php index c6c936014..2c168a8e2 100755 --- a/application/api/controller/Search.php +++ b/application/api/controller/Search.php @@ -70,7 +70,7 @@ class Search extends Common // 商品规格 $result['goods_spec_list'] = SearchService::SearchGoodsSpecValueList($this->data_request); - + return BaseService::DataReturn($result); } } diff --git a/application/index/view/default/public/login_success.html b/application/index/view/default/public/login_success.html index a9b514a97..c89251a75 100644 --- a/application/index/view/default/public/login_success.html +++ b/application/index/view/default/public/login_success.html @@ -21,9 +21,11 @@
{{$msg}} -
- 回到首页 -
+ {{if !isset($is_home) or $is_home eq 1}} +
+ 回到首页 +
+ {{/if}}
diff --git a/application/lang/zh-cn.php b/application/lang/zh-cn.php index 0aa48fa30..65809e4a1 100755 --- a/application/lang/zh-cn.php +++ b/application/lang/zh-cn.php @@ -391,7 +391,7 @@ return array( 'common_regex_ip' => '^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$', // url - 'common_regex_url' => '^http[s]?:\/\/[A-Za-z0-9]+\.[A-Za-z0-9]+[\/=\?%\-&_~`@[\]\':+!]*([^<>\"\"])*$', + 'common_regex_url' => '^http[s]?:\/\/[A-Za-z0-9-]+\.[A-Za-z0-9]+[\/=\?%\-&_~`@[\]\':+!]*([^<>\"\"])*$', // 控制器名称 'common_regex_control' => '^[A-Za-z]{1}[A-Za-z0-9_]{0,29}$', diff --git a/application/service/OrderService.php b/application/service/OrderService.php index 48481d69e..939e3fed5 100755 --- a/application/service/OrderService.php +++ b/application/service/OrderService.php @@ -636,9 +636,12 @@ class OrderService } // 支付金额是否小于订单金额 - if($pay_ret['data']['pay_price'] < $pay_log_data['total_price']) + if(MyC('common_is_pay_price_must_max_equal', 0) == 1) { - return DataReturn('支付金额小于日志订单金额['.$pay_ret['data']['pay_price'].'<'.$pay_log_data['total_price'].']', -1); + if($pay_ret['data']['pay_price'] < $pay_log_data['total_price']) + { + return DataReturn('支付金额小于日志订单金额['.$pay_ret['data']['pay_price'].'<'.$pay_log_data['total_price'].']', -1); + } } // 支付处理 diff --git a/application/service/SearchService.php b/application/service/SearchService.php index e0a7a1df8..c9e9d0d26 100755 --- a/application/service/SearchService.php +++ b/application/service/SearchService.php @@ -117,6 +117,14 @@ class SearchService */ public static function SearchWhereHandle($params = []) { + // 搜索商品条件处理钩子 + $hook_name = 'plugins_service_search_goods_list_where'; + Hook::listen($hook_name, [ + 'hook_name' => $hook_name, + 'is_backend' => true, + 'params' => &$params, + ]); + // 基础条件 $where_base = [ ['g.is_delete_time', '=', 0], @@ -389,7 +397,12 @@ class SearchService */ public static function ScreeningPriceList($params = []) { - return Db::name('ScreeningPrice')->field('id,name,min_price,max_price')->where(['is_enable'=>1])->order('sort asc')->select(); + $data = []; + if(MyC('home_search_is_price', 0) == 1) + { + $data = Db::name('ScreeningPrice')->field('id,name,min_price,max_price')->where(['is_enable'=>1])->order('sort asc')->select(); + } + return $data; } /** @@ -403,18 +416,23 @@ class SearchService */ public static function SearchGoodsParamsValueList($params = []) { - // 搜索条件 - $where = self::SearchWhereHandle($params); - $base_where = $where['base']; - $where_keywords = $where['keywords']; - $where_screening_price = $where['screening_price']; + $data = []; + if(MyC('home_search_is_params', 0) == 1) + { + // 搜索条件 + $where = self::SearchWhereHandle($params); + $base_where = $where['base']; + $where_keywords = $where['keywords']; + $where_screening_price = $where['screening_price']; - // 一维数组、参数值去重 - return Db::name('Goods')->alias('g')->join(['__GOODS_CATEGORY_JOIN__'=>'gci'], 'g.id=gci.goods_id')->join(['__GOODS_PARAMS__'=>'gp'], 'g.id=gp.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('gp.value')->field('gp.value')->select(); + // 一维数组、参数值去重 + $data = Db::name('Goods')->alias('g')->join(['__GOODS_CATEGORY_JOIN__'=>'gci'], 'g.id=gci.goods_id')->join(['__GOODS_PARAMS__'=>'gp'], 'g.id=gp.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('gp.value')->field('gp.value')->select(); + } + return $data; } /** @@ -428,18 +446,23 @@ class SearchService */ public static function SearchGoodsSpecValueList($params = []) { - // 搜索条件 - $where = self::SearchWhereHandle($params); - $base_where = $where['base']; - $where_keywords = $where['keywords']; - $where_screening_price = $where['screening_price']; + $data = []; + if(MyC('home_search_is_spec', 0) == 1) + { + // 搜索条件 + $where = self::SearchWhereHandle($params); + $base_where = $where['base']; + $where_keywords = $where['keywords']; + $where_screening_price = $where['screening_price']; - // 一维数组、参数值去重 - return Db::name('Goods')->alias('g')->join(['__GOODS_CATEGORY_JOIN__'=>'gci'], 'g.id=gci.goods_id')->join(['__GOODS_SPEC_VALUE__'=>'gsv'], 'g.id=gsv.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('gsv.value')->field('gsv.value')->select(); + // 一维数组、参数值去重 + $data = Db::name('Goods')->alias('g')->join(['__GOODS_CATEGORY_JOIN__'=>'gci'], 'g.id=gci.goods_id')->join(['__GOODS_SPEC_VALUE__'=>'gsv'], 'g.id=gsv.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('gsv.value')->field('gsv.value')->select(); + } + return $data; } /** diff --git a/application/tags.php b/application/tags.php index 7fb4b4ce8..75e794b4d 100755 --- a/application/tags.php +++ b/application/tags.php @@ -32,5 +32,45 @@ return array ( 'log_write' => array ( ), + 'plugins_service_navigation_header_handle' => + array ( + 0 => 'app\\plugins\\store\\Hook', + ), + 'plugins_service_users_center_left_menu_handle' => + array ( + 0 => 'app\\plugins\\store\\Hook', + ), + 'plugins_service_header_navigation_top_right_handle' => + array ( + 0 => 'app\\plugins\\store\\Hook', + ), + 'plugins_service_warehouse_goods_inventory_deduct' => + array ( + 0 => 'app\\plugins\\store\\Hook', + ), + 'plugins_service_warehouse_goods_inventory_rollback' => + array ( + 0 => 'app\\plugins\\store\\Hook', + ), + 'plugins_service_warehouse_goods_inventory_sync' => + array ( + 0 => 'app\\plugins\\store\\Hook', + ), + 'plugins_service_goods_field_status_update' => + array ( + 0 => 'app\\plugins\\store\\Hook', + ), + 'plugins_service_goods_delete' => + array ( + 0 => 'app\\plugins\\store\\Hook', + ), + 'plugins_service_goods_save_end' => + array ( + 0 => 'app\\plugins\\store\\Hook', + ), + 'plugins_service_editor_path_type_admin_goods_saveinfo' => + array ( + 0 => 'app\\plugins\\store\\Hook', + ), ); ?> \ No newline at end of file diff --git a/changelog.txt b/changelog.txt index d9280b825..ca1b34d1f 100755 --- a/changelog.txt +++ b/changelog.txt @@ -6,9 +6,11 @@ 2. 商品状态改变、订单库存扣除+回滚新增钩子 3. 支付宝支付插件优化 4. 现金支付插件优化、新增自定义支付信息 + 5. 订单支付状态金额控制开关 + 6. 搜索页面价格、参数、规格开关控制 web端 - 1. + 1. 编辑器图片、附件、视频多选支持按照顺序选择插入编辑器 小程序 1. diff --git a/public/static/admin/default/css/payment.css b/public/static/admin/default/css/payment.css deleted file mode 100755 index cd7a1fbb2..000000000 --- a/public/static/admin/default/css/payment.css +++ /dev/null @@ -1,8 +0,0 @@ -/** - * 上传文件 - */ -.am-form-file input[type="file"] { - width: 95px; - height: 28px; - margin-top: 10px; -} \ No newline at end of file diff --git a/public/static/admin/default/js/goods.js b/public/static/admin/default/js/goods.js index aade0e4e9..2bc7c05d8 100755 --- a/public/static/admin/default/js/goods.js +++ b/public/static/admin/default/js/goods.js @@ -521,7 +521,7 @@ $(function() }); // 拖拽 - $('ul.goods-photo-view').dragsort({ dragSelector: 'img', placeHolderTemplate: '
  • '}); + $('ul.goods-photo-view').dragsort({ dragSelector: 'li', placeHolderTemplate: '
  • '}); $('ul.content-app-items').dragsort({ dragSelector: 'i.drag-sort-submit', placeHolderTemplate: '
  • '}); diff --git a/public/static/common/css/common.css b/public/static/common/css/common.css index 438313f18..7f9a2ce54 100755 --- a/public/static/common/css/common.css +++ b/public/static/common/css/common.css @@ -85,6 +85,9 @@ form.am-form .am-form-group-refreshing, .plug-file-upload-view { border-bottom: .popup-not-title .am-popup-inner { padding-top: 0; background: #fff; + border: 1px solid #e8e6e6; + -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 { position: absolute; @@ -216,7 +219,7 @@ iframe { border: 0; } /** * 公共图片上传 */ -.am-form-file input[type="file"] { overflow:hidden; width: 96px !important; height: 28px; top: 10px; } +.am-form-file input[type="file"] { overflow:hidden; width: 90px !important; height: 28px; top: 0; } .am-form-file input.original-images-url { display: -webkit-inline-box !important; width: calc(100% - 110px) !important; background: #f5f5f5 !important; float: right; } .am-form-file i.original-images-url-delete { position: absolute; right: 3px; margin-top: 5px; cursor: pointer; background: #f5f5f5; padding: 0px 10px; } .am-form-file input.original-images-url-delete { padding-right: 35px !important; }