spring boot 设计列表页详情页HTML

1.关于退出功能

在layer中可以直接绑定事件不用再调用关闭网页事件,直接利用window.location.href就可以控制在当前页面打开了

2.实现登录时获取本地数据库 中标公告的 List集合

3.thymeleaf模板循环输出 list列表页

方法格式为:

<!--列表开始-->
<table width="100%" border="0" cellpadding="0" cellspacing="0">
   <th:block th:each="item : ${session.hebeiZbggs}">
   <tr>
      <td width="33" height="10" align="right"><img th:src="@{../img/333.png}"  width="25" height="25"></td>
      <td><a href="http://www.ccgp-hebei.gov.cn/province/cggg/zbgg/201809/t20180930_926775.html" target="_blank" class="a3">河北省环境监测中心农用地土壤污染状况详查(质控)设备采购项目招标公告</a></td>
   </tr>
   <tr bgcolor="#E3EDF6">
      <td height="10" align="center">&nbsp;</td>
      <td class="txt1">
         发布时间:<span class="txt" th:text="${item.fbsj}"></span>
         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
         地域:<span class="txt">石家庄市裕华区雅清街30号</span>
         &nbsp;&nbsp;&nbsp;&nbsp;
         采购人:<span class="txt">河北省环境监测中心</span>
      </td>
   </tr>


   </th:block>
</table>
其他收获:
  • HTML中<a> 标签的 target 属性规定在何处打开链接文档。
  • thymeleaf的th:href传递格式
(1)一个参数
th:href="@{/detail(id=${hebeiZbgg.id})}"
(2)多个参数
th:href="@{/Controller/behavior(param1=1,param2=${person.id})}"
controller获取格式为:

@RequestMapping(value="/detail")
public String detail(HttpServletRequest request, HttpServletResponse response) throws UnsupportedEncodingException {
    System.out.println("================详细页面成功===================");

    request.setCharacterEncoding("utf-8");
    String id = request.getParameter("id");
    System.out.println("**************"+id);
    return "detail";

}

 

posted @ 2018-10-17 10:21  发酸的丶米饭  阅读(360)  评论(0编辑  收藏  举报