291 lines
15 KiB
HTML
Executable File
291 lines
15 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">
|
||
|
||
<!-- 地址 -->
|
||
<div class="link-list">
|
||
<div class="address">
|
||
<div class="control">
|
||
<h3>确认收货地址</h3>
|
||
<notempty name="user_address_list">
|
||
<button class="am-btn am-btn-primary am-btn-xs address-submit-save" type="button" data-url="{{:U('Home/UserAddress/SaveInfo')}}" data-popup-title="新增地址">使用新地址</button>
|
||
</notempty>
|
||
</div>
|
||
<notempty name="user_address_list">
|
||
<ul class="address-list">
|
||
<foreach name="user_address_list" item="address">
|
||
<li class="<if condition="isset($address['is_default']) and $address['is_default'] eq 1">address-default</if>" id="data-list-{{$address.id}}" data-value="{{$address.id}}">
|
||
<div class="address-left">
|
||
<div class="user-base">
|
||
<notempty name="address.alias">
|
||
<span class="am-badge am-badge-danger am-radius">{{$address.alias}}</span>
|
||
</notempty>
|
||
<if condition="isset($address['is_default']) and $address['is_default'] eq 1">
|
||
<span class="am-badge am-badge-success am-radius">默认</span>
|
||
</if>
|
||
<span class="buy-address-detail">
|
||
<span class="buy-user">{{$address.name}}</span>
|
||
<span class="buy-phone">{{$address.tel}}</span>
|
||
</span>
|
||
</div>
|
||
<div>
|
||
<span class="province">{{$address.province_name}}</span>
|
||
<span class="city">{{$address.city_name}}</span>
|
||
<span class="dist">{{$address.county_name}}</span>
|
||
<span class="street">{{$address.address}}</span>
|
||
</div>
|
||
</div>
|
||
<div class="address-right">
|
||
<span class="am-icon-angle-right am-icon-lg"></span>
|
||
</div>
|
||
<div class="new-addr-btn">
|
||
<a href="javascript:;" class="address-default-submit" data-url="{{:U('Home/UserAddress/SetDefault')}}" data-id="{{$address.id}}">设为默认</a>
|
||
<span class="new-addr-bar">|</span>
|
||
<a href="javascript:;" class="address-submit-save" data-url="{{:U('Home/UserAddress/SaveInfo', ['id'=>$address['id']])}}" data-popup-title="编辑地址">编辑</a>
|
||
<span class="new-addr-bar">|</span>
|
||
<a href="javascript:;" class="address-submit-delete" data-url="{{:U('Home/UserAddress/Delete')}}" data-id="{{$address.id}}">删除</a>
|
||
</div>
|
||
</li>
|
||
</foreach>
|
||
</ul>
|
||
</notempty>
|
||
<empty name="user_address_list">
|
||
<div class="table-no">
|
||
<i class="am-icon-warning"></i>
|
||
{{:L('buy_user_address_not_data_tips')}}
|
||
<button class="am-btn am-btn-secondary am-btn-xs address-submit-save" type="button" data-url="{{:U('Home/UserAddress/SaveInfo')}}" data-popup-title="新增地址">使用新地址</button></div>
|
||
</empty>
|
||
</div>
|
||
|
||
<!-- 物流 -->
|
||
<div class="business-item logistics" data-type="logistics">
|
||
<h3>选择快递</h3>
|
||
<notempty name="express_list">
|
||
<ul class="logistics-list">
|
||
<foreach name="express_list" item="express">
|
||
<li data-value="{{$express.id}}">
|
||
<notempty name="express.icon">
|
||
<img src="{{$express.icon}}" />
|
||
</notempty>
|
||
<span>{{$express.name}}</span>
|
||
<i class="icon-active"></i>
|
||
</li>
|
||
</foreach>
|
||
</ul>
|
||
</notempty>
|
||
<empty name="express_list">
|
||
<div class="table-no"><i class="am-icon-warning"></i> {{:L('buy_express_not_data_tips')}}</div>
|
||
</empty>
|
||
</div>
|
||
|
||
<!-- 支付方式 -->
|
||
<div class="business-item payment" data-type="payment">
|
||
<h3>选择支付</h3>
|
||
<notempty name="payment_list">
|
||
<ul class="payment-list">
|
||
<foreach name="payment_list" item="payment">
|
||
<li data-value="{{$payment.id}}">
|
||
<notempty name="payment.logo">
|
||
<img src="{{$payment.logo}}" />
|
||
</notempty>
|
||
<span>{{$payment.name}}</span>
|
||
<i class="icon-active"></i>
|
||
</li>
|
||
</foreach>
|
||
</ul>
|
||
</notempty>
|
||
<empty name="payment_list">
|
||
<div class="table-no"><i class="am-icon-warning"></i> {{:L('buy_payment_not_data_tips')}}</div>
|
||
</empty>
|
||
</div>
|
||
|
||
<!-- 商品列表 -->
|
||
<div class="order-detail">
|
||
<div class="goods-table">
|
||
<h3>确认订单信息</h3>
|
||
<!-- 商品列表 -->
|
||
<notempty name="goods_list">
|
||
<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>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<foreach name="goods_list" item="goods">
|
||
<tr id="data-list-{{$goods.id}}" data-id="{{$goods.id}}" data-goods-id="{{$goods.goods_id}}">
|
||
<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>
|
||
<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 am-hide-sm-only">
|
||
{{$goods.stock}} {{$goods.inventory_unit}}
|
||
</td>
|
||
<td class="total-price am-hide-sm-only">
|
||
<strong class="total-price-content">¥{{$goods.total_price}}</strong>
|
||
</td>
|
||
</tr>
|
||
</foreach>
|
||
</tbody>
|
||
</table>
|
||
</notempty>
|
||
<empty name="goods_list">
|
||
<div class="table-no"><i class="am-icon-warning"></i> {{:L('buy_goods_not_data_tips')}}</div>
|
||
</empty>
|
||
|
||
<!-- 留言 -->
|
||
<div class="buy-message">
|
||
<div class="order-extra">
|
||
<div class="order-user-info">
|
||
<div class="memo">
|
||
<label>买家留言:</label>
|
||
<input type="text" title="选填,对本次交易的说明(建议填写已经和卖家达成一致的说明)" placeholder="选填,建议填写和卖家达成一致的说明" class="memo-input">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 含运费小计 -->
|
||
<div class="buy-point-discharge">
|
||
<p>
|
||
合计(含运费) <span>¥</span><em class="pay-sum">{{$base.total_price}}</em>
|
||
</p>
|
||
</div>
|
||
|
||
<!-- 信息 -->
|
||
<div class="order-nav">
|
||
<div class="pay-confirm">
|
||
<div class="box">
|
||
<div class="base-real-pay">
|
||
<em>实付款:</em>
|
||
<span class="price">
|
||
<span>¥</span>
|
||
<em class="nav-total-price">{{$base.total_price}}</em>
|
||
</span>
|
||
</div>
|
||
|
||
<div class="pay-address">
|
||
<div class="buy-footer-address">
|
||
<span class="buy-line-title buy-line-title-type">寄送至:</span>
|
||
<span class="buy-address-detail">
|
||
<if condition="!empty($base['address'])">
|
||
{{$base.address.province_name}} {{$base.address.city_name}} {{$base.address.county_name}} {{$base.address.address}}
|
||
<else />
|
||
...
|
||
</if>
|
||
</span>
|
||
</div>
|
||
<div class="buy-footer-address">
|
||
<span class="buy-line-title">收货人:</span>
|
||
<span class="buy-user">
|
||
<if condition="!empty($base['address'])">
|
||
{{$base.address.name}}
|
||
<else />
|
||
...
|
||
</if>
|
||
</span>
|
||
<span class="buy-phone">
|
||
<if condition="!empty($base['address'])">
|
||
{{$base.address.tel}}
|
||
<else />
|
||
...
|
||
</if>
|
||
</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<form class="am-form form-validation nav-buy" action="{{:U('Home/Buy/Add')}}" method="post" class="nav-buy" request-type="ajax-fun" request-value="BuySubmitBack">
|
||
<input type="hidden" name="goods_id" value="<if condition="isset($params['goods_id'])">{{$params.goods_id}}<else />0</if>" />
|
||
<input type="hidden" name="buy_type" value="<if condition="isset($params['buy_type'])">{{$params.buy_type}}<else />goods</if>" />
|
||
<input type="hidden" name="stock" value="<if condition="isset($params['stock'])">{{$params.stock}}<else />1</if>" />
|
||
<input type="hidden" name="attr" value='<if condition="isset($params['attr'])">{{$params.attr}}</if>' />
|
||
<input type="hidden" name="ids" value="<if condition="isset($params['ids'])">{{$params.ids}}</if>" />
|
||
<input type="hidden" name="address_id" value="0" />
|
||
<input type="hidden" name="express_id" value="0" />
|
||
<input type="hidden" name="payment_id" value="0" />
|
||
<input type="hidden" name="user_note" value="" />
|
||
<div class="go-btn-wrap">
|
||
<button type="submit" class="btn-go btn-loading-example" title="点击此按钮,提交订单" data-am-loading="{loadingText:'{{:L('common_form_loading_tips')}}'}">提交订单</button>
|
||
</div>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- footer start -->
|
||
<include file="Public/Footer" />
|
||
<!-- footer end -->
|
||
<script type="text/javascript">
|
||
// 提交订单回调
|
||
function BuySubmitBack(e)
|
||
{
|
||
if(e.code == 0)
|
||
{
|
||
$.AMUI.progress.done();
|
||
if($(window).width() < 640)
|
||
{
|
||
PromptBottom(e.msg, 'success', null, 50);
|
||
} else {
|
||
PromptCenter(e.msg, 'success');
|
||
}
|
||
setTimeout(function()
|
||
{
|
||
window.location.href = e.data.pay_url;
|
||
}, 1500);
|
||
} else {
|
||
$('form.form-validation').find('button[type="submit"]').button('reset');
|
||
$.AMUI.progress.done();
|
||
if($(window).width() < 640)
|
||
{
|
||
PromptBottom(e.msg, null, null, 50);
|
||
} else {
|
||
PromptCenter(e.msg);
|
||
}
|
||
}
|
||
}
|
||
</script> |