|
|
@ -20,6 +20,7 @@ use app\api\model\Square as squareModel; |
|
|
|
use app\api\model\Squarelike as squarelikeModel; |
|
|
|
use app\api\model\Squarelike as squarelikeModel; |
|
|
|
use app\common\model\UploadFile; |
|
|
|
use app\common\model\UploadFile; |
|
|
|
use app\common\model\Channel; |
|
|
|
use app\common\model\Channel; |
|
|
|
|
|
|
|
use app\api\model\Goods as GoodsModel; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 广场动态 |
|
|
|
* 广场动态 |
|
|
@ -77,6 +78,7 @@ class Square extends Controller |
|
|
|
$like = $modelLike->where(['user_name' => $useInfo['user_id'],'square_id' => $r['square_id']])->find(); |
|
|
|
$like = $modelLike->where(['user_name' => $useInfo['user_id'],'square_id' => $r['square_id']])->find(); |
|
|
|
|
|
|
|
|
|
|
|
$res[$kr]['imgs'] = []; |
|
|
|
$res[$kr]['imgs'] = []; |
|
|
|
|
|
|
|
$res[$kr]['goodsInfo'] = []; |
|
|
|
$list['data'][$kr]['isLike'] = !empty($like) ? true : false; |
|
|
|
$list['data'][$kr]['isLike'] = !empty($like) ? true : false; |
|
|
|
$res[$kr]['avatar_url'] = []; |
|
|
|
$res[$kr]['avatar_url'] = []; |
|
|
|
if ($r['imgs']) { |
|
|
|
if ($r['imgs']) { |
|
|
@ -88,6 +90,11 @@ class Square extends Controller |
|
|
|
$files = UploadFile::getFileList([$user['avatar_id']]); |
|
|
|
$files = UploadFile::getFileList([$user['avatar_id']]); |
|
|
|
$list['data'][$kr]['avatar_url'] = $files ?: null; |
|
|
|
$list['data'][$kr]['avatar_url'] = $files ?: null; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if ($r['goods_id']) { |
|
|
|
|
|
|
|
$modelgoods = new GoodsModel; |
|
|
|
|
|
|
|
$goods = $modelgoods->getDetails2($r['goods_id'])->toArray(); |
|
|
|
|
|
|
|
$res[$kr]['goodsInfo'] = $goods; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return $this->renderSuccess($list); |
|
|
|
return $this->renderSuccess($list); |
|
|
|
} |
|
|
|
} |
|
|
|