Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jcy2004x
ShopXO
提交
4f4ca0fa
ShopXO
项目概览
jcy2004x
/
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,发现更多精彩内容 >>
提交
4f4ca0fa
编写于
2月 26, 2019
作者:
D
devil_gong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
右侧快捷导航购物车优化
上级
3351124c
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
73 addition
and
62 deletion
+73
-62
application/plugins/commonrightnavigation/Index.php
application/plugins/commonrightnavigation/Index.php
+8
-0
application/plugins/view/commonrightnavigation/index/content.html
...ion/plugins/view/commonrightnavigation/index/content.html
+64
-62
public/static/plugins/css/commonrightnavigation/style.css
public/static/plugins/css/commonrightnavigation/style.css
+1
-0
未找到文件。
application/plugins/commonrightnavigation/Index.php
浏览文件 @
4f4ca0fa
...
...
@@ -48,6 +48,14 @@ class Index extends Controller
*/
public
function
cart
(
$params
=
[])
{
// 当前模块/控制器/方法
$module_name
=
strtolower
(
request
()
->
module
());
$controller_name
=
strtolower
(
request
()
->
controller
());
$action_name
=
strtolower
(
request
()
->
action
());
// 当前模块/控制器/方法
$this
->
assign
(
'module_controller_action'
,
$module_name
.
$controller_name
.
$action_name
);
// 购物车
$cart_list
=
BuyService
::
CartList
([
'user'
=>
session
(
'user'
)]);
...
...
application/plugins/view/commonrightnavigation/index/content.html
浏览文件 @
4f4ca0fa
...
...
@@ -41,73 +41,75 @@
<div
class=
"cart-count common-cart-total {{if $cart_total gt 0}}am-badge am-badge-danger{{/if}}"
>
{{if $cart_total > 9}}9+{{else /}}{{$cart_total}}{{/if}}
</div>
</div>
</a>
<div
class=
"mui-mbar-popup am-animation-slide-left cart-content"
>
<!-- 商品列表 -->
<div
class=
"cart-items"
style=
"display: {{if !empty($cart_list)}}block{{else /}}none{{/if}};"
>
{{if !empty($cart_list)}}
<table
class=
"am-table"
>
{{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"
>
<div
class=
"goods-detail"
>
<a
href=
"{{$goods.goods_url}}"
target=
"_blank"
>
<img
src=
"{{$goods.images}}"
>
</a>
<div
class=
"goods-base"
>
<a
href=
"{{$goods.goods_url}}"
target=
"_blank"
class=
"goods-title"
>
{{$goods.title}}
</a>
{{if !empty($goods.spec)}}
<ul
class=
"goods-attr"
>
{{foreach $goods.spec as $spec}}
<li>
{{$spec.type}}:{{$spec.value}}
</li>
{{/foreach}}
</ul>
{{/if}}
{{if !isset($module_controller_action) or $module_controller_action != 'indexcartindex'}}
<div
class=
"mui-mbar-popup am-animation-slide-left cart-content"
>
<!-- 商品列表 -->
<div
class=
"cart-items"
style=
"display: {{if !empty($cart_list)}}block{{else /}}none{{/if}};"
>
{{if !empty($cart_list)}}
<table
class=
"am-table"
>
{{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"
>
<div
class=
"goods-detail"
>
<a
href=
"{{$goods.goods_url}}"
target=
"_blank"
>
<img
src=
"{{$goods.images}}"
>
</a>
<div
class=
"goods-base"
>
<a
href=
"{{$goods.goods_url}}"
target=
"_blank"
class=
"goods-title"
>
{{$goods.title}}
</a>
{{if !empty($goods.spec)}}
<ul
class=
"goods-attr"
>
{{foreach $goods.spec as $spec}}
<li>
{{$spec.type}}:{{$spec.value}}
</li>
{{/foreach}}
</ul>
{{/if}}
</div>
</div>
</div>
</td>
<td
class=
"total-price"
>
<strong
class=
"total-price-content"
>
¥{{$goods.total_price}}
</strong>
<span
class=
"cart-number"
>
x{{$goods.stock}}
</span>
</td>
<td
class=
"operation"
>
<a
href=
"javascript:;"
class=
"submit-delete"
data-url=
"{{:MyUrl('index/cart/delete')}}"
data-id=
"{{$goods.id}}"
data-view=
"fun"
data-value=
"PluginsCartViewDeleteBack"
data-is-confirm=
"0"
>
删除
</a>
</td>
</tr>
{{/foreach}}
</table>
{{/if}}
</div>
</td>
<td
class=
"total-price"
>
<strong
class=
"total-price-content"
>
¥{{$goods.total_price}}
</strong>
<span
class=
"cart-number"
>
x{{$goods.stock}}
</span>
</td>
<td
class=
"operation"
>
<a
href=
"javascript:;"
class=
"submit-delete"
data-url=
"{{:MyUrl('index/cart/delete')}}"
data-id=
"{{$goods.id}}"
data-view=
"fun"
data-value=
"PluginsCartViewDeleteBack"
data-is-confirm=
"0"
>
删除
</a>
</td>
</tr>
{{/foreach}}
</table>
{{/if}}
</div>
<!-- 导航 -->
<div
class=
"cart-nav"
style=
"display: {{if !empty($cart_list)}}block{{else /}}none{{/if}};"
>
<form
action=
"{{:MyUrl('index/buy/index')}}"
method=
"post"
>
<span
class=
"selected-tips"
>
共
<strong>
{{$base.cart_count}}
</strong>
种商品
</span>
<span
class=
"total-price-tips"
>
共计:
</span>
<strong
class=
"nav-total-price"
>
¥{{$base.total_price}}
</strong>
<input
type=
"hidden"
name=
"ids"
value=
"{{$base.ids}}"
/>
<input
type=
"hidden"
name=
"buy_type"
value=
"cart"
/>
<button
type=
"submit"
class=
"am-btn am-btn-primary separate-submit am-fr"
>
结算
</button>
</form>
</div>
<!-- 导航 -->
<div
class=
"cart-nav"
style=
"display: {{if !empty($cart_list)}}block{{else /}}none{{/if}};"
>
<form
action=
"{{:MyUrl('index/buy/index')}}"
method=
"post"
>
<span
class=
"selected-tips"
>
共
<strong>
{{$base.cart_count}}
</strong>
种商品
</span>
<span
class=
"total-price-tips"
>
共计:
</span>
<strong
class=
"nav-total-price"
>
¥{{$base.total_price}}
</strong>
<input
type=
"hidden"
name=
"ids"
value=
"{{$base.ids}}"
/>
<input
type=
"hidden"
name=
"buy_type"
value=
"cart"
/>
<button
type=
"submit"
class=
"am-btn am-btn-primary separate-submit am-fr"
>
结算
</button>
</form>
</div>
<!-- 空购物车 -->
<div
class=
"mixed-tips"
style=
"display: {{if empty($cart_list)}}block{{else /}}none{{/if}};"
>
<i
class=
"am-icon-cart-plus am-fl icon"
></i>
<div
class=
"mixed-tips-content am-fl"
>
<h1>
您的购物车还是空的,您可以
</h1>
<ul>
<li>
<span>
看看
</span>
<a
href=
"{{if empty($user)}}javascript:;{{else /}}{{:MyUrl('index/userfavor/goods')}}{{/if}}"
class=
"{{if empty($user)}}login-event{{/if}}"
>
我的收藏夹
</a>
</li>
<li>
<span>
看看
</span>
<a
href=
"{{if empty($user)}}javascript:;{{else /}}{{:MyUrl('index/order/index')}}{{/if}}"
class=
"{{if empty($user)}}login-event{{/if}}"
>
我的订单
</a>
</li>
</ul>
<!-- 空购物车 -->
<div
class=
"mixed-tips"
style=
"display: {{if empty($cart_list)}}block{{else /}}none{{/if}};"
>
<i
class=
"am-icon-cart-plus am-fl icon"
></i>
<div
class=
"mixed-tips-content am-fl"
>
<h1>
您的购物车还是空的,您可以
</h1>
<ul>
<li>
<span>
看看
</span>
<a
href=
"{{if empty($user)}}javascript:;{{else /}}{{:MyUrl('index/userfavor/goods')}}{{/if}}"
class=
"{{if empty($user)}}login-event{{/if}}"
>
我的收藏夹
</a>
</li>
<li>
<span>
看看
</span>
<a
href=
"{{if empty($user)}}javascript:;{{else /}}{{:MyUrl('index/order/index')}}{{/if}}"
class=
"{{if empty($user)}}login-event{{/if}}"
>
我的订单
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
{{/if}}
</div>
<!-- 二维码 -->
...
...
public/static/plugins/css/commonrightnavigation/style.css
浏览文件 @
4f4ca0fa
...
...
@@ -288,6 +288,7 @@
.commonrightnavigation-cart
.cart-content
.goods-attr
li
{
color
:
#888
;
line-height
:
16px
;
font-size
:
12px
;
}
.commonrightnavigation-cart
.cart-content
strong
.total-price-content
,
.commonrightnavigation-cart
.cart-content
.nav-total-price
{
font-weight
:
700
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录