|
@@ -107,7 +107,7 @@ class UserCenter extends Common
|
|
|
* 添加关注
|
|
|
*/
|
|
|
public function addFollows() {
|
|
|
- $user_id = $this->request->request("user_id",0,"intval");// 关注者ID
|
|
|
+ $user_id = $this->request->request("user_id",0,"intval");// 被关注者ID
|
|
|
$type = $this->request->request("type",1);// 类型:1=关注,2=取消关注
|
|
|
if (!$user_id || $user_id<=0) {
|
|
|
$this->error(__('Invalid parameters'));
|
|
@@ -125,6 +125,16 @@ class UserCenter extends Common
|
|
|
}
|
|
|
$data["createtime"] = time();
|
|
|
$id = $fansfollowModel->insertGetId($data);
|
|
|
+
|
|
|
+ //关注通知
|
|
|
+ $msgdata = [
|
|
|
+ 'user_id'=>$user_id,
|
|
|
+ 'title' => '有人刚刚关注了你',
|
|
|
+ 'content'=> '打开[消息][最新关注]即可查看',
|
|
|
+ 'createtime' => time(),
|
|
|
+ ];
|
|
|
+ Db::name('message')->insertGetId($msgdata);
|
|
|
+
|
|
|
if($id > 0) {
|
|
|
// 增加任务进度 +exp
|
|
|
\app\common\model\TaskLog::tofinish($this->auth->id,"ebxLwnXj3L",1);
|
|
@@ -234,7 +244,7 @@ class UserCenter extends Common
|
|
|
|
|
|
/**
|
|
|
* 获取关注列表
|
|
|
- * (个人中心模块)(消息最新关注)
|
|
|
+ * (个人中心模块)(消息-最新关注)
|
|
|
*/
|
|
|
public function getFollowsUser() {
|
|
|
$type = $this->request->request('type',1); // 1=关注,2=粉丝
|
|
@@ -342,7 +352,7 @@ class UserCenter extends Common
|
|
|
* 获取附近的人
|
|
|
* (消息-同城)
|
|
|
*/
|
|
|
- public function samecity(){
|
|
|
+ public function getSamecityList(){
|
|
|
|
|
|
if(!$this->auth->city_id){
|
|
|
$this->success(1,[]);
|