Pārlūkot izejas kodu

动态互动通知

lizhen 2 dienas atpakaļ
vecāks
revīzija
bcdd1ce204

+ 2 - 0
application/api/controller/Message.php

@@ -29,6 +29,8 @@ class Message extends Api
                 $dongtai_image = explode(',',$value['images']);
                 $value['dongtai_image'] = isset($dongtai_image[0]) ? localpath_to_netpath($dongtai_image[0]) : '';
 
+                $value['avatar'] = localpath_to_netpath($value['avatar']);
+
                 if($value['infotype'] == 'dongtai_answer'){
                     $value['content'] = Db::name('topic_dongtai_answer')->where('id',$value['infotype_id'])->value('content');
                 }

+ 1 - 1
application/api/controller/Topicdongtai.php

@@ -318,7 +318,7 @@ class Topicdongtai extends Api
             $infotype_id = $answer_info['id'];
         }
 
-        if($msg_content != $this->auth->id){
+        if($topic_dongtai['user_id'] != $this->auth->id){
             $msg_id = \app\common\model\Message::addMessage($id,$topic_dongtai['user_id'],$msg_user_id,$this->auth->id,$msg_title,$msg_content,'dongtai_answer',$infotype_id);
         }