Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
纵之格
ShopXO
提交
5eb4bd2b
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,发现更多精彩内容 >>
提交
5eb4bd2b
编写于
12月 16, 2019
作者:
D
Devil
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
分类优化
上级
ee082c9b
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
133 addition
and
40 deletion
+133
-40
application/index/view/default/category/index.html
application/index/view/default/category/index.html
+39
-27
application/index/view/default/public/footer_nav.html
application/index/view/default/public/footer_nav.html
+2
-2
public/static/index/default/css/category.css
public/static/index/default/css/category.css
+81
-11
public/static/index/default/js/category.js
public/static/index/default/js/category.js
+11
-0
未找到文件。
application/index/view/default/category/index.html
浏览文件 @
5eb4bd2b
...
...
@@ -19,35 +19,47 @@
<!-- content -->
<div
class=
"am-container category-list"
>
{{if !empty($goods_category_list)}}
<section
data-am-widget=
"accordion"
class=
"am-accordion am-accordion-gapped"
data-am-accordion=
'{}'
>
{{foreach $goods_category_list as $v}}
<dl
class=
"am-accordion-item am-active"
>
<dt
class=
"am-accordion-title"
>
<a
href=
"{{:MyUrl('index/search/index', ['category_id'=>$v['id']])}}"
title=
"{{$v.name}}"
>
{{$v.name}}
</a>
</dt>
<dd
class=
"am-accordion-bd am-collapse am-in"
>
<div
class=
"am-accordion-content"
>
{{if !empty($v['items'])}}
{{foreach $v.items as $vs}}
<div
class=
"title"
>
<a
href=
"{{:MyUrl('index/search/index', ['category_id'=>$vs['id']])}}"
title=
"{{$vs.name}}"
>
{{$vs.name}}
</a>
</div>
{{if !empty($vs['items'])}}
<ul>
{{foreach $vs.items as $keyss=>$vss}}
<li
class=
"am-fl"
>
<a
{{
if
$
keyss
eq
0}}
class=
"first"
{{/
if
}}
href=
"{{:MyUrl('index/search/index', ['category_id'=>$vss['id']])}}"
title=
"{{$vss.name}}"
>
{{$vss.name}}
</a>
</li>
{{/foreach}}
</ul>
{{/if}}
{{/foreach}}
<ul
class=
"category-nav am-fl"
>
{{foreach $goods_category_list as $k=>$v}}
<li
class=
"am-text-break am-padding-horizontal-sm {{if $k eq 0}} active{{/if}}"
>
{{$v.name}}
</li>
{{/foreach}}
</ul>
{{foreach $goods_category_list as $k=>$v}}
<div
class=
"category-content category-content-{{$k}} am-fr am-padding-top-xs {{if $k neq 0}} none{{/if}}"
>
{{foreach $v.items as $vs}}
<div
class=
"category-item am-padding-sm"
>
<div
class=
"title"
>
<div
class=
"title-value am-fl"
>
{{if !empty($vs['icon'])}}
<a
href=
"{{:MyUrl('index/search/index', ['category_id'=>$vs['id']])}}"
title=
"{{$vs.name}}"
class=
"am-block"
>
<img
src=
"{{$vs.icon}}"
alt=
"{{$vs.name}}"
class=
"category-icon am-block"
/>
</a>
{{/if}}
<p
class=
"am-margin-top-xs"
>
<a
href=
"{{:MyUrl('index/search/index', ['category_id'=>$vs['id']])}}"
title=
"{{$vs.name}}"
>
{{$vs.name}}
</a>
</p>
</div>
</dd>
</dl>
{{/foreach}}
</section>
</div>
{{if !empty($vs['items'])}}
<ul
class=
"am-margin-top-xs"
>
{{foreach $vs.items as $kss=>$vss}}
<li
class=
"am-fl am-text-center"
>
{{if !empty($vss['icon'])}}
<a
href=
"{{:MyUrl('index/search/index', ['category_id'=>$vss['id']])}}"
title=
"{{$vss.name}}"
class=
"am-block am-margin-top-xs"
>
<img
src=
"{{$vss.icon}}"
alt=
"{{$vss.name}}"
class=
"category-icon am-block"
/>
</a>
{{/if}}
<p
class=
"am-margin-top-xs"
>
<a
href=
"{{:MyUrl('index/search/index', ['category_id'=>$vss['id']])}}"
title=
"{{$vss.name}}"
class=
"am-block"
>
{{$vss.name}}
</a>
</p>
</li>
{{/foreach}}
</ul>
{{/if}}
</div>
{{/foreach}}
</div>
{{/foreach}}
{{else /}}
<div
class=
"table-no"
><i
class=
"am-icon-warning"
></i>
没有相关数据
</div>
{{/if}}
...
...
application/index/view/default/public/footer_nav.html
浏览文件 @
5eb4bd2b
{{if MyC('common_is_app_inside_close_header') neq 1 or !in_array(MiniAppEnv(), config('shopxo.mini_app_type_list'))}}
<!-- 友情链接 -->
{{if !empty($link_list)}}
<div
class=
"friendship-list"
>
<div
class=
"friendship-list
am-hide-sm-only
"
>
<div
class=
"am-container"
>
<h2>
友情链接
</h2>
<ul>
...
...
@@ -33,7 +33,7 @@
{{if MyC('common_is_app_inside_close_header') neq 1 or !in_array(MiniAppEnv(), config('shopxo.mini_app_type_list'))}}
<!-- 底部导航 -->
<footer
data-am-widget=
"footer"
class=
"am-footer am-footer-default"
data-am-footer=
"{}"
>
<footer
data-am-widget=
"footer"
class=
"am-footer am-footer-default
am-hide-sm-only
"
data-am-footer=
"{}"
>
<div
class=
"am-container"
>
<!-- 底部导航 -->
{{if !empty($nav_footer)}}
...
...
public/static/index/default/css/category.css
浏览文件 @
5eb4bd2b
.category-list
ul
{
overflow
:
hidden
;
border-bottom
:
1px
dotted
#dedede
;
margin-bottom
:
20px
;
}
.category-list
ul
:last-child
{
border-bottom
:
0
;
margin-bottom
:
0
;
}
.category-list
.title
a
{
font-weight
:
500
;
font-size
:
14px
;
color
:
#666
;
}
.category-list
ul
li
{
margin-right
:
10px
;
line-height
:
38px
;
}
.category-list
ul
li
a
{
color
:
#787878
;
border-left
:
1px
solid
#dedede
;
padding-left
:
10px
;
font-size
:
12px
;
}
.category-list
ul
li
a
.first
{
border-left
:
0
;
padding-left
:
0
;
}
.am-accordion-gapped
.am-accordion-title
{
font-size
:
16px
;
font-weight
:
500
;
}
.category-list
ul
.category-nav
,
.category-list
.category-content
{
overflow-y
:
auto
;
overflow-x
:
hidden
;
}
.category-list
.category-content
{
width
:
calc
(
100%
-
120px
);
}
.category-list
ul
.category-nav
{
width
:
100px
;
background
:
#f1f1f1
;
}
.category-list
ul
.category-nav
li
{
height
:
45px
;
line-height
:
45px
;
font-weight
:
500
;
font-size
:
14px
;
color
:
#888
;
border-left
:
3px
solid
transparent
;
cursor
:
pointer
;
}
.category-list
ul
.category-nav
li
.active
{
background
:
#fff
;
color
:
#d2364c
;
border-left
:
3px
solid
#d2364c
;
}
.category-list
ul
.category-nav
li
:not
(
:first-child
)
{
border-top
:
1px
solid
#e5e5e5
;
}
.category-list
.category-content
.category-icon
{
max-width
:
50px
;
max-height
:
50px
;
}
.category-list
.category-content
.category-item
{
border
:
1px
solid
#eee
;
}
.category-list
.category-content
.category-item
:not
(
:last-child
)
{
margin-bottom
:
15px
;
}
.category-list
.category-content
ul
{
border-top
:
1px
dotted
#f4f4f4
;
}
.category-list
ul
.category-nav
li
,
.category-list
.category-content
.title
,
.category-list
.category-content
ul
{
overflow
:
hidden
;
}
.category-list
.category-content
.title
a
{
font-weight
:
500
;
color
:
#888
;
}
.category-list
.category-content
ul
li
:not
(
:last-child
)
{
margin-right
:
20px
;
}
.category-list
.category-content
ul
li
a
{
color
:
#787878
;
font-size
:
12px
;
line-height
:
22px
;
}
@media
only
screen
and
(
min-width
:
640px
)
{
.am-accordion-gapped
{
margin
:
0
;
}
.category-list
ul
.category-nav
,
.category-list
.category-content
{
height
:
100vh
;
}
.category-list
ul
.category-nav
{
margin-left
:
5px
;
}
.category-list
.category-content
{
margin-right
:
5px
;
}
}
@media
only
screen
and
(
max-width
:
1025px
)
{
.am-accordion-gapped
{
margin
:
0
5px
;
}
@media
only
screen
and
(
min-width
:
1025px
)
{
.category-list
ul
.category-nav
{
margin-left
:
0
;
}
.category-list
.category-content
{
margin-right
:
0
;
}
}
@media
only
screen
and
(
max-width
:
640px
)
{
.am-footer
{
padding-bottom
:
55px
;
}
.category-list
ul
.category-nav
,
.category-list
.category-content
{
height
:
calc
(
100vh
-
97px
);
}
}
\ No newline at end of file
public/static/index/default/js/category.js
0 → 100644
浏览文件 @
5eb4bd2b
$
(
function
()
{
// 分类显/隐
$
(
'
.category-list ul.category-nav li
'
).
on
(
'
mouseover
'
,
function
(){
var
index
=
$
(
this
).
index
();
$
(
'
.category-list ul.category-nav li
'
).
removeClass
(
'
active
'
);
$
(
this
).
addClass
(
'
active
'
);
$
(
'
.category-content
'
).
addClass
(
'
none
'
);
$
(
'
.category-content-
'
+
index
).
removeClass
(
'
none
'
);
});
});
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录