From 912107cb1a2e5343ef1a4cf96096cff3d9a5cc31 Mon Sep 17 00:00:00 2001
From: wurong <1667629529@qq.com>
Date: Tue, 23 Apr 2019 17:38:58 +0800
Subject: [PATCH] fix text and ignore modify
---
.gitignore | 1 +
app/web/controller/Community.php | 8 +++++++-
app/web/view/pc/community/send_support_message.html | 7 +++++++
3 files changed, 15 insertions(+), 1 deletion(-)
create mode 100644 app/web/view/pc/community/send_support_message.html
diff --git a/.gitignore b/.gitignore
index f78da73..91c4ae6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
/runtime
+/public/upload/users/head/[0-9]*[0-9]/**
diff --git a/app/web/controller/Community.php b/app/web/controller/Community.php
index 2479202..4a5f5f5 100644
--- a/app/web/controller/Community.php
+++ b/app/web/controller/Community.php
@@ -120,7 +120,13 @@ class Community extends Base {
if($from==$to) return ;
$data['user_id']=$to;
$data['status']=1;
- $data['content']='系统消息:用户'.$from.'赞了你的文章';
+
+ $info = db('topic')->find($tid);
+ if(empty($info))
+ return;
+ $this->assign('from', $from);
+ $this->assign('title', $info['title']);
+ $data['content']=$this->fetch("send_support_message");
$data['time']=time();
db('message')->insert($data);
}
diff --git a/app/web/view/pc/community/send_support_message.html b/app/web/view/pc/community/send_support_message.html
new file mode 100644
index 0000000..ed1c740
--- /dev/null
+++ b/app/web/view/pc/community/send_support_message.html
@@ -0,0 +1,7 @@
+系统消息:用户
+
+ {$from}
+赞了
+
+ {$title}这篇文章
+
\ No newline at end of file
--
Gitee