feature/main20240421
郭嘉 9 months ago
parent 39a3a4b46d
commit cdf3ebb91c
  1. 2
      app/api/controller/Square.php

@ -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;

Loading…
Cancel
Save