Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
飞鱼0526
ShopXO
提交
b081167d
ShopXO
项目概览
飞鱼0526
/
ShopXO
与 Fork 源项目一致
Fork自
纵之格 / ShopXO
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
ShopXO
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b081167d
编写于
6月 07, 2020
作者:
D
devil
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
公共详情模块
上级
82222632
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
172 addition
and
50 deletion
+172
-50
application/admin/controller/Common.php
application/admin/controller/Common.php
+11
-1
application/admin/controller/Goods.php
application/admin/controller/Goods.php
+22
-22
application/admin/view/default/goods/detail.html
application/admin/view/default/goods/detail.html
+7
-13
application/admin/view/default/goods/index.html
application/admin/view/default/goods/index.html
+1
-1
application/admin/view/default/order/detail.html
application/admin/view/default/order/detail.html
+7
-13
application/admin/view/default/public/module/detail.html
application/admin/view/default/public/module/detail.html
+97
-0
application/admin/view/default/public/module/form.html
application/admin/view/default/public/module/form.html
+0
-0
application/index/controller/Common.php
application/index/controller/Common.php
+27
-0
未找到文件。
application/admin/controller/Common.php
浏览文件 @
b081167d
...
...
@@ -122,7 +122,7 @@ class Common extends Controller
// 公共底部钩子
$this
->
assign
(
'plugins_admin_view_common_bottom_data'
,
Hook
::
listen
(
'plugins_admin_view_common_bottom'
,
[
'hook_name'
=>
'plugins_admin_view_common_bottom'
,
'is_backend'
=>
true
,
'admin'
=>
$this
->
admin
]));
// 公共钩子名称动态处理
// 公共
表格
钩子名称动态处理
$current
=
'plugins_view_admin_'
.
$this
->
controller_name
;
// 内容外部顶部
$this
->
assign
(
'hook_name_content_top'
,
$current
.
'_content_top'
);
...
...
@@ -138,6 +138,16 @@ class Common extends Controller
$this
->
assign
(
'hook_name_form_bottom_operate'
,
$current
.
'_bottom_operate'
);
// 表格列表后面操作栏
$this
->
assign
(
'hook_name_form_list_operate'
,
$current
.
'_list_operate'
);
// 公共详情页面钩子名称动态处理
// 内容外部顶部
$this
->
assign
(
'hook_name_detail_top'
,
$current
.
'_detail_top'
);
// 内容外部底部
$this
->
assign
(
'hook_name_detail_bottom'
,
$current
.
'_detail_bottom'
);
// 内容内部顶部
$this
->
assign
(
'hook_name_detail_inside_top'
,
$current
.
'_detail_inside_top'
);
// 内容内部底部
$this
->
assign
(
'hook_name_detail_inside_bottom'
,
$current
.
'_detail_inside_bottom'
);
}
/**
...
...
application/admin/controller/Goods.php
浏览文件 @
b081167d
...
...
@@ -89,28 +89,28 @@ class Goods extends Common
*/
public
function
Detail
()
{
// 参数
$params
=
input
();
// 条件
$where
=
GoodsService
::
GetAdminIndexWhere
(
$params
);
// 获取列表
$data_params
=
array
(
'm'
=>
0
,
'n'
=>
1
,
'where'
=>
$where
,
'is_category'
=>
1
,
);
$ret
=
GoodsService
::
GoodsList
(
$data_params
);
$data
=
(
empty
(
$ret
[
'data'
])
||
empty
(
$ret
[
'data'
][
0
]))
?
[]
:
$ret
[
'data'
][
0
]
;
$this
->
assign
(
'data'
,
$data
);
// 是否上下架
$this
->
assign
(
'common_is_shelves_list'
,
lang
(
'common_is_shelves_list'
));
// 参数
$this
->
assign
(
'params'
,
$params
);
if
(
!
empty
(
$this
->
data_request
[
'id'
]))
{
// 条件
$where
=
[
[
'is_delete_time'
,
'='
,
0
],
[
'id'
,
'='
,
intval
(
$this
->
data_request
[
'id'
])],
];
// 获取列表
$data_params
=
array
(
'm'
=>
0
,
'n'
=>
1
,
'where'
=>
$where
,
'is_category'
=>
1
,
)
;
$ret
=
GoodsService
::
GoodsList
(
$data_params
);
$data
=
(
empty
(
$ret
[
'data'
])
||
empty
(
$ret
[
'data'
][
0
]))
?
[]
:
$ret
[
'data'
][
0
];
$this
->
assign
(
'data'
,
$data
);
// 是否上下架
$this
->
assign
(
'common_is_shelves_list'
,
lang
(
'common_is_shelves_list'
));
}
return
$this
->
fetch
();
}
...
...
application/admin/view/default/goods/detail.html
浏览文件 @
b081167d
{{include file="public/header" /}}
<!-- 继承公共的 detail -->
{{extend name="public/module/detail" /}}
<!--
content start
-->
<div
class=
"am-padding-sm"
>
{{
if !empty($data)
}}
<!--
详情内容
-->
{{if !empty($data)}}
{{
block name="detail_data"
}}
<dl
class=
"dl-content"
>
<dt>
标题名称
</dt>
<dd>
...
...
@@ -89,12 +90,5 @@
<dt>
更新时间
</dt>
<dd>
{{$data.upd_time}}
</dd>
</dl>
{{else /}}
<div
class=
"table-no"
><i
class=
"am-icon-warning"
></i>
没有相关数据
</div>
{{/if}}
</div>
<!-- content end -->
<!-- footer start -->
{{include file="public/footer" /}}
<!-- footer end -->
\ No newline at end of file
{{/block}}
{{/if}}
\ No newline at end of file
application/admin/view/default/goods/index.html
浏览文件 @
b081167d
<!-- 继承公共的 form -->
{{extend name="public/form" /}}
{{extend name="public/
module/
form" /}}
<!-- 表单顶部操作栏 -->
{{block name="form_operate_top"}}
...
...
application/admin/view/default/order/detail.html
浏览文件 @
b081167d
{{include file="public/header" /}}
<!-- 继承公共的 detail -->
{{extend name="public/module/detail" /}}
<!--
content start
-->
<div
class=
"am-padding-sm"
>
{{
if !empty($data)
}}
<!--
详情内容
-->
{{if !empty($data)}}
{{
block name="detail_data"
}}
<dl
class=
"dl-content"
>
<dt>
订单号
</dt>
<dd>
...
...
@@ -237,12 +238,5 @@
<dt>
更新时间
</dt>
<dd>
{{$data.upd_time}}
</dd>
</dl>
{{else /}}
<div
class=
"table-no"
><i
class=
"am-icon-warning"
></i>
没有相关数据
</div>
{{/if}}
</div>
<!-- content end -->
<!-- footer start -->
{{include file="public/footer" /}}
<!-- footer end -->
\ No newline at end of file
{{/block}}
{{/if}}
\ No newline at end of file
application/admin/view/default/public/module/detail.html
0 → 100644
浏览文件 @
b081167d
{{include file="public/header" /}}
<!-- content top hook -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}}
<div
class=
"plugins-tag"
>
<span>
{{$hook_name_detail_top}}
</span>
</div>
{{/if}}
{{php}}
$hook_data = Hook::listen($hook_name_detail_top, ['hook_name'=>$hook_name_detail_top, 'is_backend'=>true]);
if(!empty($hook_data)
&&
is_array($hook_data))
{
foreach($hook_data as $hook)
{
if(is_string($hook) || is_int($hook))
{
echo htmlspecialchars_decode($hook);
}
}
}
{{/php}}
<!-- content start -->
<div
class=
"am-padding-sm"
>
<!-- content inside top hook -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}}
<div
class=
"plugins-tag"
>
<span>
{{$hook_name_detail_inside_top}}
</span>
</div>
{{/if}}
{{php}}
$hook_data = Hook::listen($hook_name_detail_inside_top, ['hook_name'=>$hook_name_detail_inside_top, 'is_backend'=>true]);
if(!empty($hook_data)
&&
is_array($hook_data))
{
foreach($hook_data as $hook)
{
if(is_string($hook) || is_int($hook))
{
echo htmlspecialchars_decode($hook);
}
}
}
{{/php}}
{{if !empty($data)}}
{{block name="detail_data"}}{{/block}}
{{else /}}
{{block name="detail_not_data"}}
<div
class=
"table-no"
><i
class=
"am-icon-warning"
></i>
没有相关数据
</div>
{{/block}}
{{/if}}
<!-- content inside top hook -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}}
<div
class=
"plugins-tag"
>
<span>
{{$hook_name_detail_inside_bottom}}
</span>
</div>
{{/if}}
{{php}}
$hook_data = Hook::listen($hook_name_detail_inside_bottom, ['hook_name'=>$hook_name_detail_inside_bottom, 'is_backend'=>true]);
if(!empty($hook_data)
&&
is_array($hook_data))
{
foreach($hook_data as $hook)
{
if(is_string($hook) || is_int($hook))
{
echo htmlspecialchars_decode($hook);
}
}
}
{{/php}}
</div>
<!-- content end -->
<!-- content bottom hook -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}}
<div
class=
"plugins-tag"
>
<span>
{{$hook_name_detail_bottom}}
</span>
</div>
{{/if}}
{{php}}
$hook_data = Hook::listen($hook_name_detail_bottom, ['hook_name'=>$hook_name_detail_bottom, 'is_backend'=>true]);
if(!empty($hook_data)
&&
is_array($hook_data))
{
foreach($hook_data as $hook)
{
if(is_string($hook) || is_int($hook))
{
echo htmlspecialchars_decode($hook);
}
}
}
{{/php}}
<!-- footer start -->
{{include file="public/footer" /}}
<!-- footer end -->
\ No newline at end of file
application/admin/view/default/public/form.html
→
application/admin/view/default/public/
module/
form.html
浏览文件 @
b081167d
文件已移动
application/index/controller/Common.php
浏览文件 @
b081167d
...
...
@@ -166,6 +166,33 @@ class Common extends Controller
// 底部导航上面钩子
$this
->
assign
(
'plugins_view_common_footer_top_data'
,
Hook
::
listen
(
'plugins_view_common_footer_top'
,
[
'hook_name'
=>
'plugins_view_common_footer_top'
,
'is_backend'
=>
false
,
'user'
=>
$this
->
user
]));
// 公共表格钩子名称动态处理
$current
=
'plugins_view_index_'
.
$this
->
controller_name
;
// 内容外部顶部
$this
->
assign
(
'hook_name_content_top'
,
$current
.
'_content_top'
);
// 内容外部底部
$this
->
assign
(
'hook_name_content_bottom'
,
$current
.
'_content_bottom'
);
// 内容内部顶部
$this
->
assign
(
'hook_name_content_inside_top'
,
$current
.
'_content_inside_top'
);
// 内容内部底部
$this
->
assign
(
'hook_name_content_inside_bottom'
,
$current
.
'_content_inside_bottom'
);
// 表格列表顶部操作
$this
->
assign
(
'hook_name_form_top_operate'
,
$current
.
'_top_operate'
);
// 表格列表底部操作
$this
->
assign
(
'hook_name_form_bottom_operate'
,
$current
.
'_bottom_operate'
);
// 表格列表后面操作栏
$this
->
assign
(
'hook_name_form_list_operate'
,
$current
.
'_list_operate'
);
// 公共详情页面钩子名称动态处理
// 内容外部顶部
$this
->
assign
(
'hook_name_detail_top'
,
$current
.
'_detail_top'
);
// 内容外部底部
$this
->
assign
(
'hook_name_detail_bottom'
,
$current
.
'_detail_bottom'
);
// 内容内部顶部
$this
->
assign
(
'hook_name_detail_inside_top'
,
$current
.
'_detail_inside_top'
);
// 内容内部底部
$this
->
assign
(
'hook_name_detail_inside_bottom'
,
$current
.
'_detail_inside_bottom'
);
}
/**
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录