Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
纵之格
ShopXO
提交
4988f752
ShopXO
项目概览
纵之格
/
ShopXO
通知
394
Star
16
Fork
11
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
ShopXO
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
4988f752
编写于
12月 25, 2020
作者:
D
Devil
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
商品详情新增icon+面板公共信息
上级
7a855922
变更
9
展开全部
显示空白变更内容
内联
并排
Showing
9 changed file
with
48152 addition
and
8 deletion
+48152
-8
application/admin/view/default/site/siteset/index.html
application/admin/view/default/site/siteset/index.html
+1
-1
application/index/view/default/goods/index.html
application/index/view/default/goods/index.html
+23
-0
application/service/GoodsService.php
application/service/GoodsService.php
+22
-1
application/service/OrderSplitService.php
application/service/OrderSplitService.php
+5
-0
application/tags.php
application/tags.php
+76
-0
config/shopxo.sql
config/shopxo.sql
+47985
-5
public/core.php
public/core.php
+1
-1
public/static/common/js/common.js
public/static/common/js/common.js
+6
-0
public/static/index/default/css/goods.css
public/static/index/default/css/goods.css
+33
-0
未找到文件。
application/admin/view/default/site/siteset/index.html
浏览文件 @
4988f752
...
...
@@ -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}}"
>
...
...
application/index/view/default/goods/index.html
浏览文件 @
4988f752
...
...
@@ -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"
>
...
...
application/service/GoodsService.php
浏览文件 @
4988f752
...
...
@@ -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
,
[
...
...
application/service/OrderSplitService.php
浏览文件 @
4988f752
...
...
@@ -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
;
}
}
}
}
...
...
application/tags.php
浏览文件 @
4988f752
...
...
@@ -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'
,
),
);
?>
\ No newline at end of file
config/shopxo.sql
浏览文件 @
4988f752
此差异已折叠。
点击以展开。
public/core.php
浏览文件 @
4988f752
...
...
@@ -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'
,
'/'
);
...
...
public/static/common/js/common.js
浏览文件 @
4988f752
...
...
@@ -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
;
}
...
...
public/static/index/default/css/goods.css
浏览文件 @
4988f752
...
...
@@ -458,3 +458,36 @@ flex: 1 1 0%;line-height: 16px;cursor: pointer;}
@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
;
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录