作者 徐治堂

购物车bug修改

... ... @@ -23,7 +23,7 @@ class ZjCartController extends HomeBaseController
$id=8;
$all=Db::name('zj_cart')->alias('c')->join('zj_goods g','c.gid=g.id')->join('zj_category ca','g.cid=ca.id')
->where('c.uid',$id)->field('c.id as cartid,c.gid,c.num,g.*,ca.cid as caid')->select();
if (empty($all)){
if (empty($all[0])){
$you=1;
}else{
$you=2;
... ...
... ... @@ -156,6 +156,7 @@
<script src="__INDEX__/js/jquery.min.js"></script>
<script>
if ({$you}==1){
$('.havegood').remove()
$('.nogood').css('display','block')
}
//购物车的数量
... ... @@ -283,6 +284,9 @@
})
}
})
$(".see").click(function(){
window.location.href="{:url('index/index/index')}"
})
$(".home").click(function(){
window.location.href="{:url('index/index/index')}"
})
... ...