diff --git a/application/admin/view/default/goods/save_info.html b/application/admin/view/default/goods/save_info.html index 872c81962..745bc87ce 100755 --- a/application/admin/view/default/goods/save_info.html +++ b/application/admin/view/default/goods/save_info.html @@ -183,250 +183,7 @@
- -
-
- 快捷操作可以快速创建商品SKU,大量节省SKU编辑时间,快捷操作数据不影响SKU数据,仅生成的时候重新覆盖SKU。 -
- +快捷操作 - 生成规格 -
- - - - - - - - - {{if !empty($data['spec_base'])}} - {{foreach $data.spec_base as $spec_base_key=>$spec_base}} - - - - - {{/foreach}} - {{/if}} - -
规格名规格值
- × - - - {{if !empty($spec_base['value'])}} - {{foreach $spec_base.value as $value}} -
- - × -
- {{/foreach}} - {{/if}} -
+添加规格值 -
-
-
-
- - - +添加规格 - 高级批量设置 -
- -
-
-
-

高级批量设置

- × -
-
-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
-
-
- - -
-
-
批量操作 - × -
-
-
- - - - -
-
-
-
- - - - - - {{if !empty($specifications['type'])}} - {{foreach $specifications.type as $type_v}} - - {{/foreach}} - {{/if}} - - - - - - - - - - - {{if empty($specifications['value'])}} - - - - - - - - - - {{/if}} - - {{if !empty($specifications['value'])}} - {{foreach $specifications.value as $line_k=>$line_v}} - - {{foreach $line_v as $v}} - {{if isset($v['data_type'])}} - {{switch v.data_type}} - {{case spec}} - - {{/case}} - - {{case base}} - - - - - - - - {{/case}} - {{/switch}} - {{/if}} - {{/foreach}} - - {{/foreach}} - {{/if}} - -
- × - - - 价格(元) - - - 重量(kg) - - - 规格编码 - - - 条形码 - - - 原价(元) - - 扩展操作
- - - - - - - - - - - - 编辑 - - -
- - - - - - - - - - - - - - 编辑 - - {{if $line_k gt 0}} - 复制 - 移除 - {{else /}} - - {{/if}} -
- +添加一行 - -
+ {{include file="goods/spec" /}}
diff --git a/application/admin/view/default/goods/spec.html b/application/admin/view/default/goods/spec.html new file mode 100644 index 000000000..5dd4f6cd1 --- /dev/null +++ b/application/admin/view/default/goods/spec.html @@ -0,0 +1,248 @@ + +
+
+ 快捷操作可以快速创建商品SKU,大量节省SKU编辑时间,快捷操作数据不影响SKU数据,仅生成的时候重新覆盖SKU。 +
+ +快捷操作 + 生成规格 +
+ + + + + + + + + {{if !empty($data['spec_base'])}} + {{foreach $data.spec_base as $spec_base_key=>$spec_base}} + + + + + {{/foreach}} + {{/if}} + +
规格名规格值
+ × + + + {{if !empty($spec_base['value'])}} + {{foreach $spec_base.value as $value}} +
+ + × +
+ {{/foreach}} + {{/if}} +
+添加规格值 +
+
+
+
+ + ++添加规格 + 高级批量设置 +
+ +
+ + + + {{if !empty($specifications['type'])}} + {{foreach $specifications.type as $type_v}} + + {{/foreach}} + {{/if}} + + + + + + + + + + + {{if empty($specifications['value'])}} + + + + + + + + + + {{/if}} + + {{if !empty($specifications['value'])}} + {{foreach $specifications.value as $line_k=>$line_v}} + + {{foreach $line_v as $v}} + {{if isset($v['data_type'])}} + {{switch v.data_type}} + {{case spec}} + + {{/case}} + + {{case base}} + + + + + + + + {{/case}} + {{/switch}} + {{/if}} + {{/foreach}} + + {{/foreach}} + {{/if}} + +
+ × + + + 价格(元) + + + 重量(kg) + + + 规格编码 + + + 条形码 + + + 原价(元) + + 扩展操作
+ + + + + + + + + + + + 编辑 + + +
+ + + + + + + + + + + + + + 编辑 + + 上移 + 下移 + 复制 + 移除 +
+
+
+ +添加一行 +
+
+
+ 规格名称与规格值保持一致,相同规格名称添加一次即可,重复添加则后面覆盖前面,顺序不影响前端展示效果。 + +添加规格图片 + 列规格自动生成 +
+ +
+
+ + +
+
+
+

高级批量设置

+ × +
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ + +
+
+
批量操作 + × +
+
+
+ + + + +
+
+
+
\ No newline at end of file diff --git a/application/admin/view/default/payment/index.html b/application/admin/view/default/payment/index.html index 705e56125..c23598c0c 100755 --- a/application/admin/view/default/payment/index.html +++ b/application/admin/view/default/payment/index.html @@ -27,7 +27,8 @@

2.1 Config 配置方法

2.2 Pay 支付方法

2.3 Respond 回调方法

-

2.4 Refund 退款方法(可选)

+

2.4 Notify 异步回调方法(可选、未定义则调用Respond方法)

+

2.5 Refund 退款方法(可选、未定义则不能发起原路退款)

3 可自定义输出内容方法

3.1 SuccessReturn 支付成功(可选)

3.2 ErrorReturn 支付失败(可选)

diff --git a/application/admin/view/default/public/goodsparamstemplate/table.html b/application/admin/view/default/public/goodsparamstemplate/table.html index b6dea0fc1..1946e8fd0 100644 --- a/application/admin/view/default/public/goodsparamstemplate/table.html +++ b/application/admin/view/default/public/goodsparamstemplate/table.html @@ -13,44 +13,48 @@ -
- - - - - - - - - - - {{if !empty($parameters) and is_array($parameters)}} - {{foreach $parameters as $pv}} - - - - - - - {{/foreach}} - {{/if}} - -
展示范围参数名称参数值操作
- - - - - - - 上移 - 下移 - 移除 -
- +添加一行 +
+
+ + + + + + + + + + + {{if !empty($parameters) and is_array($parameters)}} + {{foreach $parameters as $pv}} + + + + + + + {{/foreach}} + {{/if}} + +
展示范围参数名称参数值操作
+ + + + + + + 上移 + 下移 + 移除 +
+
+
+ +添加一行 +
\ No newline at end of file diff --git a/application/service/OrderService.php b/application/service/OrderService.php index 406d1a2d4..48481d69e 100755 --- a/application/service/OrderService.php +++ b/application/service/OrderService.php @@ -590,7 +590,15 @@ class OrderService // 支付数据校验 $pay_name = 'payment\\'.PAYMENT_TYPE; - $pay_ret = (new $pay_name($payment['config']))->Respond(array_merge(input('get.'), input('post.'))); + if(!class_exists($pay_name)) + { + return DataReturn('支付方式不存在['.PAYMENT_TYPE.']', -1); + } + $payment_obj = new $pay_name($payment['config']); + + // 是否存在异步方法 + $method = method_exists($payment_obj, 'Notify') ? 'Notify' : 'Respond'; + $pay_ret = $payment_obj->$method(array_merge(input('get.'), input('post.'))); if(!isset($pay_ret['code']) || $pay_ret['code'] != 0) { return $pay_ret; diff --git a/changelog.txt b/changelog.txt index 68c6dead1..90761c151 100755 --- a/changelog.txt +++ b/changelog.txt @@ -3,6 +3,19 @@ +=========================================================+ 全局 1. 新增签到插件 + 2. 新增积分商城插件 + 3. 支付插件支持定义Notify独立异步方法 + 4. 用户地址坐标与身份证信息优化 + 5. 动态数据列表组件条件新增气泡式弹出层 + 6. 支付宝支付插件异步处理优化 + 7. 地区新增全量数据接口 + 8. 公共动态数据表单参数优化 + 9. 友情链接新增手机端显隐控制 + 10. 商品详情新增icon+面板公共信息 + 11. 微信小程序登录授权循环bug修复 + 12. 插件缓存数据优化、重新安装保留配置信息 + 13. 小程序商品标题两行显示优化 + 14. 首页手动模式配置下商品缺失修复 web端 @@ -14,6 +27,7 @@ web端 插件 + +=========================================================+ ShopXO 1.9.2 Release 20201210 http://shopxo.net +=========================================================+ diff --git a/public/static/admin/default/css/common.css b/public/static/admin/default/css/common.css index 0235aeb94..81c3f2c49 100755 --- a/public/static/admin/default/css/common.css +++ b/public/static/admin/default/css/common.css @@ -612,6 +612,39 @@ table.am-table .am-btn-danger:hover { #parameters-quick-container .am-dropdown-content { width: 260px; } +.parameters-container { + border: 1px solid #ddd; +} +.parameters-table { + border: 0; +} +.parameters-table thead tr > th:first-child, +.parameters-table tbody tr > td:first-child { + border-left: 0; +} +.parameters-table thead tr > th:last-child, +.parameters-table tbody tr > td:last-child { + position: sticky; + text-align: center; + z-index: 1; + right: 0; + background: #fff; + -webkit-box-shadow: 0px 0px 1px #ddd; + -moz-box-shadow: 0px 0px 1px #ddd; + box-shadow: 0px 0px 1px #ddd; + -webkit-box-shadow: -5px 0px 10px rgba(136, 136, 136, 0.3); + -moz-box-shadow: -5px 0px 10px rgba(136, 136, 136, 0.3); + box-shadow: -5px 0px 10px rgba(136, 136, 136, 0.3); +} +.parameters-table thead tr > th { + min-width: 100px; +} +.parameters-table thead tr > th:last-child { + width: 120px; + min-width: 120px; + max-width: 120px; +} + /** * 动态数据列表 diff --git a/public/static/admin/default/css/goods.css b/public/static/admin/default/css/goods.css index aa5b03514..ae411fcf4 100755 --- a/public/static/admin/default/css/goods.css +++ b/public/static/admin/default/css/goods.css @@ -74,11 +74,14 @@ right: 0px; z-index: 2; } +.specifications-table th { + min-width: 100px; +} .specifications-table th.operation-btn { - width: 80px; + min-width: 150px; } .specifications-table th.extend-btn { - width: 45px; + min-width: 45px; } #goods-nav-operations { position: relative; @@ -96,6 +99,16 @@ width: 100px; margin: 5px 10px 10px 0; } +.specifications-container { + border: 1px solid #ddd; +} +.specifications-table { + border: 0; +} +.specifications-table thead tr > th:first-child, +.specifications-table tbody tr > td:first-child { + border-left: 0; +} .specifications-table thead th i { cursor: pointer; } @@ -103,10 +116,26 @@ width: 30px !important; padding: 1px !important; } - +.specifications-table thead tr > th:nth-last-child(-n+2), +.specifications-table tbody tr > td:nth-last-child(-n+2) { + position: sticky; + text-align: center; + z-index: 1; + right: 0; + background: #fff; +} +.specifications-table thead tr > th:nth-last-child(2), +.specifications-table tbody tr > td:nth-last-child(2) { + right: 150px; + -webkit-box-shadow: 0px 0px 1px #ddd; + -moz-box-shadow: 0px 0px 1px #ddd; + box-shadow: 0px 0px 1px #ddd; + -webkit-box-shadow: -5px 0px 10px rgba(136, 136, 136, 0.3); + -moz-box-shadow: -5px 0px 10px rgba(136, 136, 136, 0.3); + box-shadow: -5px 0px 10px rgba(136, 136, 136, 0.3); +} /** - * 属性 * app详情 */ i.drag-sort-submit { diff --git a/public/static/admin/default/js/common.js b/public/static/admin/default/js/common.js index ac28050c5..965d1876e 100644 --- a/public/static/admin/default/js/common.js +++ b/public/static/admin/default/js/common.js @@ -77,16 +77,8 @@ function FormTableHeightHandle() $(function() { - // 商品参数添加 - var $parameters_table = $('.parameters-table'); - $('.parameters-line-add').on('click', function() - { - // 追加内容 - ParametersItemHtmlCreated(); - }); - - // 商品参数移动 - $parameters_table.on('click', '.line-move', function() + // 商品规格和参数上下移动 + $('.specifications-table,.parameters-table').on('click', '.line-move', function() { // 类型 var type = $(this).data('type') || null; @@ -97,7 +89,7 @@ $(function() } // 索引 - var count = $parameters_table.find('tbody tr').length; + var count = $(this).parents('table').find('tbody tr').length; var index = $(this).parents('tr').index() || 0; var $parent = $(this).parents('tr'); switch(type) @@ -128,6 +120,14 @@ $(function() } }); + // 商品参数添加 + var $parameters_table = $('.parameters-table'); + $('.parameters-line-add').on('click', function() + { + // 追加内容 + ParametersItemHtmlCreated(); + }); + // 商品参数移除 $parameters_table.on('click', '.line-remove', function() { diff --git a/public/static/admin/default/js/goods.js b/public/static/admin/default/js/goods.js index 16183b13e..fd2b6921e 100755 --- a/public/static/admin/default/js/goods.js +++ b/public/static/admin/default/js/goods.js @@ -134,10 +134,6 @@ $(function() var index = parseInt(Math.random()*1000001); var html = $('.specifications-table').find('tbody tr:last').prop('outerHTML'); - if(html.indexOf('') >= 0) - { - html = html.replace(//ig, '复制 移除'); - } $('.specifications-table').append(html); $('.specifications-table').find('tbody tr:last').attr('class', 'line-'+index+' line-not-first'); $('.specifications-table').find('tbody tr:last').attr('data-line-tag', '.line-'+index); @@ -152,6 +148,14 @@ $(function() // 规格行复制 $(document).on('click', '.specifications-table .line-copy', function() { + // 是否存在规格名称 + if($('.specifications-table th.table-title').length <= 0) + { + Prompt('请先添加规格'); + return false; + } + + // 开始复制 var index = parseInt(Math.random()*1000001); var $parent = $(this).parents('tr'); $parent.find('input').each(function(k, v) @@ -166,13 +170,22 @@ $(function() // 规格行移除 $(document).on('click', '.specifications-table .line-remove', function() { + // 不能全部移除,至少需要保留一行 + if($('.specifications-table tbody tr').length <= 1) + { + Prompt('至少需要保留一行规格值'); + return false; + } + + // 移除操作 $(this).parents('tr').remove(); + // 规格列判断 if($('.specifications-table tbody tr').length <= 1) { $('.specifications-table th.table-title').remove(); $('.specifications-table td.table-value').remove(); - $('ul.spec-images-list').html(''); + $('.spec-images-list ul.spec-images-content').html(''); } }); @@ -200,11 +213,11 @@ $(function() html += ''; html += '
+上传图片
'; html += ''; - $('ul.spec-images-list').append(html); + $('.spec-images-list ul.spec-images-content').append(html); }); // 规格图片删除 - $('ul.spec-images-list').on('click', 'ul.plug-file-upload-view li i', function() + $('.spec-images-list ul.spec-images-content').on('click', 'ul.plug-file-upload-view li i', function() { $(this).parents('li.spec-images-items').remove(); }); @@ -240,61 +253,62 @@ $(function() data.push(value); } }); - - // 创建图片规格 - if(data.length > 0) + if(data.length <= 0) { - // 获取已存在规格图片 - var data_old = []; - $('ul.spec-images-list li.spec-images-items').each(function(k, v) - { - var value = $(this).find('input').val() || null; - if(value == null) - { - $(this).remove(); - } else if(data_old.indexOf(value) == -1) - { - data_old.push(value); - } - }); + Prompt('请先填写规格'); + return false; + } - // 循环添加 - for(var i in data) + // 获取已存在规格图片 + var data_old = []; + $('.spec-images-list ul.spec-images-content li.spec-images-items').each(function(k, v) + { + var value = $(this).find('input').val() || null; + if(value == null) { - // 开始添加,不存在则不添加 - if(data_old.indexOf(data[i]) == -1) - { - var index = parseInt(Math.random()*1000001); - var temp_class = 'spec-images-items-'+index; - var html = '
  • '; - html += '' - html += ''; - html += '
    +上传图片
    '; - html += '
  • '; - $('ul.spec-images-list').append(html); - } + $(this).remove(); + } else if(data_old.indexOf(value) == -1) + { + data_old.push(value); } + }); - // 原始图片规格不存在指定规格列中则移除 - for(var i in data_old) + // 循环添加 + for(var i in data) + { + // 开始添加,不存在则不添加 + if(data_old.indexOf(data[i]) == -1) { - if(data.indexOf(data_old[i]) == -1) + var index = parseInt(Math.random()*1000001); + var temp_class = 'spec-images-items-'+index; + var html = '
  • '; + html += '' + html += ''; + html += '
    +上传图片
    '; + html += '
  • '; + $('.spec-images-list ul.spec-images-content').append(html); + } + } + + // 原始图片规格不存在指定规格列中则移除 + for(var i in data_old) + { + if(data.indexOf(data_old[i]) == -1) + { + $('.spec-images-list ul.spec-images-content li.spec-images-items').each(function(k, v) { - $('ul.spec-images-list li.spec-images-items').each(function(k, v) + var value = $(this).find('input').val() || null; + if(value == data_old[i]) { - var value = $(this).find('input').val() || null; - if(value == data_old[i]) - { - $(this).remove(); - } - }); - } + $(this).remove(); + } + }); } } }); @@ -527,8 +541,7 @@ $(function() - // 快捷操作 - // 规格列添加 + // 规格快捷操作 - 规格列添加 $('.quick-spec-title-add').on('click', function() { var spec_max = $('#goods-nav-operations').data('spec-add-max-number') || 3; @@ -565,7 +578,7 @@ $(function() $(this).parent().before(html); }); - // 规格名称移除 + // 规格快捷操作 - 规格名称移除 $(document).on('click', '.spec-quick table .quick-title-remove', function() { $(this).parents('tr').remove(); @@ -575,13 +588,13 @@ $(function() } }); - // 规格值移除 + // 规格快捷操作 - 规格值移除 $(document).on('click', '.spec-quick table .value-item .quick-value-remove', function() { $(this).parent().remove(); }); - // 生成规格 + // 规格快捷操作 - 生成规格 $('.quick-spec-created').on('click', function() { var spec = []; @@ -649,10 +662,6 @@ $(function() { // 添加规格值 var html = $('.specifications-table').find('tbody tr:last').prop('outerHTML'); - if(html.indexOf('') >= 0) - { - html = html.replace(//ig, '复制 移除'); - } $('.specifications-table').append(html); $('.specifications-table').find('tbody tr:last').attr('class', 'line-'+index+' line-not-first'); $('.specifications-table').find('tbody tr:last').attr('data-line-tag', '.line-'+index); diff --git a/public/static/common/css/common.css b/public/static/common/css/common.css index 1bfab6626..81b046cc6 100755 --- a/public/static/common/css/common.css +++ b/public/static/common/css/common.css @@ -143,6 +143,12 @@ form.am-form .am-form-group-refreshing, .plug-file-upload-view { border-bottom: */ iframe { border: 0; } +/* 表单全屏 */ +.am-popup .am-form-group, +.am-modal .am-form-group, +.business-form-block { + padding: 10px 5px !important; +} /** * H5 @@ -163,9 +169,6 @@ iframe { border: 0; } form.am-form .am-form-group:hover, .plug-file-upload-view:hover { background: #f6f9fc; } form.am-form .am-form-group-refreshing:hover { background: none; } - /* 弹窗 */ - .am-popup form.am-form .am-form-group, .am-modal form.am-form .am-form-group, .business-form-block { padding: 10px 5px; } - /* 地址联动 */ .region-linkage select { width: 33%; display: -webkit-inline-box; }