thymeleaf显示图片

thymeleaf显示图片

 @RequestMapping(value="/text") 
        public String text(Model model){

            Product product = new Product();

            product.setProductId(1);
            product.setProductName("商品");
            product.setImgAddr("/adv.png");


            model.addAttribute("product",product);


            return "cart";
        }

这里写图片描述


<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"    
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<head>
<meta charset="UTF-8"></meta>
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1"></meta>
<meta name="Cache-control" content="no-tranform"></meta>
<meta name="apple-mobile-web-app-capable" content="yes"></meta>
<meta name="apple-mobile-web-app-status-bar-style" content="black"></meta>
<meta name="format-detection" content="telephone=no"></meta>
<meta name="Author" content="web_author"></meta>
<meta name="apple-mobile-web-app-title" content=""></meta>
<meta name="screen-orientation" content="portrait"></meta>
<meta name="x5-orientation" content="portrait"></meta>
<meta name="browsermode" content="application"></meta>
<meta name="x5-page-mode" content="app"></meta>
<meta name="HandheldFriendly" content="true"></meta>
<meta name="msapplication-tap-highlight" content="no"></meta>

<meta name="description" content=""></meta>
<meta name="keywords" content=""></meta>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" ></meta>
<meta name="og:site_name" content="首页"></meta>
<meta name="og:type" content="website"></meta>
<meta name="og:title" content="首页"></meta>
<meta name="og:url" content=""></meta>
<meta name="og:description" content=""></meta>
<title>购物车</title>
<link rel="stylesheet" href="./css/main.css?time=1" />
<link rel="stylesheet" href="./css/cart.css?t=1509339588"/>

</head>
<body>
<main>
<div id="top"><a class="go_back" href="./"><img th:src="@{${product.imgAddr}}"/></a>
<span class="t">购物车</span><a class="edit" href="cart_edit.html">编辑</a>
</div>

<div class="shop_name">
<a class="select"><img th:src="@{${product.imgAddr}}"/></a><a class="t">美丽人生美妆店 》</a><a class="del"><img th:src="@{${product.imgAddr}}"/></a>
</div>

<div class="pors">
<div class="item">
<a class="s"><img th:src="@{${product.imgAddr}}"/></a>
<a class="pro" href="#"><img th:src="@{${product.imgAddr}}"/></a>
<!-- <a class="title" th:text="${product.productName}" ></a> -->
<span class="price">¥269.00</span>
<div class="add_box">
<!-- <a class="bt"><img th:src="@{'../resources/static/'+${product.imgAddr}}"/></a>
<a class="bt"><img th:href="@{product.imgAddr}"/></a> -->
<input class="num" value="1"></input>
<!-- <a class="bt"><img th:src="${product.imgAddr}"/></a> -->
</div>
</div>
<div class="item">
<a class="s"><img th:src="@{${product.imgAddr}}"/></a>
<a class="pro" href="#"><img th:src="@{${product.imgAddr}}"/></a>
<a class="title">拉福利美妆套装,正品进口假一赔十,免税店代购</a>
<span class="price">¥269.00</span>
<div class="add_box">;
<a class="bt"><img th:src="@{${product.imgAddr}}"/></a>
<input class="num" value="1"></input>
<a class="bt"><img th:src="@{${product.imgAddr}}"/></a>
</div>
</div>

</div>



<div class="shop_name">
<a class="select"><img th:src="@{${product.imgAddr}}"/></a><a class="t">美丽人生美妆店 》</a><a class="del"><img th:src="@{${product.imgAddr}}"/></a>
</div>


<div class="pors" th:each="product,productStat : ${cartProduct}" >
<div class="item">
<a class="s"><img th:src="@{${product.imgAddr}}"/></a>
<a class="pro" href="#"><img th:src="@{${product.imgAddr}}"/></a>
<a class="title" th:text="${product.productName}"></a>
<span class="price" th:text="${product.imgAddr}"><img th:src="@{/adv.png}"/></span>
<div class="add_box">
<a class="bt"><img th:src="@{'../resources/static/'+${product.imgAddr}}"/></a>
<img th:src="@{${product.imgAddr}}"/>
<a class="bt"><img th:src="@{${product.imgAddr}}"/></a>
<input class="num" value="1"/>
<a class="bt"><img th:src="@{${product.imgAddr}}"/></a>
</div>
</div>


</div>


<div class="shop_name">
<a class="select"><img th:src="@{${product.imgAddr}}"/></a><a class="t">美丽人生美妆店 》</a><a class="del"><img th:src="@{${product.imgAddr}}"/></a>
</div>

<div class="pors">
<div class="item">
<a class="s"><img th:src="@{${product.imgAddr}}"/></a>
<a class="pro" href="#"><img th:src="@{${product.imgAddr}}"/></a>
<a class="title">拉福利美妆套装,正品进口假一赔十,免税店代购</a>
<span class="price">¥269.00</span>
<div class="add_box">
<a class="bt"><img th:src="@{${product.imgAddr}}"/></a>
<input class="num" value="1"/>
<a class="bt"><img th:src="@{${product.imgAddr}}"/></a>
</div>
</div>


</div>

<div id="js">
<a class="s"><img th:src="@{${product.imgAddr}}"/><font>全选</font></a>
<span class="total">合计:<font>269.00元</font></span>
<a class="js_bt"><img th:src="@{${product.imgAddr}}"/></a>
</div>

</main>

<nav>
<a href="/"><span class="icon"><img th:src="@{${product.imgAddr}}"/></span><span class="text ">首页</span></a>
<a href="list.html"><span class="icon"><img th:src="@{${product.imgAddr}}"/></span><span class="text">分类</span></a>
<a href="cart.html"><span class="icon"><img th:src="@{${product.imgAddr}}"/></span><span class="text select">购物车</span></a>
<a href="account.html"><span class="icon"><img th:src="@{${product.imgAddr}}"/></span><span class="text">我的</span></a>
</nav>
<script src="./jquery.js"></script><script src="./jqm.js"></script>
<script src="./js/cart.js?t=1509339588"></script>
</body>
</html>
  • 4
    点赞
  • 15
    收藏
    觉得还不错? 一键收藏
  • 4
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值