| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147 |
- ##tlayout("www/layout.htm"){
- <nav class="my-nav">
- <ul class="container list-unstyled nav-list clearfix">
- <li class="active"><a href="/user">个人中心</a></li>
- <li><a href="/user/orders">我的订单</a></li>
- <li><a href="/user/diy">我的定制</a></li>
- <li><a href="/user/address">收货地址</a></li>
- </ul>
- </nav>
- <div class="template">
- <img src="/www/image/banner-center.jpg" class="center" />
- <div class="user-info">
- <div class="user-head">
- <img src="${user.img_url!}" class="user-img" />
- </div>
- <p class="user-name">${user.name!}</p>
- <div class="user-email"><span style="border: 0px;">注册时间:${user.create_date!,dateFormat='yyyy-MM-dd HH:mm'}</span></div>
- </div>
- </div>
- <section class="container">
- <h3 class="template-title text-center">
- 我的订单
- <a href="/user/orders" class="check-all">查看全部订单<span class="glyphicon glyphicon-menu-right"></span></a>
- </h3>
- <table class="table order-table">
- <thead>
- <tr>
- <th>订单号</th>
- <th>创建时间</th>
- <th>支付方式</th>
- <th>总计</th>
- <th>状态</th>
- </tr>
- </thead>
- <tbody>
- ##if(results!=null && results.list.~size!=0){
- ##for(_item in results.list!){
- <tr>
- <td><a class="red" href="/user/ordersMsg?code=${_item.code!}">${_item.code!}</a></td>
- <td>${_item.create_date!,dateFormat='yyyy-MM-dd HH:mm'}</td>
- <td>
- ##if(_item.payment==1){
- 微信支付
- ##}else if(_item.payment==2){
- 银行卡支付
- ##}else if(_item.payment==3){
- 支付宝支付
- ##}
- </td>
- <td>¥${_item.grand_total!}</td>
- <td>
- ##if(_item.status==0){
- 未付款
- ##}else if(_item.status==1){
- 付款审核中
- ##}else if(_item.status==2){
- 待发货
- ##}else if(_item.status==3){
- 已发货
- ##}else if(_item.status==4){
- 已收货
- ##}else if(_item.status==5){
- 已完成
- ##}else{
- 退款中
- ##}
- </td>
- </tr>
- ##}
- ##}else{
- <tr><td colspan="5">没有订单信息!</td></tr>
- ##}
- </tbody>
- </table>
- </section>
- <section class="container">
- <h3 class="template-title text-center">
- 我的定制
- <a href="/user/diy" class="check-all">查看全部定制<span class="glyphicon glyphicon-menu-right"></span></a>
- </h3>
- ##if(diy_list!=null && diy_list.~size!=0){
- <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>
- ##}else{
- <table class="table order-table">
- <tbody>
- <tr><td>没有定制信息!</td></tr>
- </tbody>
- </table>
- ##}
- </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>
- ##}
|