|
|
@ -73,7 +73,7 @@ class Square extends Controller |
|
|
|
$user = $model->where(['user_id' => $r['user_name']])->find()->toArray(); |
|
|
|
$user = $model->where(['user_id' => $r['user_name']])->find()->toArray(); |
|
|
|
|
|
|
|
|
|
|
|
$modelLike = new squarelikeModel(); |
|
|
|
$modelLike = new squarelikeModel(); |
|
|
|
$like = $modelLike->where(['user_id' => $r['user_name']])->where(['square_id' => $r['square_id']])->find()->toArray(); |
|
|
|
$like = $modelLike->where(['user_name' => $r['user_name']])->where(['square_id' => $r['square_id']])->find()->toArray(); |
|
|
|
|
|
|
|
|
|
|
|
$res[$kr]['imgs'] = []; |
|
|
|
$res[$kr]['imgs'] = []; |
|
|
|
$res[$kr]['isLike'] = !empty($like) ? true : false; |
|
|
|
$res[$kr]['isLike'] = !empty($like) ? true : false; |
|
|
|