147 lines
7.3 KiB
HTML
Executable File
147 lines
7.3 KiB
HTML
Executable File
<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">
|
||
<notempty name="cart_list">
|
||
<!-- 商品列表 -->
|
||
<table class="am-table">
|
||
<thead>
|
||
<tr>
|
||
<th>商品信息</th>
|
||
<th class="am-hide-sm-only">单价</th>
|
||
<th>数量</th>
|
||
<th class="am-hide-sm-only">金额</th>
|
||
<th>操作</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<foreach name="cart_list" item="goods">
|
||
<tr id="data-list-{{$goods.id}}" data-id="{{$goods.id}}" data-goods-id="{{$goods.goods_id}}" class="<if condition="$goods['is_shelves'] neq 1">am-warning</if> <if condition="$goods['is_delete_time'] neq 0">am-danger</if>">
|
||
<td class="base">
|
||
<input type="checkbox" value="{{$goods.id}}" <if condition="$goods['is_shelves'] neq 1 or $goods['is_delete_time'] neq 0">disabled</if> />
|
||
<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>
|
||
<notempty name="goods.attribute">
|
||
<ul class="goods-attr">
|
||
<foreach name="goods.attribute" item="attr">
|
||
<li>{{$attr.attr_type_name}}:{{$attr.attr_name}}</li>
|
||
</foreach>
|
||
</ul>
|
||
</notempty>
|
||
</div>
|
||
</div>
|
||
<div class="wap-base am-show-sm-only">
|
||
<if condition="$goods['original_price'] gt 0">
|
||
<span class="original-price">¥{{$goods.original_price}}</span>
|
||
</if>
|
||
<strong class="total-price-content">¥{{$goods.price}}</strong>
|
||
<span class="wap-number">x{{$goods.stock}}</span>
|
||
</div>
|
||
</td>
|
||
<td class="price am-hide-sm-only">
|
||
<if condition="$goods['original_price'] gt 0">
|
||
<p class="original-price">¥{{$goods.original_price}}</p>
|
||
</if>
|
||
<p class="line-price">¥{{$goods.price}}</p>
|
||
</td>
|
||
<td class="number">
|
||
<div class="am-input-group am-input-group-sm stock-tag" data-inventory="{{$goods.inventory}}" data-price="{{$goods.price}}" data-ajax-url="{{:U('Home/Cart/Stock')}}">
|
||
<span class="am-input-group-label <if condition="$goods['is_shelves'] eq 1 and $goods['is_delete_time'] eq 0">stock-submit</if>" data-type="min">-</span>
|
||
<input type="number" class="am-form-field" value="{{$goods.stock}}" <if condition="$goods['is_shelves'] neq 1 or $goods['is_delete_time'] neq 0">disabled</if> />
|
||
<span class="am-input-group-label <if condition="$goods['is_shelves'] eq 1 and $goods['is_delete_time'] eq 0">stock-submit</if>" data-type="add">+</span>
|
||
</div>
|
||
<if condition="$goods['is_shelves'] neq 1">
|
||
<p>商品已下架</p>
|
||
</if>
|
||
<if condition="$goods['is_delete_time'] neq 0">
|
||
<p>商品已作废</p>
|
||
</if>
|
||
</td>
|
||
<td class="total-price am-hide-sm-only">
|
||
<strong class="total-price-content">¥{{$goods.total_price}}</strong>
|
||
</td>
|
||
<td class="operation">
|
||
<a href="javascript:;" class="submit-delete" data-url="{{:U('Home/Cart/Delete')}}" data-id="{{$goods.id}}" data-view="fun" data-value="ViewDeleteBack">删除</a>
|
||
</td>
|
||
</tr>
|
||
</foreach>
|
||
</tbody>
|
||
</table>
|
||
|
||
<!-- 导航 -->
|
||
<div class="cart-nav">
|
||
<div class="am-fl nav-left">
|
||
<label>
|
||
<input type="checkbox" value="3" class="select-all-event" />
|
||
<span>全选</span>
|
||
</label>
|
||
<a href="javascript:;" class="submit-ajax" data-url="{{:U('Home/Cart/Delete')}}" data-id="{{$base.ids}}" data-view="reload" data-msg="清空后不可恢复、确认操作吗?">清空</a>
|
||
</div>
|
||
<div class="am-fr nav-right">
|
||
<form action="{{:U('Home/Buy/Index')}}" method="post">
|
||
<span class="selected-tips am-fl">已选商品 <strong>0</strong> 件</span>
|
||
<span class="total-price-tips am-fl">合计:</span>
|
||
<strong class="nav-total-price am-fl">¥0.00</strong>
|
||
<input type="hidden" name="ids" value="0" />
|
||
<input type="hidden" name="buy_type" value="cart" />
|
||
<button type="submit" class="am-btn am-btn-primary separate-submit">结算</button>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
<else />
|
||
<div class="mixed-tips">
|
||
<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 condition="empty($user)">javascript:;<else />{{:U('Home/UserFavor/Goods')}}</if>" class="<if condition="empty($user)">login-event</if>">我的收藏夹</a>
|
||
</li>
|
||
<li>
|
||
<span>看看</span>
|
||
<a href="<if condition="empty($user)">javascript:;<else />{{:U('Home/Order/Index')}}</if>" class="<if condition="empty($user)">login-event</if>">我的订单</a>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
</notempty>
|
||
</div>
|
||
|
||
<!-- footer start -->
|
||
<include file="Public/Footer" />
|
||
<!-- footer end -->
|
||
|
||
<script type="text/javascript">
|
||
// 返回处理
|
||
function ViewDeleteBack(e)
|
||
{
|
||
if(e.code == 0)
|
||
{
|
||
$.AMUI.progress.done();
|
||
Prompt(e.msg, 'success');
|
||
$('#data-list-'+e.data_id).remove();
|
||
$('.top-nav-cart-total').text(parseInt(e.data));
|
||
} else {
|
||
$('form.form-validation').find('button[type="submit"]').button('reset');
|
||
$.AMUI.progress.done();
|
||
Prompt(e.msg);
|
||
}
|
||
}
|
||
</script> |