正在显示
4 个修改的文件
包含
52 行增加
和
11 行删除
@@ -22,7 +22,7 @@ class ZjCartController extends HomeBaseController | @@ -22,7 +22,7 @@ class ZjCartController extends HomeBaseController | ||
22 | // $id=session('user.id'); | 22 | // $id=session('user.id'); |
23 | $id=8; | 23 | $id=8; |
24 | $all=Db::name('zj_cart')->alias('c')->join('zj_goods g','c.gid=g.id')->join('zj_category ca','g.cid=ca.id') | 24 | $all=Db::name('zj_cart')->alias('c')->join('zj_goods g','c.gid=g.id')->join('zj_category ca','g.cid=ca.id') |
25 | - ->where('c.uid',$id)->field('c.id as cartid,c.gid,c.num,g.*,ca.cid as caid')->select(); | 25 | + ->where('c.uid',$id)->where(['g.is_sta'=>'1','g.delete_time'=>'0'])->field('c.id as cartid,c.gid,c.num,g.*,ca.cid as caid')->select(); |
26 | if (empty($all[0])){ | 26 | if (empty($all[0])){ |
27 | $you=1; | 27 | $you=1; |
28 | }else{ | 28 | }else{ |
@@ -111,7 +111,7 @@ | @@ -111,7 +111,7 @@ | ||
111 | <else> | 111 | <else> |
112 | <a href="{:url('state',array('id'=>$vo['id'],'is_sta'=>'1'))}" class="js-ajax-dialog-btn" data-msg="确定上架商品">上架</a> | 112 | <a href="{:url('state',array('id'=>$vo['id'],'is_sta'=>'1'))}" class="js-ajax-dialog-btn" data-msg="确定上架商品">上架</a> |
113 | </eq> | 113 | </eq> |
114 | - <a href="{:url('delete',array('id'=>$vo['id']))}" class="js-ajax-delete">{:lang('DELETE')}</a> | 114 | + <!--<a href="{:url('delete',array('id'=>$vo['id']))}" class="js-ajax-delete">{:lang('DELETE')}</a>--> |
115 | <a href="{:url('eva',array('id'=>$vo.id))}">查看评论</a> | 115 | <a href="{:url('eva',array('id'=>$vo.id))}">查看评论</a> |
116 | </td> | 116 | </td> |
117 | </tr> | 117 | </tr> |
@@ -271,17 +271,14 @@ | @@ -271,17 +271,14 @@ | ||
271 | $(".settle").click(function(){ | 271 | $(".settle").click(function(){ |
272 | var one=$('.one').filter('.icon-xuanzhong'); | 272 | var one=$('.one').filter('.icon-xuanzhong'); |
273 | if (one.length>0){ | 273 | if (one.length>0){ |
274 | - data=[]; | 274 | + var data=''; |
275 | for (i=0;i<one.length;i++){ | 275 | for (i=0;i<one.length;i++){ |
276 | var ii=one.eq(i).attr('data-id') | 276 | var ii=one.eq(i).attr('data-id') |
277 | - var nm=one.eq(i).attr('data-num') | ||
278 | - data.push([ii,nm]) | 277 | + data+=ii+','; |
279 | } | 278 | } |
280 | - $.ajax({ | ||
281 | - url:"{:url('')}", | ||
282 | - type:'POST', | ||
283 | - data:{data} | ||
284 | - }) | 279 | + |
280 | + data=data.substr(0,data.length-1) | ||
281 | + window.location.href="/cart/zj_cart/cart/id/"+ data +".html" | ||
285 | } | 282 | } |
286 | }) | 283 | }) |
287 | $(".see").click(function(){ | 284 | $(".see").click(function(){ |
@@ -10,11 +10,44 @@ | @@ -10,11 +10,44 @@ | ||
10 | <link rel="stylesheet" href="__INDEX__/css/swiper.min.css"> | 10 | <link rel="stylesheet" href="__INDEX__/css/swiper.min.css"> |
11 | <script type="text/javascript" src="__INDEX__/js/base.js" charset="utf-8"></script> | 11 | <script type="text/javascript" src="__INDEX__/js/base.js" charset="utf-8"></script> |
12 | <title>商品详情</title> | 12 | <title>商品详情</title> |
13 | + <style> | ||
14 | + .swiper-container{ | ||
15 | + height:7.5rem; | ||
16 | + font-size: 0.24rem; | ||
17 | + | ||
18 | + } | ||
19 | + .swiper-pagination-fraction{ | ||
20 | + color:#fff; | ||
21 | + bottom:8px; | ||
22 | + left:3.1rem; | ||
23 | + | ||
24 | + } | ||
25 | + .swiper-pagination-current{ | ||
26 | + color:#fff; | ||
27 | + font-size: 0.38rem; | ||
28 | + } | ||
29 | + .swiper-pagination-current{ | ||
30 | + color:#fff; | ||
31 | + } | ||
32 | + </style> | ||
13 | </head> | 33 | </head> |
14 | <body> | 34 | <body> |
15 | <div class="container"> | 35 | <div class="container"> |
16 | <div class="good_head"> | 36 | <div class="good_head"> |
17 | - <img src="{$data.thumb}" alt=""> | 37 | + <div class="swiper-container"> |
38 | + <div class="swiper-wrapper"> | ||
39 | + <div class="swiper-slide"> | ||
40 | + <img src="__INDEX__/img/gooddetail.png" alt="" > | ||
41 | + </div> | ||
42 | + <div class="swiper-slide"> | ||
43 | + <img src="__INDEX__/img/gooddetail.png" alt="" > | ||
44 | + </div> | ||
45 | + <div class="swiper-slide"> | ||
46 | + <img src="__INDEX__/img/gooddetail.png" alt="" > | ||
47 | + </div> | ||
48 | + </div> | ||
49 | + <div class="swiper-pagination"></div> | ||
50 | + </div> | ||
18 | </div> | 51 | </div> |
19 | <div class="good_info"> | 52 | <div class="good_info"> |
20 | <p class="good_name"> | 53 | <p class="good_name"> |
@@ -95,7 +128,18 @@ | @@ -95,7 +128,18 @@ | ||
95 | </div> | 128 | </div> |
96 | </div> | 129 | </div> |
97 | <script src="__INDEX__/js/jquery.min.js"></script> | 130 | <script src="__INDEX__/js/jquery.min.js"></script> |
131 | +<script type="text/javascript" src="__INDEX__/js/swiper.min.js"></script> | ||
98 | <script> | 132 | <script> |
133 | + //轮播图 | ||
134 | + var mySwiper = new Swiper('.swiper-container', { | ||
135 | + pagination: { | ||
136 | + el: '.swiper-pagination', | ||
137 | + type: 'fraction', | ||
138 | + }, | ||
139 | + autoplay: true,//可选选项,自动滑动 | ||
140 | + | ||
141 | + }) | ||
142 | + | ||
99 | $(".good_content p").click(function(){ | 143 | $(".good_content p").click(function(){ |
100 | console.log($(this).html()) | 144 | console.log($(this).html()) |
101 | $(this).addClass("active"); | 145 | $(this).addClass("active"); |
-
请 注册 或 登录 后发表评论