Browse Source

fix:默认头像问题

super-yimizi 2 tháng trước cách đây
mục cha
commit
8576815859
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      application/common/Service/Goods/CommentService.php

+ 3 - 1
application/common/Service/Goods/CommentService.php

@@ -123,7 +123,9 @@ class CommentService
             ->order('id desc')
             ->find();
         if (!empty($comment)) {
-            $comment->user->avatar = cdnurl($comment->user->avatar, true);
+            if(!empty($comment->user->avatar)){
+                $comment->user->avatar = cdnurl($comment->user->avatar, true);
+            }
         }
         return [
             'total' => $total,