diff --git a/application/plugins/commonrightnavigation/Index.php b/application/plugins/commonrightnavigation/Index.php index 725f5058d..1278047e8 100644 --- a/application/plugins/commonrightnavigation/Index.php +++ b/application/plugins/commonrightnavigation/Index.php @@ -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')]); diff --git a/application/plugins/view/commonrightnavigation/index/content.html b/application/plugins/view/commonrightnavigation/index/content.html index b910be6b1..23107ca72 100755 --- a/application/plugins/view/commonrightnavigation/index/content.html +++ b/application/plugins/view/commonrightnavigation/index/content.html @@ -41,73 +41,75 @@
{{if $cart_total > 9}}9+{{else /}}{{$cart_total}}{{/if}}
-
- -
- {{if !empty($cart_list)}} - - {{foreach $cart_list as $goods}} - - + + + + {{/foreach}} +
-
- - - -
- {{$goods.title}} - {{if !empty($goods.spec)}} -
    - {{foreach $goods.spec as $spec}} -
  • {{$spec.type}}:{{$spec.value}}
  • - {{/foreach}} -
- {{/if}} + {{if !isset($module_controller_action) or $module_controller_action != 'indexcartindex'}} +
+ +
+ {{if !empty($cart_list)}} + + {{foreach $cart_list as $goods}} + + - - - - {{/foreach}} -
+
+ + + +
+ {{$goods.title}} + {{if !empty($goods.spec)}} +
    + {{foreach $goods.spec as $spec}} +
  • {{$spec.type}}:{{$spec.value}}
  • + {{/foreach}} +
+ {{/if}} +
- -
- ¥{{$goods.total_price}} - x{{$goods.stock}} - - 删除 -
- {{/if}} -
+
+ ¥{{$goods.total_price}} + x{{$goods.stock}} + + 删除 +
+ {{/if}} +
- -
-
- {{$base.cart_count}} 种商品 - 共计: - ¥{{$base.total_price}} - - - -
-
+ +
+
+ {{$base.cart_count}} 种商品 + 共计: + ¥{{$base.total_price}} + + + +
+
- -
- -
-

您的购物车还是空的,您可以

- + +
+ +
+

您的购物车还是空的,您可以

+ +
-
+ {{/if}}
diff --git a/public/static/plugins/css/commonrightnavigation/style.css b/public/static/plugins/css/commonrightnavigation/style.css index eb90b7d5f..b710bad5c 100755 --- a/public/static/plugins/css/commonrightnavigation/style.css +++ b/public/static/plugins/css/commonrightnavigation/style.css @@ -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;