cart
parent
f9837644a0
commit
7a3bef57e9
|
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
|
||||
namespace Home\Controller;
|
||||
|
||||
use Service\SearchService;
|
||||
use Service\BrandService;
|
||||
|
||||
/**
|
||||
* 购物车
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-01T21:51:08+0800
|
||||
*/
|
||||
class CartController extends CommonController
|
||||
{
|
||||
/**
|
||||
* [_initialize 前置操作-继承公共前置方法]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-03T12:39:08+0800
|
||||
*/
|
||||
public function _initialize()
|
||||
{
|
||||
// 调用父类前置方法
|
||||
parent::_initialize();
|
||||
}
|
||||
|
||||
/**
|
||||
* [Index 首页]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2017-02-22T16:50:32+0800
|
||||
*/
|
||||
public function Index()
|
||||
{
|
||||
$this->display('Index');
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
@ -0,0 +1,174 @@
|
|||
<include file="Public/Header" />
|
||||
|
||||
<!-- header top nav -->
|
||||
<include file="Public/HeaderTopNav" />
|
||||
|
||||
<!-- search -->
|
||||
<include file="Public/NavSearch" />
|
||||
|
||||
<!-- header nav -->
|
||||
<include file="Public/HeaderNav" />
|
||||
|
||||
<!-- goods category -->
|
||||
<include file="Public/GoodsCategory" />
|
||||
|
||||
<!-- content -->
|
||||
<div class="am-container cart-content">
|
||||
<!-- 商品列表 -->
|
||||
<table class="am-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>商品信息</th>
|
||||
<th class="am-hide-sm-only">单价</th>
|
||||
<th class="am-hide-sm-only">数量</th>
|
||||
<th class="am-hide-sm-only">金额</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="base">
|
||||
<input type="checkbox" value="1" />
|
||||
<div class="goods-detail">
|
||||
<a href="#">
|
||||
<img src="../images/kouhong.jpg_80x80.jpg">
|
||||
</a>
|
||||
<div class="goods-base">
|
||||
<a href="#" class="goods-title">第三方撒地方啊打广告公司古代诗歌发到广东省古代诗歌发打发归属感发撒的格式干撒的撒个撒个萨嘎说</a>
|
||||
<ul class="goods-attr">
|
||||
<li>颜色分类:黑色</li>
|
||||
<li>尺码:XXL</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wap-base am-show-sm-only">
|
||||
<span class="original-price">¥3964.00</span>
|
||||
<strong class="total-price-content">¥2378.00</strong>
|
||||
<span class="wap-number">x10</span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="price am-hide-sm-only">
|
||||
<p class="original-price">¥3964.00</p>
|
||||
<p class="line-price">¥2378.00</p>
|
||||
</td>
|
||||
<td class="number am-hide-sm-only">
|
||||
<div class="am-input-group am-input-group-sm number-tag">
|
||||
<span class="am-input-group-label">-</span>
|
||||
<input type="text" class="am-form-field" value="1" />
|
||||
<span class="am-input-group-label">+</span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="total-price am-hide-sm-only">
|
||||
<strong class="total-price-content">¥2378.00</strong>
|
||||
</td>
|
||||
<td class="operation">
|
||||
<a href="javascript:;" class="delete-submit">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="base">
|
||||
<input type="checkbox" value="2" />
|
||||
<div class="goods-detail">
|
||||
<a href="#">
|
||||
<img src="../images/kouhong.jpg_80x80.jpg">
|
||||
</a>
|
||||
<div class="goods-base">
|
||||
<a href="#" class="goods-title">第三方撒地方啊打广告公司古代诗歌发到广东省古代诗歌发打发归属感发撒的格式干撒的撒个撒个萨嘎说</a>
|
||||
<ul class="goods-attr">
|
||||
<li>颜色分类:黑色</li>
|
||||
<li>尺码:XXL</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wap-base am-show-sm-only">
|
||||
<span class="original-price">¥3964.00</span>
|
||||
<strong class="total-price-content">¥2378.00</strong>
|
||||
<span class="wap-number">x10</span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="price am-hide-sm-only">
|
||||
<p class="original-price">¥3964.00</p>
|
||||
<p class="line-price">¥2378.00</p>
|
||||
</td>
|
||||
<td class="number am-hide-sm-only">
|
||||
<div class="am-input-group am-input-group-sm number-tag">
|
||||
<span class="am-input-group-label">-</span>
|
||||
<input type="text" class="am-form-field" value="1" />
|
||||
<span class="am-input-group-label">+</span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="total-price am-hide-sm-only">
|
||||
<strong class="total-price-content">¥2378.00</strong>
|
||||
</td>
|
||||
<td class="operation">
|
||||
<a href="javascript:;" class="delete-submit">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="base">
|
||||
<input type="checkbox" value="3" />
|
||||
<div class="goods-detail">
|
||||
<a href="#">
|
||||
<img src="../images/kouhong.jpg_80x80.jpg">
|
||||
</a>
|
||||
<div class="goods-base">
|
||||
<a href="#" class="goods-title">第三方撒地方啊打广告公司古代诗歌发到广东省古代诗歌发打发归属感发撒的格式干撒的撒个撒个萨嘎说</a>
|
||||
<ul class="goods-attr">
|
||||
<li>颜色分类:黑色</li>
|
||||
<li>尺码:XXL</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wap-base am-show-sm-only">
|
||||
<span class="original-price">¥3964.00</span>
|
||||
<strong class="total-price-content">¥2378.00</strong>
|
||||
<span class="wap-number">x10</span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="price am-hide-sm-only">
|
||||
<p class="original-price">¥3964.00</p>
|
||||
<p class="line-price">¥2378.00</p>
|
||||
</td>
|
||||
<td class="number am-hide-sm-only">
|
||||
<div class="am-input-group am-input-group-sm number-tag">
|
||||
<span class="am-input-group-label">-</span>
|
||||
<input type="text" class="am-form-field" value="1" />
|
||||
<span class="am-input-group-label">+</span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="total-price am-hide-sm-only">
|
||||
<strong class="total-price-content">¥2378.00</strong>
|
||||
</td>
|
||||
<td class="operation">
|
||||
<a href="javascript:;" class="delete-submit">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<!-- 导航 -->
|
||||
<div class="cart-nav" data-am-sticky="{bottom:0}">
|
||||
<div class="am-fl">
|
||||
<label>
|
||||
<input type="checkbox" value="3" /> 全选
|
||||
</label>
|
||||
<a href="javascript:;" class="delete-submit-all">删除</a>
|
||||
</div>
|
||||
<div class="am-fr">
|
||||
<span class="selected-tips">已选商品 <strong>0</strong> 件</span>
|
||||
<span class="total-price-tips">合计:</span>
|
||||
<strong class="nav-total-price">¥2131234</strong>
|
||||
<button type="button" class="am-btn am-btn-primary separate-submit">结算</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 罩层 -->
|
||||
<div class="theme-popover-mask" style="display:none;"></div>
|
||||
|
||||
|
||||
<!-- footer start -->
|
||||
<include file="Public/Footer" />
|
||||
<!-- footer end -->
|
||||
|
|
@ -130,10 +130,17 @@
|
|||
<div class="theme-options">
|
||||
<div class="cart-title number">数量</div>
|
||||
<dd>
|
||||
<button id="min" class="am-btn am-btn-default" type="button">-</button>
|
||||
<!-- <button id="min" class="am-btn am-btn-default" type="button">-</button>
|
||||
<input id="text_box" name="" type="text" value="1" />
|
||||
<button id="add" class="am-btn am-btn-default" type="button">+</button>
|
||||
<span id="Stock" class="tb-hidden">库存<span class="stock">{{$goods.inventory}}</span>{{$goods.inventory_unit}}</span>
|
||||
<span id="Stock" class="tb-hidden">库存<span class="stock">{{$goods.inventory}}</span>{{$goods.inventory_unit}}</span> -->
|
||||
|
||||
<div class="am-input-group am-input-group-sm number-tag">
|
||||
<button class="am-input-group-label" id="min" type="button">-</button>
|
||||
<input type="text" class="am-form-field" value="1" id="text_box" />
|
||||
<button class="am-input-group-label" id="add" type="button">+</button>
|
||||
</div>
|
||||
<span class="tb-hidden stock-tips">库存<span class="stock">{{$goods.inventory}}</span>{{$goods.inventory_unit}}</span>
|
||||
</dd>
|
||||
</div>
|
||||
|
||||
|
|
@ -147,8 +154,7 @@
|
|||
<img src="__PUBLIC__/Home/{{$default_theme}}/Images/songzi.jpg" />
|
||||
</div>
|
||||
<div class="text-info">
|
||||
<span class="J_Price price-now">¥{{$goods.price}}</span>
|
||||
<span id="Stock" class="tb-hidden">库存<span class="stock">{{$goods.inventory}}</span>{{$goods.inventory_unit}}</span>
|
||||
<span class="price-now">¥{{$goods.price}}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
<div class="menu-hd MyShangcheng"><a href="#" target="_top"><i class="am-icon-user am-icon-fw"></i>个人中心</a></div>
|
||||
</div>
|
||||
<div class="topMessage mini-cart">
|
||||
<div class="menu-hd"><a id="mc-menu-hd" href="#" target="_top"><i class="am-icon-shopping-cart am-icon-fw"></i><span>购物车</span><strong id="J_MiniCartNum" class="h">0</strong></a></div>
|
||||
<div class="menu-hd"><a id="mc-menu-hd" href="{{:U('Home/Cart/Index')}}" target="_top"><i class="am-icon-shopping-cart am-icon-fw"></i><span>购物车</span><strong id="J_MiniCartNum" class="h">0</strong></a></div>
|
||||
</div>
|
||||
<div class="topMessage favorite">
|
||||
<div class="menu-hd"><a href="#" target="_top"><i class="am-icon-heart am-icon-fw"></i><span>收藏夹</span></a></div>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,41 @@
|
|||
.goods-detail img { width: 80px; height: 80px; }
|
||||
.goods-detail { position: relative; margin-left: 15px; }
|
||||
.goods-title { display: block; max-height: 36px; overflow: hidden; text-overflow: ellipsis; }
|
||||
.goods-title, .goods-attr li, .original-price, .operation a, .wap-number, .selected-tips, .cart-nav a, .total-price-tips, .cart-nav label { font-size: 12px; }
|
||||
.goods-title:hover { text-decoration: underline; }
|
||||
.goods-base { position: absolute; top: 0; left: 85px; }
|
||||
.goods-attr { margin-top: 5px; }
|
||||
.goods-attr li { color: #888; line-height: 16px; }
|
||||
.original-price, .line-price { font-family: Verdana,Tahoma,arial; }
|
||||
.original-price { color: #9c9c9c; text-decoration: line-through; }
|
||||
.line-price { color: #3c3c3c; }
|
||||
.line-price, strong.total-price-content, .nav-total-price { font-weight: 700; }
|
||||
.number-tag { width: 100px; }
|
||||
.number-tag .am-form-field { padding: 3px; height: 25px; text-align: center; font-size: 16px !important; }
|
||||
.number-tag .am-input-group-label { line-height: 23px; height: 25px; font-size: 14px !important; padding: 0 10px; }
|
||||
.number-tag .am-input-group-label, .cart-nav label { cursor: pointer; }
|
||||
strong.total-price-content, .selected-tips strong, .nav-total-price { color: #d2364c; font-size: 16px; }
|
||||
.operation a { display: block; }
|
||||
.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: 50px; padding: 0 5px; }
|
||||
.cart-nav .separate-submit { height: 50px; width: 100px; font-size: 20px; }
|
||||
.selected-tips { margin-right: 15px; }
|
||||
.cart-nav label { font-weight: 100; }
|
||||
.cart-nav input[type="checkbox"] { vertical-align: inherit; }
|
||||
.cart-nav .delete-submit-all { margin-left: 10px; }
|
||||
|
||||
@media only screen and (min-width:640px) {
|
||||
.cart-content table tr .base { width: 30%; }
|
||||
.cart-content table tr .price { width: 15%; }
|
||||
.cart-content table tr .number { width: 20%; }
|
||||
.cart-content table tr .total-price { width: 20%; }
|
||||
.cart-content table tr .operation { width: 15%; }
|
||||
.cart-content { margin-top: 20px; }
|
||||
}
|
||||
|
||||
@media only screen and (max-width:640px) {
|
||||
.cart-content table tr .base { width: 80%; }
|
||||
.selected-tips { display: none; }
|
||||
}
|
||||
|
|
@ -31,7 +31,7 @@ input{font-size:12px;font-size:100%;outline:none;line-height:normal;color:#444;}
|
|||
.theme-signin-right .img-info img{margin:5px 5px ;width:80px;height:80px ;}
|
||||
.theme-signin-right .text-info{position:absolute;left:110px;top:20px ;}
|
||||
.text-info .price-now{display:block;font-size:16px ;color:#C40000;}
|
||||
.text-info span#Stock{font-size:14px ;}
|
||||
.text-info span.stock-tips{font-size:12px ;}
|
||||
|
||||
/*可选规格*/
|
||||
.iteminfo_parameter { margin-bottom: 10px; }
|
||||
|
|
@ -79,7 +79,7 @@ input{font-size:12px;font-size:100%;outline:none;line-height:normal;color:#444;}
|
|||
/*商品信息*/
|
||||
.theme-signin-right{display: none;}
|
||||
.text-info .price-now{float: left;margin-right:10px ;}
|
||||
.text-info span#Stock {float:left;font-size: 12px;}
|
||||
.text-info span.stock-tips {float:left;font-size: 12px;}
|
||||
|
||||
/*操作*/
|
||||
.btn-op{overflow: hidden;padding:10px 20%; position: static;}
|
||||
|
|
@ -169,8 +169,9 @@ flex: 1 1 0%;line-height: 16px;cursor: pointer;}
|
|||
/*数量*/
|
||||
.iteminfo_parameter.munber,.iteminfo_parameter.freight{display:none ;}
|
||||
.iteminfo_parameter.munber dd{margin-left:5px ;}
|
||||
#min, #add{ width: 35px; height: 25px; outline:none; }
|
||||
#text_box { width: 35px; height: 25px; text-align: center; }
|
||||
#min, #add{ width: 35px; height: 25px; outline:none; line-height: 23px; padding: 0; cursor: pointer; }
|
||||
#text_box { width: 50px; height: 25px; text-align: center; font-size: 16px !important; }
|
||||
.theme-popover .am-input-group { display: inline-flex; }
|
||||
|
||||
|
||||
/*购物车*/
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ $(document).ready(function() {
|
|||
//初始化数量为1,并失效减
|
||||
$('#min').attr('disabled', true);
|
||||
//数量增加操作
|
||||
$("#add").click(function() {
|
||||
$("#add").on('click', function() {
|
||||
t.val(parseInt(t.val()) + 1)
|
||||
if (parseInt(t.val()) != 1) {
|
||||
$('#min').attr('disabled', false);
|
||||
|
|
@ -104,7 +104,7 @@ $(document).ready(function() {
|
|||
|
||||
});
|
||||
//数量减少操作
|
||||
$("#min").click(function() {
|
||||
$("#min").on('click', function() {
|
||||
t.val(parseInt(t.val()) - 1);
|
||||
if (parseInt(t.val()) == 1) {
|
||||
$('#min').attr('disabled', true);
|
||||
|
|
|
|||
Loading…
Reference in New Issue