123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- ##tlayout("www/layout.htm"){
- <nav class="my-nav">
- <ul class="container list-unstyled nav-list clearfix">
- <li><a href="/user">个人中心</a></li>
- <li><a href="/user/orders">我的订单</a></li>
- <li class="active"><a href="/user/diy">我的定制</a></li>
- <li><a href="/user/address">收货地址</a></li>
- </ul>
- </nav>
- <section class="container" style="min-height: 600px;">
- <div style="height: 20px;"></div>
- <div class="product-wrapper">
- <div class="product-content">
- <ul class="product-list row list-unstyled clearfix">
- ##for(_item in diy_list!){
- <li>
- <div class="list_item">
- <img src="${_item.img_url!}" class="img-responsive prduct-img"/>
- <div class="product-title">
- <div class="title">${_item.diy_title!}</div>
- <div class="remark">${_item.diy_remark!}</div>
- <div class="remark">创建时间:${_item.create_date!,dateFormat='yyyy-MM-dd HH:mm'}</div>
- <a style="color: #fff;" target="_blank" href='/diy?id=${_item.id!}&type=2' class="btn">编辑定制</a>
- <span onclick="addCart(${_item.id!})" class="btn">加入购物车</span>
- <span onclick="showImg('${_item.img_url!}')" class="btn btn_two">查看设计</span>
- <div class="del_diy_btn" onclick="deleteDiy(${_item.id!})"><img src="/www/image/del_diy.png" /></div>
- </div>
- </div>
- </li>
- ##}
- </ul>
- </div>
- </div>
- </section>
- <script>
- function addCart(id){
-
- $.post("/shop/addCart",{id:id},function(data){
- alert(data.msg);
- if(data.success){
- location.reload();
- }
- });
- }
- function showImg(imgUrl){
-
- window.open(imgUrl);
- }
- function deleteDiy(id){
-
- if(confirm("确定要删除该条记录?")){
- $.post("/user/deleteDiy",{id:id},function(data){
- alert(data.msg);
- if(data.success){
- location.reload();
- }
- });
- }
- }
- $(document).ready(function(){
-
- $('.product-list li').hover(function(){
- $(this).find('.product-title').stop().fadeIn();
- },function(){
- $(this).find('.product-title').stop().fadeOut();
- });
- });
- </script>
- ##}
|