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.

244 lines
9.4 KiB

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
  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. <link href="<?php echo env('APP_URL'); ?>/css/font-awesome.min.css" type="text/css" rel="stylesheet">
  7. <meta name="keywords" content="关键词"><meta name="description" content="描述"></head><body style="background-color:#f1f1f1;">
  8. <div class="classreturn loginsignup">
  9. <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>
  10. <div class="ds-in-bl tit center"><span>确认订单</span></div>
  11. <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>
  12. </div>
  13. <div class="flool tpnavf cl">
  14. <div class="nav_list">
  15. <ul>
  16. <a href="<?php echo route('weixin'); ?>"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/home_icon.png"><p>首页</p></li></a>
  17. <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>
  18. <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>
  19. <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>
  20. <div class="cl"></div>
  21. </div>
  22. </div>
  23. <a href="/v2/index.php?m=default&amp;c=flow&amp;a=consignee_list&amp;u=53657">
  24. <div class="checkout-addr">
  25. <p class="title">范例 <span>15280767654</span></p>
  26. <p class="des">福建厦门湖里区 软件园二期100号</p>
  27. <i></i>
  28. </div>
  29. </a>
  30. <style>
  31. .checkout-addr{position: relative;/* border-top: 1px solid #e3e3e3;border-bottom: 1px solid #e3e3e3; */background: #fff;margin-top:10px;padding:10px;}
  32. .checkout-addr p{margin-right:20px;}.checkout-addr .title{font-size:18px;margin-bottom:5px;}.checkout-addr .des{color:#666;}
  33. .checkout-addr i{position: absolute;top: 50%;right:12px;margin-top:-6px;color:#bbb;display:inline-block;border-right:2px solid;border-bottom:2px solid;width:12px;height:12px;transform:rotate(-45deg);}
  34. </style>
  35. <ul class="goodslist">
  36. <?php if($list){foreach($list as $k=>$v){ ?>
  37. <li>
  38. <img src="<?php echo $v['litpic']; ?>">
  39. <p><b><?php echo $v['title']; ?></b><span>¥<?php echo $v['final_price']; ?><i>x<?php echo $v['goods_number']; ?></i></span></p>
  40. </li>
  41. <?php }} ?>
  42. </ul>
  43. <style>
  44. .goodslist{background-color:#fff;margin-top:10px;}
  45. .goodslist li{display:-webkit-box;margin:0 10px;padding:10px;border-bottom: 1px solid #f1f1f1;}
  46. .goodslist li img{margin-right:10px;display:block;width:78px;height:78px;border: 1px solid #e1e1e1;}
  47. .goodslist li p {display: block;-webkit-box-flex: 1;width: 100%;}
  48. .goodslist li p b {display:block;font-size:16px;font-weight:400;line-height: 28px;color:#333;}
  49. .goodslist li p span {color:#f23030;font-size:18px;display: block;padding-top:8px;}
  50. .goodslist li p i{color:#666;float:right;font-size:14px;}
  51. </style>
  52. <div class="floor">
  53. <ul class="fui-list mt10">
  54. <a href="javascript:update_username();"><li>
  55. <div class="ui-list-info">
  56. <h4 class="ui-nowrap">支付方式</h4>
  57. <div class="ui-txt-info">支付宝 &nbsp;</div>
  58. </div>
  59. <i class="fa fa-angle-right" aria-hidden="true"></i>
  60. </li></a>
  61. <a href="javascript:update_username();"><li>
  62. <div class="ui-list-info">
  63. <h4 class="ui-nowrap">优惠券</h4>
  64. <div class="ui-txt-info">请选择优惠券 &nbsp;</div>
  65. </div>
  66. <i class="fa fa-angle-right" aria-hidden="true"></i>
  67. </li></a>
  68. </ul></div>
  69. <div class="floor" style="background-color:#fff;margin-top:10px;padding:10px;">
  70. <div class="buy_note">
  71. <div class="buy_note_tit"><span>备注</span></div>
  72. <textarea name="message"></textarea>
  73. </div>
  74. <div class="order_check_info">
  75. <p>共1件商品</p>
  76. <p>运费:¥0</p>
  77. <p>满¥15.00减¥1.00</p>
  78. <p>商品总价:¥99</span></p>
  79. <p>应付款金额:<span class="red">¥<i id="totalamount">99</i></span></p>
  80. </div>
  81. </div>
  82. <style>
  83. .buy_note{margin:5px 0 15px 0;}
  84. .buy_note_tit{font-size:16px;margin-bottom:15px;}
  85. .buy_note textarea{display:block;font-size: 14px;min-height:100px;border:1px solid #e1e1e1;width: 100%;padding:10px;box-sizing: border-box;}
  86. .order_check_info p{text-align:right;line-height:22px;color: #666;font-size:14px;}
  87. .order_check_info p .red{color:#ff5500;font-size:18px;}
  88. </style>
  89. <div class="setting"><div class="close"><a href="<?php echo route('weixin_user_logout'); ?>" id="logout">提交</a></div></div>
  90. <script type="text/javascript" src="<?php echo env('APP_URL'); ?>/js/layer/mobile/layer.js"></script>
  91. <script>
  92. function cart_submit()
  93. {
  94. var cart_goods_ids = '';
  95. $('[name="checkItem"][checked]').each(function(){
  96. var goods_id = $(this).attr('data-cart-id');
  97. if(cart_goods_ids){cart_goods_ids = cart_goods_ids+'_'+goods_id;}else{cart_goods_ids = cart_goods_ids+goods_id;}
  98. });
  99. if(cart_goods_ids == '')
  100. {
  101. layer.open({
  102. content: '请选择商品'
  103. ,skin: 'msg'
  104. ,time: 2 //2秒后自动关闭
  105. });
  106. return false;
  107. }
  108. location.href = '<?php echo substr(route('weixin_cart_checkout',array('ids'=>1)), 0, -1); ?>' + cart_goods_ids;
  109. }
  110. function change_goods_number(type, id)
  111. {
  112. var goods_number = document.getElementById('goods_number'+id).value;
  113. if(type != 2)
  114. {
  115. var goods_number = document.getElementById('goods_number'+id).value;
  116. document.getElementById('goods_number'+id).value = goods_number;
  117. }
  118. if(type == 1){goods_number--;}
  119. if(type == 3){goods_number++;}
  120. if(goods_number <= 0){goods_number=1;}
  121. if(!/^[0-9]*$/.test(goods_number)){goods_number = document.getElementById('goods_number'+id).value;}
  122. document.getElementById('goods_number'+id).value = goods_number;
  123. var access_token = '<?php echo $_SESSION['weixin_user_info']['access_token']; ?>';
  124. var url = '<?php echo env('APP_API_URL').'/cart_add'; ?>';
  125. $.post(url,{access_token:access_token,goods_id:id,goods_number:goods_number},function(res)
  126. {
  127. if (res.code == 0)
  128. {
  129. changeCartTotalPrice();
  130. }
  131. else if (res.msg != '')
  132. {
  133. //提示
  134. layer.open({
  135. content: '姓名不能为空'
  136. ,skin: 'msg'
  137. ,time: 2 //2秒后自动关闭
  138. });
  139. var goods_number = document.getElementById('goods_number'+id).value;
  140. document.getElementById('goods_number'+id).value = goods_number;
  141. }
  142. }, 'json');
  143. }
  144. //删除购物车商品
  145. $(function () {
  146. //删除购物车商品事件
  147. $(document).on("click", '.deleteGoods', function (e) {
  148. var access_token = '<?php echo $_SESSION['weixin_user_info']['access_token']; ?>';
  149. var cart_ids = new Array();
  150. cart_ids.push($(this).attr('data-cart-id'));
  151. layer.open({
  152. content: '确定要删除此商品吗'
  153. ,btn: ['确定', '取消']
  154. ,yes: function(index){
  155. layer.close(index);
  156. $.ajax({
  157. type : "POST",
  158. url:"<?php echo env('APP_API_URL').'/cart_delete'; ?>",
  159. dataType:'json',
  160. data: {access_token:access_token,id:cart_ids},
  161. success: function(res){
  162. layer.open({
  163. content: res.msg
  164. ,skin: 'msg'
  165. ,time: 2 //2秒后自动关闭
  166. });
  167. window.location.reload();
  168. }
  169. });
  170. }
  171. });
  172. })
  173. });
  174. //勾选商品
  175. function checkGoods(obj)
  176. {
  177. if($(obj).hasClass('check_t'))
  178. {
  179. //改变颜色
  180. $(obj).removeClass('check_t');
  181. //取消选中
  182. $(obj).find('input').attr('checked',false);
  183. }
  184. else
  185. {
  186. //改变颜色
  187. $(obj).addClass('check_t');
  188. //勾选选中
  189. $(obj).find('input').attr('checked',true);
  190. }
  191. //选中全选多选框
  192. if($(obj).hasClass('checkFull'))
  193. {
  194. if($(obj).hasClass('check_t'))
  195. {
  196. $(".che").each(function(i,o){
  197. $(this).addClass('check_t');
  198. $(this).find('input').attr('checked',true);
  199. });
  200. }
  201. else
  202. {
  203. $(".che").each(function(i,o){
  204. $(this).removeClass('check_t');
  205. $(this).find('input').attr('checked',false);
  206. });
  207. }
  208. }
  209. changeCartTotalPrice();
  210. }
  211. //修改选中商品总价
  212. function changeCartTotalPrice()
  213. {
  214. var total_price = 0;
  215. $('[name="checkItem"][checked]').each(function(){
  216. var goods_id = $(this).attr('data-goods-id');
  217. total_price = total_price + $('#goods_number'+goods_id).val() * $('#goods_price'+goods_id).text();
  218. });
  219. $('#total_fee').text(total_price);
  220. }
  221. </script>
  222. </body></html>