mirror of
https://gitee.com/zongzhige/shopxo.git
synced 2024-12-02 03:48:47 +08:00
商品详情新增icon+面板公共信息
This commit is contained in:
parent
7a8559226e
commit
4988f75293
@ -162,7 +162,7 @@
|
||||
<span>{{$category.name}}</span>
|
||||
<span class="am-margin-left-sm form.am-form am-form-group-label-tips">{{$category.vice_name}}</span>
|
||||
</p>
|
||||
<ul class="am-list am-list-border am-margin-top-sm manual-mode-goods-container manual-mode-goods-container-{{$category.id}}">
|
||||
<ul class="am-list am-list-border am-list-striped am-margin-top-sm manual-mode-goods-container manual-mode-goods-container-{{$category.id}}">
|
||||
{{if !empty($floor_manual_mode_goods_list) && !empty($floor_manual_mode_goods_list[$category['id']])}}
|
||||
{{foreach $floor_manual_mode_goods_list[$category['id']] as $g}}
|
||||
<li class="manual-mode-goods-item-{{$g.id}}">
|
||||
|
@ -137,6 +137,18 @@
|
||||
<div class="tb-detail-hd">
|
||||
<h1 class="detail-title am-margin-bottom-xs" {{if !empty($goods.title_color)}}style="color:{{$goods.title_color}};"{{/if}}>
|
||||
{{$goods.title}}
|
||||
|
||||
<!-- 公共icon数据 -->
|
||||
{{if !empty($goods['plugins_view_icon_data']) and is_array($goods['plugins_view_icon_data'])}}
|
||||
<span class="goods-plugins-view-icon-container">
|
||||
{{foreach $goods.plugins_view_icon_data as $v}}
|
||||
{{if !empty($v) or is_array($v) and !empty($v['name'])}}
|
||||
<span class="am-badge am-radius" style="{{if !empty($v['br_color'])}}border:1px solid {{$v.br_color}};{{/if}}{{if !empty($v['color'])}}color:{{$v.color}};{{/if}}">{{$v.name}}</span>
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
</span>
|
||||
{{/if}}
|
||||
|
||||
<!-- 商品页面基础信息标题里面钩子 -->
|
||||
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}}
|
||||
<div class="plugins-tag">
|
||||
@ -156,6 +168,17 @@
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="tb-detail-list">
|
||||
<!-- 公共面板数据 -->
|
||||
{{if !empty($goods['plugins_view_panel_data']) and is_array($goods['plugins_view_panel_data'])}}
|
||||
<div class="goods-plugins-view-panel-container am-margin-bottom-sm">
|
||||
{{foreach $goods.plugins_view_panel_data as $v}}
|
||||
{{if is_string($v) or is_int($v)}}
|
||||
<p>{{$v}}</p>
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
<!-- 商品页面基础信息顶部钩子 -->
|
||||
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}}
|
||||
<div class="plugins-tag">
|
||||
|
@ -586,10 +586,31 @@ class GoodsService
|
||||
$v['content_app'] = self::GoodsContentAppData(['goods_id'=>$data_id]);
|
||||
}
|
||||
|
||||
// 展示字段
|
||||
// 价格字段
|
||||
// 原价
|
||||
// 销售价
|
||||
$v['show_field_original_price_text'] = '原价';
|
||||
$v['show_field_price_text'] = '销售价';
|
||||
|
||||
|
||||
// 公共插件数据
|
||||
// 商品详情面板提示数据、一维数组
|
||||
$v['plugins_view_panel_data'] = [];
|
||||
|
||||
// 商品详情icon数据、二维数组
|
||||
// name 必填(建议不超过6个字符)
|
||||
// bg_color 默认(#fff)
|
||||
// br_color 默认(#3bb4f2)
|
||||
// color 默认($3bb4f2)
|
||||
// [
|
||||
// 'name' => 'icon名称',
|
||||
// 'bg_color' => '#fff',
|
||||
// 'br_color' => '#3bb4f2',
|
||||
// 'color' => '#3bb4f2',
|
||||
// ]
|
||||
$v['plugins_view_icon_data'] = [];
|
||||
|
||||
|
||||
// 商品处理后钩子
|
||||
$hook_name = 'plugins_service_goods_handle_end';
|
||||
$ret = HookReturnHandle(Hook::listen($hook_name, [
|
||||
|
@ -92,6 +92,11 @@ class OrderSplitService
|
||||
$v['order_base']['actual_price'] = PriceNumberFormat(($v['order_base']['actual_price']+$ext['inc'])-$ext['dec']);
|
||||
$v['order_base']['total_price'] = PriceNumberFormat($v['order_base']['total_price']);
|
||||
|
||||
// 防止实际金额负数
|
||||
if($v['order_base']['actual_price'] < 0)
|
||||
{
|
||||
$v['order_base']['actual_price'] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -32,5 +32,81 @@ return array (
|
||||
'log_write' =>
|
||||
array (
|
||||
),
|
||||
'plugins_css' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\points\\Hook',
|
||||
1 => 'app\\plugins\\limitedtimediscount\\Hook',
|
||||
),
|
||||
'plugins_js' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\points\\Hook',
|
||||
1 => 'app\\plugins\\limitedtimediscount\\Hook',
|
||||
),
|
||||
'plugins_service_navigation_header_handle' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\points\\Hook',
|
||||
1 => 'app\\plugins\\limitedtimediscount\\Hook',
|
||||
),
|
||||
'plugins_service_goods_handle_end' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\points\\Hook',
|
||||
1 => 'app\\plugins\\limitedtimediscount\\Hook',
|
||||
),
|
||||
'plugins_view_buy_base_confirm_top' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\points\\Hook',
|
||||
),
|
||||
'plugins_service_buy_group_goods_handle' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\points\\Hook',
|
||||
),
|
||||
'plugins_service_quick_navigation_pc' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\signin\\Hook',
|
||||
),
|
||||
'plugins_service_quick_navigation_h5' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\signin\\Hook',
|
||||
),
|
||||
'plugins_service_quick_navigation_weixin' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\signin\\Hook',
|
||||
),
|
||||
'plugins_service_quick_navigation_alipay' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\signin\\Hook',
|
||||
),
|
||||
'plugins_service_quick_navigation_baidu' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\signin\\Hook',
|
||||
),
|
||||
'plugins_service_quick_navigation_qq' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\signin\\Hook',
|
||||
),
|
||||
'plugins_service_quick_navigation_toutiao' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\signin\\Hook',
|
||||
),
|
||||
'plugins_service_users_center_left_menu_handle' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\signin\\Hook',
|
||||
),
|
||||
'plugins_service_header_navigation_top_right_handle' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\signin\\Hook',
|
||||
),
|
||||
'plugins_service_goods_spec_base' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\limitedtimediscount\\Hook',
|
||||
),
|
||||
'plugins_view_goods_detail_base_top' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\limitedtimediscount\\Hook',
|
||||
),
|
||||
'plugins_view_home_floor_top' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\limitedtimediscount\\Hook',
|
||||
),
|
||||
);
|
||||
?>
|
47990
config/shopxo.sql
47990
config/shopxo.sql
File diff suppressed because one or more lines are too long
@ -13,7 +13,7 @@
|
||||
if(version_compare(PHP_VERSION,'5.6.0','<')) die('PHP版本最低 5.6.0');
|
||||
|
||||
// 系统版本
|
||||
define('APPLICATION_VERSION', 'v1.9.2');
|
||||
define('APPLICATION_VERSION', 'v1.9.3');
|
||||
|
||||
// 定义系统目录分隔符
|
||||
define('DS', '/');
|
||||
|
@ -1396,6 +1396,12 @@ function UrlFieldReplace(field, value, url)
|
||||
url += '?'+field+'='+value;
|
||||
}
|
||||
}
|
||||
|
||||
// 多余的双斜杠处理、这里防止://被处理 首先换成特殊字符再换回来
|
||||
url = url.replace(/\:\/\//ig, '{--re--join--re--}');
|
||||
url = url.replace(/\/\//ig, '/');
|
||||
url = url.replace(/\{\-\-re\-\-join\-\-re\-\-\}/ig, '://');
|
||||
|
||||
return url+anchor;
|
||||
}
|
||||
|
||||
|
@ -457,4 +457,37 @@ flex: 1 1 0%;line-height: 16px;cursor: pointer;}
|
||||
.exhibition-nav div.submit { width: 60%; }
|
||||
@media only screen and (min-width:641px) {
|
||||
.exhibition-nav .buy-nav-opt { margin-left: 120px; }
|
||||
}
|
||||
|
||||
/**
|
||||
* 插件公共数据
|
||||
*/
|
||||
/**
|
||||
* 插件公共面板数据
|
||||
*/
|
||||
.goods-plugins-view-panel-container {
|
||||
background: #ffedf0;
|
||||
color: #d2354c;
|
||||
}
|
||||
.goods-plugins-view-panel-container p {
|
||||
padding: 5px 10px;
|
||||
}
|
||||
.goods-plugins-view-panel-container p:not(:first-child) {
|
||||
border-top: 1px dashed #ffdbdf;
|
||||
}
|
||||
@media only screen and (max-width:641px) {
|
||||
.goods-plugins-view-panel-container p {
|
||||
padding: 5px;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 插件公共icon数据
|
||||
*/
|
||||
.goods-plugins-view-icon-container span {
|
||||
background: #fff;
|
||||
border: 1px solid #3bb4f2;
|
||||
color: #3bb4f2;
|
||||
}
|
||||
.goods-plugins-view-icon-container span:not(:first-child) {
|
||||
margin-left: 5px;
|
||||
}
|
Loading…
Reference in New Issue
Block a user