阅读背景:

thymeleaf 双重th:each展示订单-商品信息(笔记)

来源:互联网 
<div class="cart_content"  th:each="oIdList:${orderIdList}">
        <table>
            <tr class="table_head">
                <th>订单号</th>
                <th colspan="3">商品</th>
                <th>商品金额</th>
                <th>商品数量</th>
                <th>总金额</th>
            </tr>
            <tr><td  rowspan="0"><span th:text="${oIdList}"></span></td></tr>
            <tr class="table_content" th:each="o:${orderList}" th:if="${oIdList}==${o.id}" >
                <td class="show_img">
                    <img th:src="${o.image}"  th:value="${o.sid}"
                         th:title="${o.name}"/>
                </td>
                <td class="title" colspan="2"><span th:text="${o.name}">商品名字</span></td>
                <td class="cost">¥<span th:text="${o.price}">20.00</span>元</td>
                <td class="count"><span class="minus">-</span><span class="number" th:text="${o.quantity}">2</span><span class="add">+</span>
                </td>
                <td class="per_sum">¥<span th:with="sum=${o.price}*${o.quantity}" th:text="${sum}">40.00</span>元</td>
            </tr>
            <tr  class="table_content_del_img">
                <td class="delete_img" rowspan="0"><img th:src="@{img/delete_icon.jpg}" th:value="${oIdList}" class="deleteShopCar"/>删除订单</td>
            </tr>
            <tr class="end_pay">
<!--                <td class="is_all"><input id="all" type="checkbox" checked="checked"/>全选</td>-->
<!--                <td class="space" colspan="3"></td>-->
                <td colspan="4" class="all_sum">总价:¥<span>500.00</span>元</td>
                <td colspan="1" class="pay_button_div">
                    <button class="pay_button">结算</button>
                </td>
            </tr>
        </table>
    </div>
<div class="cart_content"  th:each="oIdList:${or



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: