Przeglądaj źródła

更多增加亲密度的方式

lizhen_gitee 1 rok temu
rodzic
commit
4f462d2fa3
1 zmienionych plików z 18 dodań i 0 usunięć
  1. 18 0
      application/api/controller/Match.php

+ 18 - 0
application/api/controller/Match.php

@@ -185,6 +185,12 @@ class Match extends Api
             $res_wealth = \app\common\model\User::add_wealth_level($this->auth->id,$price);
             //增加获赠用户的魅力等级
             $res_wealth = \app\common\model\User::add_charm_level($to_user_id,$price);
+            //增加亲密度
+            if ($this->auth->id > $to_user_id) { //大的在后
+                \app\common\model\User::add_intimacy($to_user_id,$this->auth->id,$price);
+            } else { //小的在前
+                \app\common\model\User::add_intimacy($this->auth->id,$to_user_id,$price);
+            }
         }
 
         //tag任务赠送金币
@@ -339,6 +345,12 @@ class Match extends Api
             $res_wealth = \app\common\model\User::add_wealth_level($this->auth->id,$price);
             //增加获赠用户的魅力等级
             $res_wealth = \app\common\model\User::add_charm_level($to_user_id,$price);
+            //增加亲密度
+            if ($this->auth->id > $to_user_id) { //大的在后
+                \app\common\model\User::add_intimacy($to_user_id,$this->auth->id,$price);
+            } else { //小的在前
+                \app\common\model\User::add_intimacy($this->auth->id,$to_user_id,$price);
+            }
         }
 
         //tag任务赠送金币
@@ -469,6 +481,12 @@ class Match extends Api
             $res_wealth = \app\common\model\User::add_wealth_level($this->auth->id,$price);
             //增加获赠用户的魅力等级
             $res_wealth = \app\common\model\User::add_charm_level($to_user_id,$price);
+            //增加亲密度
+            if ($this->auth->id > $to_user_id) { //大的在后
+                \app\common\model\User::add_intimacy($to_user_id,$this->auth->id,$price);
+            } else { //小的在前
+                \app\common\model\User::add_intimacy($this->auth->id,$to_user_id,$price);
+            }
         }
 
         Db::commit();