Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
纵之格
ShopXO
提交
620043d0
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 搜索 >>
提交
620043d0
编写于
4月 22, 2019
作者:
D
devil_gong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
细节优化
上级
fea6adb8
变更
9
展开全部
隐藏空白更改
内联
并排
Showing
9 changed file
with
87 addition
and
84 deletion
+87
-84
application/admin/view/default/apphomenav/index.html
application/admin/view/default/apphomenav/index.html
+5
-1
application/admin/view/default/apphomenav/save_info.html
application/admin/view/default/apphomenav/save_info.html
+5
-0
application/index/controller/Index.php
application/index/controller/Index.php
+4
-0
application/index/view/default/goods/index.html
application/index/view/default/goods/index.html
+21
-19
application/index/view/default/index/index.html
application/index/view/default/index/index.html
+14
-34
application/service/AppNavService.php
application/service/AppNavService.php
+16
-2
config/shopxo.sql
config/shopxo.sql
+18
-17
public/static/index/default/css/goods.css
public/static/index/default/css/goods.css
+2
-4
public/static/index/default/css/index.css
public/static/index/default/css/index.css
+2
-7
未找到文件。
application/admin/view/default/apphomenav/index.html
浏览文件 @
620043d0
...
...
@@ -59,6 +59,7 @@
<th>
所属平台
</th>
<th>
导航图标
</th>
<th>
事件值
</th>
<th>
是否需要登录
</th>
<th>
是否启用
</th>
<th>
创建时间
</th>
<th>
操作
</th>
...
...
@@ -88,7 +89,10 @@
{{/if}}
</td>
<td
class=
"am-hide-sm-only"
>
<a
href=
"javascript:;"
class=
"am-icon-btn am-icon-check submit-state {{if $v['is_enable'] eq 1}}am-success{{else /}}am-default{{/if}}"
data-url=
"{{:MyUrl('admin/apphomenav/statusupdate')}}"
data-id=
"{{$v.id}}"
data-state=
"{{$v['is_enable']}}"
data-is-update-status=
"1"
></a>
<a
href=
"javascript:;"
class=
"am-icon-btn am-icon-check submit-state {{if $v['is_need_login'] eq 1}}am-success{{else /}}am-default{{/if}}"
data-url=
"{{:MyUrl('admin/apphomenav/statusupdate')}}"
data-id=
"{{$v.id}}"
data-state=
"{{$v['is_need_login']}}"
data-field=
"is_need_login"
></a>
</td>
<td
class=
"am-hide-sm-only"
>
<a
href=
"javascript:;"
class=
"am-icon-btn am-icon-check submit-state {{if $v['is_enable'] eq 1}}am-success{{else /}}am-default{{/if}}"
data-url=
"{{:MyUrl('admin/apphomenav/statusupdate')}}"
data-id=
"{{$v.id}}"
data-state=
"{{$v['is_enable']}}"
data-field=
"is_enable"
data-is-update-status=
"1"
></a>
</td>
<td>
{{$v.add_time_time}}
</td>
<td
class=
"view-operation"
>
...
...
application/admin/view/default/apphomenav/save_info.html
浏览文件 @
620043d0
...
...
@@ -73,6 +73,11 @@
<label>
顺序
</label>
<input
type=
"number"
placeholder=
"顺序"
name=
"sort"
min=
"0"
max=
"255"
data-validation-message=
"顺序 0~255 之间的数值"
class=
"am-radius"
value=
"{{if isset($data['sort'])}}{{$data.sort}}{{else /}}0{{/if}}"
required
/>
</div>
<div
class=
"am-form-group"
>
<label
class=
"block"
>
是否需要登录
</label>
<input
name=
"is_need_login"
value=
"1"
type=
"checkbox"
data-off-text=
"否"
data-on-text=
"是"
data-size=
"xs"
data-on-color=
"success"
data-off-color=
"default"
data-handle-width=
"50"
data-am-switch
{{
if
!
empty
($
data
)
and
$
data
['
is_need_login
']
eq
1}}
checked=
"true"
{{/
if
}}
/>
</div>
<div
class=
"am-form-group"
>
<label
class=
"block"
>
是否启用
</label>
<input
name=
"is_enable"
value=
"1"
type=
"checkbox"
data-off-text=
"否"
data-on-text=
"是"
data-size=
"xs"
data-on-color=
"success"
data-off-color=
"default"
data-handle-width=
"50"
data-am-switch
{{
if
!
empty
($
data
)
and
$
data
['
is_enable
']
eq
1}}
checked=
"true"
{{/
if
}}
/>
...
...
application/index/controller/Index.php
浏览文件 @
620043d0
...
...
@@ -14,6 +14,7 @@ use app\service\BannerService;
use
app\service\GoodsService
;
use
app\service\ArticleService
;
use
app\service\OrderService
;
use
app\service\AppNavService
;
/**
* 首页
...
...
@@ -49,6 +50,9 @@ class Index extends Common
// 首页轮播
$this
->
assign
(
'banner_list'
,
BannerService
::
Banner
());
// H5导航
$this
->
assign
(
'navigation'
,
AppNavService
::
AppHomeNav
());
// 楼层数据
$this
->
assign
(
'goods_floor_list'
,
GoodsService
::
HomeFloorList
());
...
...
application/index/view/default/goods/index.html
浏览文件 @
620043d0
...
...
@@ -15,26 +15,28 @@
<div
class=
"goods-detail"
data-id=
"{{$goods.id}}"
data-spec-detail-ajax-url=
"{{:MyUrl('index/goods/specdetail')}}"
data-spec-type-ajax-url=
"{{:MyUrl('index/goods/spectype')}}"
>
<!-- 轮播 -->
<div
class=
"scoll"
>
<div
data-am-widget=
"slider"
class=
"am-slider am-slider-a1"
data-am-slider=
'{"directionNav":false}'
>
<ul
class=
"am-slides"
>
{{if !empty($goods.photo)}}
{{foreach $goods.photo as $photo}}
<li>
<img
src=
"{{$photo.images}}"
title=
"{{$goods.title}}"
/>
</li>
{{/foreach}}
{{/if}}
</ul>
</div>
<div
class=
"slider-content"
>
<div
data-am-widget=
"slider"
class=
"am-slider am-slider-a1"
data-am-slider=
'{"directionNav":false}'
>
<ul
class=
"am-slides"
>
{{if !empty($goods.photo)}}
{{foreach $goods.photo as $photo}}
<li>
<img
src=
"{{$photo.images}}"
title=
"{{$goods.title}}"
/>
</li>
{{/foreach}}
{{/if}}
</ul>
</div>
<!-- 视频 -->
{{if !empty($goods.video)}}
<i
class=
"am-icon-play-circle-o goods-video-submit-start"
></i>
<i
class=
"goods-video-submit-close none"
>
×
</i>
<video
class=
"goods-video-container none"
src=
"{{$goods.video}}"
controls=
"controls"
preload=
"auto"
>
your browser does not support the video tag
</video>
{{/if}}
<!-- 视频 -->
{{if !empty($goods.video)}}
<i
class=
"am-icon-play-circle-o goods-video-submit-start"
></i>
<i
class=
"goods-video-submit-close none"
>
×
</i>
<video
class=
"goods-video-container none"
src=
"{{$goods.video}}"
controls=
"controls"
preload=
"auto"
>
your browser does not support the video tag
</video>
{{/if}}
</div>
<!-- 商品页面相册底部钩子 -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}}
...
...
application/index/view/default/index/index.html
浏览文件 @
620043d0
...
...
@@ -21,43 +21,23 @@
<!-- 轮播上内容 -->
<div
class=
"am-container slideall"
>
<!-- 轮播右侧-内容1 -->
<div
class=
"am-g am-g-fixed small-nav"
>
<div
class=
"am-u-sm-3"
>
<a
href=
"{{:MyUrl('index/category/index')}}"
>
<div
class=
"nav-icon mini-nav-goods-category"
>
<img
src=
"{{$attachment_host}}/static/{{$module_name}}/{{$default_theme}}/images/home-mini-nav-category-icon.png"
/>
</div>
<div
class=
"mini-nav-title"
>
分类
</div>
</a>
</div>
<div
class=
"am-u-sm-3"
>
<a
{{
if
empty
($
user
)}}
href=
"javascript:;"
class=
"login-event"
{{
else
/}}
href=
"{{:MyUrl('index/Cart/index')}}"
{{/
if
}}
>
<div
class=
"nav-icon mini-nav-cart"
>
<img
src=
"{{$attachment_host}}/static/{{$module_name}}/{{$default_theme}}/images/home-mini-nav-cart-icon.png"
/>
</div>
<div
class=
"mini-nav-title"
>
购物车
</div>
</a>
</div>
<div
class=
"am-u-sm-3"
>
<a
{{
if
empty
($
user
)}}
href=
"javascript:;"
class=
"login-event"
{{
else
/}}
href=
"{{:MyUrl('index/order/index')}}"
{{/
if
}}
>
<div
class=
"nav-icon mini-nav-order"
>
<img
src=
"{{$attachment_host}}/static/{{$module_name}}/{{$default_theme}}/images/home-mini-nav-order-icon.png"
/>
</div>
<div
class=
"mini-nav-title"
>
订单
</div>
</a>
</div>
<div
class=
"am-u-sm-3"
>
<a
{{
if
empty
($
user
)}}
href=
"javascript:;"
class=
"login-event"
{{
else
/}}
href=
"{{:MyUrl('index/user/index')}}"
{{/
if
}}
>
<div
class=
"nav-icon mini-nav-user"
>
<img
src=
"{{$attachment_host}}/static/{{$module_name}}/{{$default_theme}}/images/home-mini-nav-user-icon.png"
/>
<!-- 轮播右侧-手机导航 -->
{{if !empty($navigation)}}
<div
class=
"am-g am-g-fixed small-nav"
>
{{foreach $navigation as $nav}}
<div
class=
"am-u-sm-3"
>
<a
{{
if
$
nav
['
is_need_login
']
eq
1
and
empty
($
user
)}}
href=
"javascript:;"
class=
"login-event"
{{
else
/}}
href=
"{{$nav.event_value}}"
{{/
if
}}
>
<div
class=
"nav-icon"
style=
"{{if !empty($nav['bg_color'])}}background:{{$nav.bg_color}};{{/if}}"
>
<img
src=
"{{$nav.images_url}}"
alt=
"{{$nav.name}}"
/>
</div>
<div
class=
"mini-nav-title"
>
{{$nav.name}}
</div>
</a>
</div>
<div
class=
"mini-nav-title"
>
我的
</div>
</a>
{{/foreach}}
</div>
</div>
{{/if}}
<!--轮播右侧-
内容2
-->
<!--轮播右侧-
聚合内容
-->
<div
class=
"marqueen"
>
<div
class=
"mod-vip"
>
<div
class=
"m-baseinfo"
>
...
...
application/service/AppNavService.php
浏览文件 @
620043d0
...
...
@@ -46,8 +46,15 @@ class AppNavService
$common_platform_type
=
lang
(
'common_platform_type'
);
$common_is_enable_tips
=
lang
(
'common_is_enable_tips'
);
$common_app_event_type
=
lang
(
'common_app_event_type'
);
$common_is_text_list
=
lang
(
'common_is_text_list'
);
foreach
(
$data
as
&
$v
)
{
// 是否需要登录
if
(
isset
(
$v
[
'is_need_login'
]))
{
$v
[
'is_need_login_text'
]
=
$common_is_text_list
[
$v
[
'is_need_login'
]][
'name'
];
}
// 是否启用
if
(
isset
(
$v
[
'is_enable'
]))
{
...
...
@@ -221,6 +228,7 @@ class AppNavService
'bg_color'
=>
isset
(
$params
[
'bg_color'
])
?
$params
[
'bg_color'
]
:
''
,
'sort'
=>
intval
(
$params
[
'sort'
]),
'is_enable'
=>
isset
(
$params
[
'is_enable'
])
?
intval
(
$params
[
'is_enable'
])
:
0
,
'is_need_login'
=>
isset
(
$params
[
'is_need_login'
])
?
intval
(
$params
[
'is_need_login'
])
:
0
,
];
if
(
empty
(
$params
[
'id'
]))
...
...
@@ -292,6 +300,11 @@ class AppNavService
'key_name'
=>
'id'
,
'error_msg'
=>
'操作id有误'
,
],
[
'checked_type'
=>
'empty'
,
'key_name'
=>
'field'
,
'error_msg'
=>
'操作字段有误'
,
],
[
'checked_type'
=>
'in'
,
'key_name'
=>
'state'
,
...
...
@@ -306,7 +319,7 @@ class AppNavService
}
// 数据更新
if
(
Db
::
name
(
'AppHomeNav'
)
->
where
([
'id'
=>
intval
(
$params
[
'id'
])])
->
update
([
'is_enable'
=>
intval
(
$params
[
'state'
])]))
if
(
Db
::
name
(
'AppHomeNav'
)
->
where
([
'id'
=>
intval
(
$params
[
'id'
])])
->
update
([
$params
[
'field'
]
=>
intval
(
$params
[
'state'
])]))
{
return
DataReturn
(
'编辑成功'
);
}
...
...
@@ -324,7 +337,8 @@ class AppNavService
*/
public
static
function
AppHomeNav
(
$params
=
[])
{
$data
=
Db
::
name
(
'AppHomeNav'
)
->
field
(
'id,name,images_url,event_value,event_type,bg_color'
)
->
where
([
'platform'
=>
APPLICATION_CLIENT_TYPE
,
'is_enable'
=>
1
])
->
order
(
'sort asc'
)
->
select
();
$client_type
=
(
APPLICATION_CLIENT_TYPE
==
'pc'
)
?
(
IsMobile
()
?
'h5'
:
'pc'
)
:
APPLICATION_CLIENT_TYPE
;
$data
=
Db
::
name
(
'AppHomeNav'
)
->
field
(
'id,name,images_url,event_value,event_type,bg_color,is_need_login'
)
->
where
([
'platform'
=>
$client_type
,
'is_enable'
=>
1
])
->
order
(
'sort asc'
)
->
select
();
if
(
!
empty
(
$data
))
{
foreach
(
$data
as
&
$v
)
...
...
config/shopxo.sql
浏览文件 @
620043d0
此差异已折叠。
点击以展开。
public/static/index/default/css/goods.css
浏览文件 @
620043d0
...
...
@@ -179,6 +179,7 @@ ul.am-tabs-nav.am-nav.am-nav-tabs {background: #F5F5F5;}
.box
.goods-video-container
{
line-height
:
32px
;
font-size
:
32px
;
color
:
#f00
;
background
:
#fff
;
text-align
:
center
;
width
:
100%
;
height
:
100%
;
top
:
0
;
left
:
0
;
z-index
:
3
;
}
/* 视频 轮播下 */
.scoll
.slider-content
{
overflow
:
hidden
;
position
:
relative
;
}
.scoll
.goods-video-submit-start
{
left
:
0
;
bottom
:
0
;
z-index
:
2
;
padding
:
10px
10px
5px
10px
;
}
.scoll
.goods-video-submit-close
{
right
:
10px
;
}
.scoll
.goods-video-container
{
line-height
:
32px
;
font-size
:
32px
;
color
:
#f00
;
background
:
#fff
;
text-align
:
center
;
width
:
100%
;
height
:
100%
;
top
:
0
;
left
:
0
;
z-index
:
3
;
}
...
...
@@ -220,8 +221,6 @@ li.am-active hr{border-top: 1px solid #f00;}
.match-title
{
height
:
36px
;
line-height
:
36px
;
font-size
:
16px
;
margin
:
0px
10px
;
border-bottom
:
1px
solid
#E6E6E6
;
color
:
#E4393C
;
font-weight
:
700
;}
.like_list
{
overflow
:
hidden
;}
.like_list
li
{
float
:
left
;
margin-left
:
5px
;
margin-right
:
5px
;
padding-bottom
:
15px
;
text-align
:
center
;}
.s_picBox
{
width
:
100px
;
overflow
:
hidden
;
display
:
block
;}
.s_picBox
img
{
width
:
100%
;}
.info-box-price
{
color
:
#E4393C
;
font-size
:
16px
;
font-family
:
arial
;
font-weight
:
600
;}
.info-original-price
{
display
:
none
;
text-decoration
:
line-through
;
font-size
:
12px
;
color
:
#999
;
margin-left
:
5px
;
font-family
:
arial
;
font-weight
:
400
;}
.like_list
.plus_icon
{
width
:
10px
;
text-align
:
center
;
font-size
:
20px
;
color
:
#C3C3C3
;
height
:
100px
;
line-height
:
100px
;
margin
:
0px
0px
;}
...
...
@@ -300,7 +299,7 @@ li.am-comment{ width:100%}
/*导航固定*/
ul
.am-tabs-nav.am-nav.am-nav-tabs
{
margin-right
:
10px
;
margin-left
:
10px
;
width
:
auto
;}
.scoll
{
float
:
left
;
width
:
calc
(
45%
-
10px
);
max-width
:
360px
;
padding-right
:
20px
;
}
.scoll
.
am-slider
{
border
:
1px
solid
#eee
;
}
.scoll
.
slider-content
{
border
:
1px
solid
#eee
;
}
.clearfix-right
{
float
:
left
;
width
:
55%
;
min-height
:
270px
;}
.iteminfo_parameter.freight
{
display
:
block
;
margin-top
:
10px
;
margin-bottom
:
10px
;}
.iteminfo_parameter.freight
dt
{
margin-left
:
-70px
;
float
:
left
;
margin-right
:
10px
;
padding-top
:
5px
;
padding-bottom
:
20px
;}
...
...
@@ -320,7 +319,6 @@ li.am-comment{ width:100%}
.tm-ind-panel
.tm-count
{
display
:
inline-block
;
line-height
:
16px
;
height
:
16px
;
color
:
#C40000
;
font-weight
:
700
;
margin-left
:
3px
;}
/*搭配*/
.s_picBox
{
width
:
150px
;}
.like_list
.plus_icon
{
height
:
150px
;
line-height
:
150px
;}
.info-original-price
,
.c-title
{
display
:
inline
;}
.like_list
.total_price
.buy_now
{
width
:
102px
;
line-height
:
32px
;
font-size
:
14px
;}
...
...
public/static/index/default/css/index.css
浏览文件 @
620043d0
...
...
@@ -13,17 +13,12 @@ img{max-width:100%;}
.method3
li
{
border
:
none
;
border-left
:
1px
#e8e8e8
solid
;
border-top
:
1px
#e8e8e8
solid
}
dt
+
dd
{
margin-top
:
0
;}
/*手机
专享
*/
/*手机
导航
*/
.small-nav
{
padding
:
10px
0px
;
font-size
:
12px
;}
.small-nav
.am-u-sm-3
{
text-align
:
center
;
margin
:
5px
0
;
}
.small-nav
.nav-icon
{
max-width
:
50px
;
max-height
:
50px
;
padding
:
12px
;
margin
:
0
auto
;
border-radius
:
50px
;
background-color
:
#
d2364
c
;
}
.small-nav
.nav-icon
{
max-width
:
50px
;
max-height
:
50px
;
padding
:
12px
;
margin
:
0
auto
;
border-radius
:
50px
;
background-color
:
#
cc
c
;
}
.small-nav
.am-u-sm-3
:last-child
{
float
:
left
;
}
.small-nav
.mini-nav-title
{
margin-top
:
5px
;
}
.small-nav
.mini-nav-goods-category
{
background-color
:
#FB6E52
;
}
.small-nav
.mini-nav-cart
{
background-color
:
#48CFAE
;
}
.small-nav
.mini-nav-user
{
background-color
:
#49acfa
;
}
.small-nav
.mini-nav-order
{
background-color
:
#fa506c
;
}
.small-nav
.mini-nav-seconds
{
background-color
:
#fa506c
;
}
.small-nav
a
{
text-decoration
:
none
!important
;
}
/*走马灯*/
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录