You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

138 lines
6.0 KiB

  1. <!DOCTYPE html><html><head><meta http-equiv="content-type" content="text/html;charset=utf-8"/>
  2. <title>收货地址管理</title><meta content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport">
  3. <link href="<?php echo env('APP_URL'); ?>/css/weixin/style.css" type="text/css" rel="stylesheet">
  4. <script type="text/javascript" src="<?php echo env('APP_URL'); ?>/js/jquery.min.js"></script>
  5. <script type="text/javascript" src="<?php echo env('APP_URL'); ?>/js/weixin/mobile.js"></script>
  6. <meta name="keywords" content="关键词"><meta name="description" content="描述"></head><body style="background-color:#f1f1f1;">
  7. <div class="classreturn loginsignup">
  8. <div class="ds-in-bl return"><a href="javascript:history.back(-1);"><img src="<?php echo env('APP_URL'); ?>/images/weixin/return.png" alt="返回"></a></div>
  9. <div class="ds-in-bl tit center"><span>收货地址管理</span></div>
  10. <div class="ds-in-bl nav_menu"><a href="javascript:void(0);"><img src="<?php echo env('APP_URL'); ?>/images/weixin/class1.png" alt="菜单"></a></div>
  11. </div>
  12. <div class="flool tpnavf cl">
  13. <div class="nav_list">
  14. <ul>
  15. <a href="<?php echo route('weixin'); ?>"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/home_icon.png"><p>首页</p></li></a>
  16. <a href="/Weixin/index.php?m=Store&amp;a=index"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/brand_icon.png"><p>分类</p></li></a>
  17. <a href="/Weixin/index.php?m=Cart&amp;a=index"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/car_icon.png"><p>购物车</p></li></a>
  18. <a href="/Weixin/index.php?m=User&amp;a=index"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/center_icon.png"><p>个人中心</p></li></a></ul>
  19. <div class="cl"></div>
  20. </div>
  21. </div>
  22. <style>
  23. .address_list .flow-have-adr{padding:15px;margin-bottom:10px;background-color:#fff;}
  24. .address_list .f-h-adr-title .ect-colory{color:#e23435;}
  25. .address_list .f-h-adr-title label{font-size:18px;color:#000;margin-right:5px;}
  26. .address_list .f-h-adr-con{color:#777;margin-top:5px;margin-bottom:5px;}
  27. .address_list .adr-edit-del{text-align:right;}
  28. .address_list .adr-edit-del a{color:#777;margin-right:8px;}
  29. .address_list .f-h-adr-title span.fr{background-color: #f23030;color: white;padding:0 5px;}
  30. .bottoma{display:block;font-size:18px;padding:10px;color:white;background-color: #f23030;text-align:center;}
  31. </style>
  32. <a style="margin:10px;" class="bottoma" href="<?php echo route('weixin_user_address_add'); ?>">新增地址</a>
  33. <div class="address_list">
  34. <?php if($list){foreach($list as $k=>$v){ ?>
  35. <div class="flow-have-adr">
  36. <p class="f-h-adr-title"><label><?php echo $v['name']; ?></label><span class="ect-colory"><?php echo $v['mobile']; ?></span><?php if($v['is_default']==1){ ?><span class="fr">默认</span><?php } ?></p>
  37. <p class="f-h-adr-con"><?php echo $v['province_name'].$v['city_name'].$v['district_name'].' '.$v['address']; ?></p>
  38. <div class="adr-edit-del"><a href="<?php echo route('weixin_user_address_update',array('id'=>$v['id'])); ?>"><i class="iconfont icon-bianji"></i>编辑</a><a href="javascript:del(<?php echo $v['id']; ?>);"><i class="iconfont icon-xiao10"></i>删除</a></div>
  39. </div>
  40. <?php }} ?>
  41. </div>
  42. <script type="text/javascript" src="<?php echo env('APP_URL'); ?>/js/layer/mobile/layer.js"></script>
  43. <script>
  44. $(function(){
  45. var ajaxload = false;
  46. var maxpage = false;
  47. var startpage = 1;
  48. var totalpage = <?php echo $totalpage; ?>;
  49. var tmp_url = window.location.href;
  50. msg = tmp_url.split("#");
  51. tmp_url = msg[0];
  52. $(window).scroll(function ()
  53. {
  54. var listheight = $(".address_list").outerHeight();
  55. if ($(document).scrollTop() + $(window).height() >= listheight)
  56. {
  57. if(startpage >= totalpage)
  58. {
  59. //$("#submit_bt_one").html("已是最后一页,没有更多数据!");
  60. return false;
  61. }
  62. if(!ajaxload && !maxpage)
  63. {
  64. ajaxload = true;
  65. //$("#submit_bt_one").html("努力加载中...");
  66. var url = tmp_url;
  67. var nextpage = startpage+1;
  68. $.get(url,{page_ajax:1,page:nextpage},function(res)
  69. {
  70. if(res)
  71. {
  72. $(".address_list").append(res);
  73. startpage++;
  74. if(startpage >= totalpage)
  75. {
  76. maxpage = true;
  77. //$("#submit_bt_one").html("已是最后一页,没有更多数据!");
  78. }
  79. else
  80. {
  81. //$("#submit_bt_one").html("点击加载更多");
  82. }
  83. ajaxload = false;
  84. }
  85. else
  86. {
  87. //$("#submit_bt_one").html("请求失败,请稍候再试!");
  88. ajaxload = false;
  89. }
  90. },'json');
  91. }
  92. }
  93. });
  94. });
  95. function del(id)
  96. {
  97. //询问框
  98. layer.open({
  99. content: '确定要删除吗?'
  100. ,btn: ['确定', '取消']
  101. ,yes: function(){
  102. var url = '<?php echo env('APP_API_URL')."/user_address_delete"; ?>';
  103. $.post(url,{access_token:'<?php echo $_SESSION['weixin_user_info']['access_token']; ?>',id:id},function(res)
  104. {
  105. //提示
  106. layer.open({
  107. content: res.msg
  108. ,skin: 'msg'
  109. ,time: 2 //2秒后自动关闭
  110. });
  111. if(res.code==0)
  112. {
  113. location.reload();
  114. }
  115. else
  116. {
  117. }
  118. },'json');
  119. }
  120. });
  121. }
  122. </script>
  123. @include('weixin.common.footer')
  124. </body></html>