修改产品为多个分类的时候打开产品详情页报错问题

This commit is contained in:
等风来 2018-09-05 11:55:15 +08:00
parent c4bb6cfa68
commit 75a32e01bf
3 changed files with 5 additions and 3 deletions

View File

@ -40,6 +40,7 @@ function setView($uid,$product_id=0,$cate=0,$type='',$content='',$min=20){
$Db->where(['id'=>$view['id']])->update(['count'=>$view['count']+1,'add_time'=>time()]);
}
}else{
$cate = explode(',',$cate)[0];
$Db->insert([
'add_time'=>time(),
'count'=>1,

View File

@ -38,10 +38,10 @@
<view>销量:{{storeInfo.sales}}{{storeInfo.unit_name}}</view>
</view>
</view>
<!-- <view class='block-bar' bindtap='goCoupon'>
<view class='block-bar' bindtap='goCoupon'>
<text class='title'>领券</text>
<text>领取优惠券 </text>
</view> -->
</view>
<!-- <view class='block-bar integral' wx:if="{{storeInfo.give_integral > 0}}">
<text class='title'>积分</text>
<text>购买可获得{{storeInfo.give_integral}}积分</text>

View File

@ -40,6 +40,7 @@ function setView($uid,$product_id=0,$cate=0,$type='',$product_type = 'product',$
$Db->where(['id'=>$view['id']])->update(['count'=>$view['count']+1,'add_time'=>time()]);
}
}else{
$cate = explode(',',$cate)[0];
$Db->insert([
'add_time'=>time(),
'count'=>1,
@ -51,4 +52,4 @@ function setView($uid,$product_id=0,$cate=0,$type='',$product_type = 'product',$
'content'=>$content
]);
}
}
}