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.

273 lines
10 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
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
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. @include('weixin.common.headerNav')
  14. <a href="/v2/index.php?m=default&amp;c=flow&amp;a=consignee_list&amp;u=53657">
  15. <div class="checkout-addr">
  16. <!-- <p class="des">请添加收货地址</p> -->
  17. <p class="title"><span class="name"><?php echo $user_default_address['name']; ?></span> <span class="tel"><?php echo $user_default_address['mobile']; ?></span></p>
  18. <p class="des"><?php echo $user_default_address['province_name']; ?><?php echo $user_default_address['city_name']; ?><?php echo $user_default_address['district_name']; ?> <?php echo $user_default_address['address']; ?></p>
  19. <i></i>
  20. </div>
  21. </a>
  22. <style>
  23. .checkout-addr{position: relative;/* border-top: 1px solid #e3e3e3;border-bottom: 1px solid #e3e3e3; */background: #fff;margin-top:10px;padding:10px;}
  24. .checkout-addr p{margin-right:20px;}.checkout-addr .title{font-size:18px;color:#353535;}.checkout-addr .des{color:#9b9b9b;}
  25. .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);}
  26. </style>
  27. <ul class="goodslist">
  28. <?php if($list){foreach($list as $k=>$v){ ?>
  29. <li>
  30. <img src="<?php echo $v['litpic']; ?>">
  31. <p><b><?php echo $v['title']; ?></b><span>¥<?php echo $v['final_price']; ?><i>x<?php echo $v['goods_number']; ?></i></span></p>
  32. </li>
  33. <?php }} ?>
  34. </ul>
  35. <style>
  36. .goodslist{background-color:#fff;margin-top:10px;}
  37. .goodslist li{display:-webkit-box;margin:0 10px;padding:10px;border-bottom: 1px solid #f1f1f1;}
  38. .goodslist li img{margin-right:10px;display:block;width:78px;height:78px;border: 1px solid #e1e1e1;}
  39. .goodslist li p {display: block;-webkit-box-flex: 1;width: 100%;}
  40. .goodslist li p b {display:block;font-size:16px;font-weight:400;line-height: 28px;color:#333;}
  41. .goodslist li p span {color:#f23030;font-size:18px;display: block;padding-top:8px;}
  42. .goodslist li p i{color:#666;float:right;font-size:14px;}
  43. </style>
  44. <div class="floor">
  45. <ul class="fui-list mt10">
  46. <a href="javascript:update_pay_mode_layer();"><li>
  47. <div class="ui-list-info">
  48. <h4 class="ui-nowrap">支付方式</h4>
  49. <div class="ui-txt-info">微信支付 &nbsp;</div>
  50. </div>
  51. <i class="fa fa-angle-right" aria-hidden="true"></i>
  52. </li></a>
  53. <style>
  54. .bottoma{display:block;font-size:18px;padding:10px;border-radius:2px;}
  55. </style>
  56. <script>
  57. function update_pay_mode_layer()
  58. {
  59. //询问框
  60. layer.open({
  61. content: '<div style="padding:15px;"><a style="margin-bottom:10px;background-color:#1aad19;text-align:center;color:white;border:1px solid #179e16;" class="bottoma" onclick="layer.closeAll();" href="javascript:update_pay_mode(1);">账户余额 38.62元</a><a style="margin-bottom:10px;background-color:#ea5a3d;text-align:center;color:white;border:1px solid #dd2727;" class="bottoma" onclick="layer.closeAll();" href="javascript:update_pay_mode(2);">微信支付</a></div>'
  62. });
  63. }
  64. function update_pay_mode(sex)
  65. {
  66. $.post('<?php echo env('APP_API_URL').'/user_info_update'; ?>',{sex:sex,access_token:'<?php echo $_SESSION['weixin_user_info']['access_token']; ?>'},function(res)
  67. {
  68. if(res.code==0)
  69. {
  70. //提示
  71. layer.open({
  72. content: '修改成功'
  73. ,skin: 'msg'
  74. ,time: 2 //2秒后自动关闭
  75. });
  76. }
  77. else
  78. {
  79. layer.open({
  80. content: res.msg
  81. ,skin: 'msg'
  82. ,time: 2 //2秒后自动关闭
  83. });
  84. }
  85. },'json');
  86. window.location.reload();
  87. }
  88. </script>
  89. <a href="javascript:update_username();"><li>
  90. <div class="ui-list-info">
  91. <h4 class="ui-nowrap">优惠券</h4>
  92. <div class="ui-txt-info">请选择优惠券 &nbsp;</div>
  93. </div>
  94. <i class="fa fa-angle-right" aria-hidden="true"></i>
  95. </li></a>
  96. </ul></div>
  97. <div class="floor" style="background-color:#fff;margin-top:10px;padding:10px;">
  98. <div class="buy_note">
  99. <div class="buy_note_tit"><span>备注</span></div>
  100. <textarea name="message" rows="3" placeholder="给卖家留言"></textarea>
  101. </div>
  102. <div class="order_check_info">
  103. <p>共1件商品</p>
  104. <p>运费:¥0</p>
  105. <p>满¥15.00减¥1.00</p>
  106. <p>商品总价:¥99</span></p>
  107. <p>应付款金额:<span class="red">¥<i id="totalamount">99</i></span></p>
  108. </div>
  109. </div>
  110. <style>
  111. .buy_note{margin:5px 0 15px 0;}
  112. .buy_note_tit{font-size:16px;margin-bottom:15px;}
  113. .buy_note textarea{display:block;font-size: 14px;border:1px solid #e1e1e1;width: 100%;padding:10px;box-sizing: border-box;}
  114. .order_check_info p{text-align:right;line-height:22px;color: #666;font-size:14px;}
  115. .order_check_info p .red{color:#ff5500;font-size:18px;}
  116. </style>
  117. <div class="setting"><div class="close"><a href="<?php echo route('weixin_user_logout'); ?>" id="logout">提交</a></div></div>
  118. <script type="text/javascript" src="<?php echo env('APP_URL'); ?>/js/layer/mobile/layer.js"></script>
  119. <script>
  120. function cart_submit()
  121. {
  122. var cart_goods_ids = '';
  123. $('[name="checkItem"][checked]').each(function(){
  124. var goods_id = $(this).attr('data-cart-id');
  125. if(cart_goods_ids){cart_goods_ids = cart_goods_ids+'_'+goods_id;}else{cart_goods_ids = cart_goods_ids+goods_id;}
  126. });
  127. if(cart_goods_ids == '')
  128. {
  129. layer.open({
  130. content: '请选择商品'
  131. ,skin: 'msg'
  132. ,time: 2 //2秒后自动关闭
  133. });
  134. return false;
  135. }
  136. location.href = '<?php echo substr(route('weixin_cart_checkout',array('ids'=>1)), 0, -1); ?>' + cart_goods_ids;
  137. }
  138. function change_goods_number(type, id)
  139. {
  140. var goods_number = document.getElementById('goods_number'+id).value;
  141. if(type != 2)
  142. {
  143. var goods_number = document.getElementById('goods_number'+id).value;
  144. document.getElementById('goods_number'+id).value = goods_number;
  145. }
  146. if(type == 1){goods_number--;}
  147. if(type == 3){goods_number++;}
  148. if(goods_number <= 0){goods_number=1;}
  149. if(!/^[0-9]*$/.test(goods_number)){goods_number = document.getElementById('goods_number'+id).value;}
  150. document.getElementById('goods_number'+id).value = goods_number;
  151. var access_token = '<?php echo $_SESSION['weixin_user_info']['access_token']; ?>';
  152. var url = '<?php echo env('APP_API_URL').'/cart_add'; ?>';
  153. $.post(url,{access_token:access_token,goods_id:id,goods_number:goods_number},function(res)
  154. {
  155. if (res.code == 0)
  156. {
  157. changeCartTotalPrice();
  158. }
  159. else if (res.msg != '')
  160. {
  161. //提示
  162. layer.open({
  163. content: '姓名不能为空'
  164. ,skin: 'msg'
  165. ,time: 2 //2秒后自动关闭
  166. });
  167. var goods_number = document.getElementById('goods_number'+id).value;
  168. document.getElementById('goods_number'+id).value = goods_number;
  169. }
  170. }, 'json');
  171. }
  172. //删除购物车商品
  173. $(function () {
  174. //删除购物车商品事件
  175. $(document).on("click", '.deleteGoods', function (e) {
  176. var access_token = '<?php echo $_SESSION['weixin_user_info']['access_token']; ?>';
  177. var cart_ids = new Array();
  178. cart_ids.push($(this).attr('data-cart-id'));
  179. layer.open({
  180. content: '确定要删除此商品吗'
  181. ,btn: ['确定', '取消']
  182. ,yes: function(index){
  183. layer.close(index);
  184. $.ajax({
  185. type : "POST",
  186. url:"<?php echo env('APP_API_URL').'/cart_delete'; ?>",
  187. dataType:'json',
  188. data: {access_token:access_token,id:cart_ids},
  189. success: function(res){
  190. layer.open({
  191. content: res.msg
  192. ,skin: 'msg'
  193. ,time: 2 //2秒后自动关闭
  194. });
  195. window.location.reload();
  196. }
  197. });
  198. }
  199. });
  200. })
  201. });
  202. //勾选商品
  203. function checkGoods(obj)
  204. {
  205. if($(obj).hasClass('check_t'))
  206. {
  207. //改变颜色
  208. $(obj).removeClass('check_t');
  209. //取消选中
  210. $(obj).find('input').attr('checked',false);
  211. }
  212. else
  213. {
  214. //改变颜色
  215. $(obj).addClass('check_t');
  216. //勾选选中
  217. $(obj).find('input').attr('checked',true);
  218. }
  219. //选中全选多选框
  220. if($(obj).hasClass('checkFull'))
  221. {
  222. if($(obj).hasClass('check_t'))
  223. {
  224. $(".che").each(function(i,o){
  225. $(this).addClass('check_t');
  226. $(this).find('input').attr('checked',true);
  227. });
  228. }
  229. else
  230. {
  231. $(".che").each(function(i,o){
  232. $(this).removeClass('check_t');
  233. $(this).find('input').attr('checked',false);
  234. });
  235. }
  236. }
  237. changeCartTotalPrice();
  238. }
  239. //修改选中商品总价
  240. function changeCartTotalPrice()
  241. {
  242. var total_price = 0;
  243. $('[name="checkItem"][checked]').each(function(){
  244. var goods_id = $(this).attr('data-goods-id');
  245. total_price = total_price + $('#goods_number'+goods_id).val() * $('#goods_price'+goods_id).text();
  246. });
  247. $('#total_fee').text(total_price);
  248. }
  249. </script>
  250. </body></html>