Explorar el Código

关注与取关

lizhen_gitee hace 1 año
padre
commit
71d132f21f
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      application/api/controller/Userfollow.php

+ 3 - 1
application/api/controller/Userfollow.php

@@ -151,7 +151,9 @@ class Userfollow extends Api
 
         $check = Db::name('user_follow')->where($map)->find();
         if($check){
-            $this->error('已经关注此人');
+            //取关
+            $rs = Db::name('user_follow')->where($map)->delete();
+            $this->success('操作成功');
         }
 
         Db::startTrans();