Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
starsw001
ShopXO
提交
da041701
ShopXO
项目概览
starsw001
/
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,发现更多精彩内容 >>
提交
da041701
编写于
9月 25, 2019
作者:
D
devil_gong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
购物车优化
上级
3beec8f4
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
15 addition
and
28 deletion
+15
-28
application/index/view/default/cart/index.html
application/index/view/default/cart/index.html
+8
-6
application/service/GoodsService.php
application/service/GoodsService.php
+2
-2
public/static/index/default/css/cart.css
public/static/index/default/css/cart.css
+0
-3
public/static/index/default/js/cart.js
public/static/index/default/js/cart.js
+5
-17
未找到文件。
application/index/view/default/cart/index.html
浏览文件 @
da041701
...
...
@@ -34,7 +34,9 @@
{{foreach $cart_list as $goods}}
<tr
id=
"data-list-{{$goods.id}}"
data-id=
"{{$goods.id}}"
data-goods-id=
"{{$goods.goods_id}}"
class=
"{{if $goods['is_shelves'] neq 1}}am-warning{{/if}} {{if $goods['is_delete_time'] neq 0}}am-danger{{/if}}"
>
<td
class=
"base"
>
<input
type=
"checkbox"
value=
"{{$goods.id}}"
{{
if
$
goods
['
is_shelves
']
neq
1
or
$
goods
['
is_delete_time
']
neq
0}}
disabled
{{/
if
}}
/>
<label
class=
"am-checkbox-inline am-success am-fl"
>
<input
type=
"checkbox"
value=
"{{$goods.id}}"
{{
if
$
goods
['
is_shelves
']
neq
1
or
$
goods
['
is_delete_time
']
neq
0}}
disabled
{{/
if
}}
data-am-ucheck
/>
</label>
<div
class=
"goods-detail"
>
<a
href=
"{{$goods.goods_url}}"
target=
"_blank"
>
<img
src=
"{{$goods.images}}"
>
...
...
@@ -90,12 +92,12 @@
<!-- 导航 -->
<div
class=
"cart-nav"
>
<div
class=
"am-fl nav-left"
>
<label>
<input
type=
"checkbox"
value=
"
3"
class=
"select-all-event"
/>
<span>
全选
</span>
<div
class=
"am-fl nav-left
am-margin-left-xs
"
>
<label
class=
"am-checkbox-inline am-success select-all-event"
>
<input
type=
"checkbox"
value=
"
1"
data-am-ucheck
/>
<span
class=
"el-text"
>
全选
</span>
</label>
<a
href=
"javascript:;"
class=
"submit-ajax"
data-url=
"{{:MyUrl('index/cart/delete')}}"
data-id=
"{{$base.ids}}"
data-view=
"reload"
data-msg=
"清空后不可恢复、确认操作吗?"
>
清空
</a>
<a
href=
"javascript:;"
class=
"
am-margin-left-sm
submit-ajax"
data-url=
"{{:MyUrl('index/cart/delete')}}"
data-id=
"{{$base.ids}}"
data-view=
"reload"
data-msg=
"清空后不可恢复、确认操作吗?"
>
清空
</a>
</div>
<div
class=
"am-fr nav-right"
>
<form
action=
"{{:MyUrl('index/buy/index')}}"
method=
"post"
>
...
...
application/service/GoodsService.php
浏览文件 @
da041701
...
...
@@ -288,7 +288,7 @@ class GoodsService
'is_backend'
=>
true
,
'params'
=>
&
$params
,
'goods'
=>
&
$v
,
'goods_id'
=>
$v
[
'id'
]
'goods_id'
=>
isset
(
$v
[
'id'
])
?
$v
[
'id'
]
:
0
,
]);
if
(
isset
(
$ret
[
'code'
])
&&
$ret
[
'code'
]
!=
0
)
{
...
...
@@ -425,7 +425,7 @@ class GoodsService
'is_backend'
=>
true
,
'params'
=>
&
$params
,
'goods'
=>
&
$v
,
'goods_id'
=>
$v
[
'id'
]
'goods_id'
=>
isset
(
$v
[
'id'
])
?
$v
[
'id'
]
:
0
,
]);
if
(
isset
(
$ret
[
'code'
])
&&
$ret
[
'code'
]
!=
0
)
{
...
...
public/static/index/default/css/cart.css
浏览文件 @
da041701
...
...
@@ -17,15 +17,12 @@
strong
.total-price-content
,
.selected-tips
strong
,
.nav-total-price
{
color
:
#d2364c
;
font-family
:
Verdana
,
Tahoma
,
arial
;
}
.am-table
{
margin-bottom
:
10px
;
}
.am-table
>
tbody
>
tr
>
td
{
border-top
:
1px
solid
#F5F5F5
;
}
.cart-content
table
td
.base
input
[
type
=
"checkbox"
]
{
float
:
left
;
}
.cart-nav
{
background
:
#eee
;
height
:
50px
;
line-height
:
46px
;
}
.cart-nav
.separate-submit
{
height
:
50px
;
width
:
100px
;
font-size
:
20px
;
font-weight
:
500
;
}
.selected-tips
{
margin-right
:
15px
;
}
.cart-nav
label
{
font-weight
:
500
;
margin
:
0
;
}
.cart-nav
input
[
type
=
"checkbox"
]
{
vertical-align
:
inherit
;
}
.cart-nav
.nav-left
{
margin-left
:
5px
;
}
.cart-nav
.nav-left
a
{
margin-left
:
10px
;
}
@media
only
screen
and
(
min-width
:
640px
)
{
.cart-content
table
tr
.base
{
width
:
30%
;
}
...
...
public/static/index/default/js/cart.js
浏览文件 @
da041701
...
...
@@ -108,25 +108,13 @@ $(function()
// 全选/反选
$
(
'
.select-all-event
'
).
on
(
'
click
'
,
function
()
{
if
(
$
(
this
).
prop
(
'
checked
'
))
if
(
$
(
this
).
find
(
'
input
'
).
is
(
'
:
checked
'
))
{
$
(
this
).
next
().
text
(
'
取消
'
);
$
(
'
.am-table input[type="checkbox"]
'
).
each
(
function
(
k
,
v
)
{
if
(
!
$
(
this
).
prop
(
'
disabled
'
))
{
this
.
checked
=
true
;
}
});
$
(
this
).
find
(
'
span.el-text
'
).
text
(
'
反选
'
);
$
(
'
.am-table
'
).
find
(
'
input[type="checkbox"]
'
).
uCheck
(
'
check
'
);
}
else
{
$
(
this
).
next
().
text
(
'
全选
'
);
$
(
'
.am-table input[type="checkbox"]
'
).
each
(
function
(
k
,
v
)
{
if
(
!
$
(
this
).
prop
(
'
disabled
'
))
{
this
.
checked
=
false
;
}
});
$
(
this
).
find
(
'
span.el-text
'
).
text
(
'
全选
'
);
$
(
'
.am-table
'
).
find
(
'
input[type="checkbox"]
'
).
uCheck
(
'
uncheck
'
);
}
// 计算选择的商品总数和总价
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录