|
@@ -341,9 +341,17 @@ class Topicdongtai extends Api
|
|
|
}
|
|
|
|
|
|
//系统消息
|
|
|
- /*if($dt_user_id != $this->auth->id){
|
|
|
- $msg_id = \app\common\model\Message::addMessage($dt_user_id,'动态点赞',$this->auth->nickname.'赞了你的动态','dongtai_good',$id);
|
|
|
- }*/
|
|
|
+ if($dt_user_id != $this->auth->id){
|
|
|
+ //入库
|
|
|
+ $data = [];
|
|
|
+ $data['user_id'] = $dt_user_id;
|
|
|
+ $data['dt_id'] = $id;
|
|
|
+ $data['from_user_id'] = $this->auth->id;
|
|
|
+ $data['title'] = '点赞了你的动态';
|
|
|
+ $data['createtime'] = time();
|
|
|
+
|
|
|
+ Db::name('topic_dongtai_message')->insertGetId($data);
|
|
|
+ }
|
|
|
|
|
|
Db::commit();
|
|
|
$this->success('点赞成功');
|
|
@@ -439,7 +447,7 @@ class Topicdongtai extends Api
|
|
|
}
|
|
|
|
|
|
//系统消息
|
|
|
- if($level == 1){
|
|
|
+ /*if($level == 1){
|
|
|
//发给动态用户
|
|
|
$msg_user_id = Db::name('topic_dongtai')->where('id',$id)->value('user_id');
|
|
|
$msg_title = '动态评论';
|
|
@@ -453,7 +461,7 @@ class Topicdongtai extends Api
|
|
|
$msg_content = $this->auth->nickname.'点评了你的动态评论';
|
|
|
$infotype_id = $answer_info['id'];
|
|
|
}
|
|
|
- $msg_id = \app\common\model\Message::addMessage($msg_user_id,$msg_title,$msg_content,'dongtai_answer',$infotype_id);
|
|
|
+ $msg_id = \app\common\model\Message::addMessage($msg_user_id,$msg_title,$msg_content,'dongtai_answer',$infotype_id);*/
|
|
|
|
|
|
Db::commit();
|
|
|
$this->success('评价成功');
|
|
@@ -783,6 +791,16 @@ class Topicdongtai extends Api
|
|
|
$return_data['level_remark'] = isset($user_intimacy_rs) ? $user_intimacy_rs['level_remark'] : ''; //亲密度等级提示语
|
|
|
$this->success('赠送成功', $return_data);
|
|
|
}
|
|
|
+
|
|
|
+ //动态通知
|
|
|
+ public function message(){
|
|
|
+ $list = Db::name('topic_dongtai_message')->alias('msg')->field('msg.*,user.avatar,user.nickname')
|
|
|
+ ->join('user','msg.from_user_id = user.id','LEFT')
|
|
|
+ ->where('msg.user_id',$this->auth->id)->autopage()->select();
|
|
|
+ $list = list_domain_image($list,['avatar']);
|
|
|
+
|
|
|
+ $this->success(1,$list);
|
|
|
+ }
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
//动态收到礼物列表
|