把jsp文件WebContent/WEB-INF/jsp/cart/cart/cartList.jsp改为html文件。
在WebContent/WEB-INF/html/cart下新建html文件cartList.html。
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-spring4-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
<title>好农易商城</title>
<link href="shop/css/style.css" rel="stylesheet" type="text/css" media="all" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<div th:if="${#strings.isEmpty(session.UVO.guestName)}">
<meta http-equiv="REFRESH" content="0;url=initGuestLogin"/>
</div>
<link rel="shortcut icon" href="shop/images/pic28.jpg"/>
<link rel="Bookmark" href="shop/images/pic28.jpg"/>
</head>
<body>
<div class="header-bg">
<div class="wrap">
<div class="h-bg">
<div class="total">
<div class="header">
<div class="box_header_user_menu">
<div th:replace="shop/userBar :: page-user-bar"></div>
</div>
<div class="clear"></div>
<div class="header-bot">
<div th:replace="shop/logo :: page-logo"></div>
<div class="clear"></div>
</div>
</div>
<div class="menu">
<div th:replace="shop/topBar :: page-top-bar"></div>
</div>
<div class="banner-top">
<div class="header-bottom">
<div class="header_bottom_right_images">
<div class="about_wrapper">
<h1>
购物车信息
</h1>
</div>
<form action="alipayConfirm" th:object="${cartForm}" method="post">
<div th:each="cartsInfo,status:${cartList}">
<div class="about-top">
<div class="grid images_3_of_1">
<img alt="购物车详细情况" th:src="@{showImage(pictureId=${cartsInfo.pictureId})}" style="height:185px;width:330px;"/>
</div>
<div class="grid span_2_of_3">
<h3><span th:text="${cartsInfo.commodityName}"></span></h3>
<p>品牌:<span th:text="${cartsInfo.brandName}"></span></p>
<p>经销商:<span th:text="${cartsInfo.supplierName}"></span></p>
<p>规格:每<span th:text="${#strings.concat(cartsInfo.unit).concat(cartsInfo.specifications)}"></span></p>
<p>零售价:<span th:text="${cartsInfo.retailPrice}"></span>元</p>
<p>购买日期:<span th:text="${cartsInfo.updateTime}"></span></p>
<p>
<span th:text="${cartsInfo.count}"></span>件
<a class="button" th:href="@{delCart(cartId=${cartsInfo.cartId},count=${cartsInfo.count},commodityId=${cartsInfo.commodityId})}"><span>删除</span></a>
</p>
</div>
</div>
<div class="clear"></div>
</div>
<div class="clear"></div>
<span th:if="${cartList.size()!=0}"><button class="button"><span>结账</span></button></span>
</form>
<div class="clear"></div>
<div class="about_wrapper">
<h1>
购买历史信息
</h1>
</div>
<span th:each="buyedInfo,varstatus:${list}">
<div class="about-top">
<div class="grid">
<h3>商户订单号:<span th:text="${buyedInfo.outTradeNo}"></span></h3>
<p>订单名称:<span th:text="${buyedInfo.subject}"></span></p>
<p>付款金额:<span th:text="${buyedInfo.price}"></span></p>
<p>订单描述:<span th:text="${buyedInfo.body}"></span></p>
<p>收货人姓名:<span th:text="${buyedInfo.receiveName}"></span></p>
<p>收货人地址:<span th:text="${buyedInfo.receiveAddress}"></span></p>
<p>收货人邮编:<span th:text="${buyedInfo.receiveZip}"></span></p>
<p>收货人电话号码:<span th:text="${buyedInfo.receivePhone}"></span></p>
<p>收货人手机号码:<span th:text="${buyedInfo.receiveMobile}"></span></p>
<p>购买日期:<span th:text="${buyedInfo.updateTime}"></span></p>
<p>
如果该单已经付过款则重新付款会在支付宝页面提示失败,请不必担心重复付款的问题。
<a class="button" th:href="@{replayAlipay(outTradeNo=${buyedInfo.outTradeNo})}"><span>重新付款</span></a>
</p>
</div>
<div class="clear"></div>
</div>
</span>
<div class="clear"></div>
</div>
<div class="header-para">
<div th:replace="shop/rightBar :: page-right-bar"></div>
</div>
<div class="clear"></div>
<div class="footer-bottom">
<div class="copy">
<div th:replace="shop/copyRight :: page-copy-right"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>