细节优化

This commit is contained in:
Devil 2021-02-01 16:54:05 +08:00
parent 7cf301b04b
commit 4312467a5c
10 changed files with 106 additions and 41 deletions

View File

@ -70,7 +70,7 @@ class Search extends Common
// 商品规格
$result['goods_spec_list'] = SearchService::SearchGoodsSpecValueList($this->data_request);
return BaseService::DataReturn($result);
}
}

View File

@ -21,9 +21,11 @@
<div class="am-u-md-6 am-u-sm-centered am-text-center">
<i class="am-icon-check-circle am-icon-lg"></i>
<span class="msg">{{$msg}}</span>
<div class="tips-nav">
<a href="{{$Think.__MY_URL__}}" class="am-btn am-btn-secondary am-radius">回到首页</a>
</div>
{{if !isset($is_home) or $is_home eq 1}}
<div class="tips-nav">
<a href="{{$Think.__MY_URL__}}" class="am-btn am-btn-secondary am-radius">回到首页</a>
</div>
{{/if}}
</div>
</div>
<!-- conntent end -->

View File

@ -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}$',

View File

@ -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);
}
}
// 支付处理

View File

@ -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;
}
/**

View File

@ -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',
),
);
?>

View File

@ -6,9 +6,11 @@
2. 商品状态改变、订单库存扣除+回滚新增钩子
3. 支付宝支付插件优化
4. 现金支付插件优化、新增自定义支付信息
5. 订单支付状态金额控制开关
6. 搜索页面价格、参数、规格开关控制
web端
1.
1. 编辑器图片、附件、视频多选支持按照顺序选择插入编辑器
小程序
1.

View File

@ -1,8 +0,0 @@
/**
* 上传文件
*/
.am-form-file input[type="file"] {
width: 95px;
height: 28px;
margin-top: 10px;
}

View File

@ -521,7 +521,7 @@ $(function()
});
// 拖拽
$('ul.goods-photo-view').dragsort({ dragSelector: 'img', placeHolderTemplate: '<li class="drag-sort-dotted"></li>'});
$('ul.goods-photo-view').dragsort({ dragSelector: 'li', placeHolderTemplate: '<li class="drag-sort-dotted"></li>'});
$('ul.content-app-items').dragsort({ dragSelector: 'i.drag-sort-submit', placeHolderTemplate: '<li class="drag-sort-dotted"></li>'});

View File

@ -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; }