...
|
...
|
@@ -22,10 +22,10 @@ class GoodsController extends HomeBaseController |
|
|
$html = '';
|
|
|
if (!empty($goodsList)) {
|
|
|
foreach ($goodsList as $item) {
|
|
|
if ($item['caid']==1){
|
|
|
$integral='购买可获得'.$item['price']*2 .'积分';
|
|
|
}else{
|
|
|
$integral='该商品无积分奖励';
|
|
|
if ($item['caid'] == 2) {
|
|
|
$integral = '购买可获得' . $item['price'] * 2 . '积分';
|
|
|
} else {
|
|
|
$integral = '该商品无积分奖励';
|
|
|
}
|
|
|
$html .= '
|
|
|
<a href="' . url('goods/Goods/detail', ['id' => $item['id']]) . '">
|
...
|
...
|
@@ -42,7 +42,7 @@ class GoodsController extends HomeBaseController |
|
|
</p>
|
|
|
<div class="people">
|
|
|
<p class="people_weight">
|
|
|
'. $integral .'
|
|
|
' . $integral . '
|
|
|
</p>
|
|
|
<p class="people_money">¥<span class="money">' . $item['price'] . '</span></p>
|
|
|
</div>
|
...
|
...
|
@@ -91,11 +91,12 @@ class GoodsController extends HomeBaseController |
|
|
return Db::name('zj_category')->field('id,name')->where(['cid' => $cid])->select()->toArray();
|
|
|
}
|
|
|
|
|
|
public function getGoodsComment($gid) {
|
|
|
public function getGoodsComment($gid)
|
|
|
{
|
|
|
return Db::name('zj_evaluate')->alias('e')
|
|
|
->field('u.user_nickname,avatar,e.content,e.create_time')
|
|
|
->join('user u', 'u.id=e.uid')
|
|
|
->where(['gid'=>$gid])
|
|
|
->where(['gid' => $gid])
|
|
|
->order('create_time DESC')
|
|
|
->select()
|
|
|
->toArray();
|
...
|
...
|
|