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.

109 lines
4.4 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="index.html"><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. .adr_add{margin:0 10px;}
  24. .adr-form-group{margin-top:10px;}
  25. .adr-form-group input[type=text],.adr-form-group textarea{
  26. display: block;
  27. width: 100%;
  28. font-size:16px;
  29. padding:10px;
  30. color: #777;
  31. vertical-align: middle;
  32. background-color: #fff;
  33. background-image: none;
  34. border: 1px solid #ddd;
  35. border-radius: 0;box-sizing:border-box;
  36. }
  37. .bottoma{display:block;font-size:18px;padding:10px;color:white;background-color: #f23030;text-align:center;}
  38. </style>
  39. <div class="adr_add">
  40. <div class="adr-form-group">
  41. <label for="doc-ipt-email-1">收货人</label>
  42. <input name="name" type="text" class="" id="name" placeholder="输入姓名">
  43. </div>
  44. <div class="adr-form-group">
  45. <label for="doc-ipt-email-1">手机号码</label>
  46. <input type="text" name="mobile" class="" id="mobile" placeholder="输入手机号码">
  47. </div>
  48. <div class="adr-form-group">
  49. <label for="doc-ipt-email-1">地区</label>
  50. <input type="text" class="" id="doc-ipt-email-1" placeholder="输入电子邮件">
  51. </div>
  52. <div class="adr-form-group">
  53. <label for="doc-ta-1">详细地址</label>
  54. <textarea name="address" class="" rows="3" id="address"></textarea>
  55. </div>
  56. <div class="adr-form-group">
  57. <label>
  58. <input type="checkbox" name="is_default" id="is_default"> 设为默认
  59. </label>
  60. </div>
  61. </div>
  62. <a style="margin:10px;" class="bottoma" href="javascript:adr_dosubmit();">提交</a>
  63. <script type="text/javascript" src="<?php echo env('APP_URL'); ?>/js/layer/mobile/layer.js"></script>
  64. <script>
  65. function adr_dosubmit()
  66. {
  67. var access_token = '<?php echo $_SESSION['weixin_user_info']['access_token']; ?>';
  68. var url = '<?php echo env('APP_API_URL').'/user_address_add'; ?>';
  69. var name = $("#name").val();
  70. var mobile = $("#mobile").val();
  71. var address = $("#address").val();
  72. var province = '福建';
  73. var city = '厦门';
  74. var district = '湖里';
  75. var is_default = 0;
  76. if(document.getElementById("is_default").checked){is_default = 1;}
  77. $.post(url,{access_token:access_token,name:name,mobile:mobile,address:address,province:province,city:city,district:district,is_default:is_default},function(res)
  78. {
  79. if(res.code==0)
  80. {
  81. //提示
  82. layer.open({
  83. content: res.msg
  84. ,skin: 'msg'
  85. ,time: 2 //2秒后自动关闭
  86. });
  87. window.history.back();
  88. }
  89. else
  90. {
  91. //提示
  92. layer.open({
  93. content: res.msg
  94. ,skin: 'msg'
  95. ,time: 2 //2秒后自动关闭
  96. });
  97. var url = "http://www.baidu.com";
  98. location.href = url;
  99. }
  100. },'json');
  101. }
  102. </script>
  103. </body></html>