Browse Source

文字聊天,同性不要钱,发起人是优势方不要钱,只剩发起人是劣势方要钱

lizhen_gitee 2 years ago
parent
commit
6f1cc8b22c
1 changed files with 5 additions and 0 deletions
  1. 5 0
      application/api/controller/Usercenter.php

+ 5 - 0
application/api/controller/Usercenter.php

@@ -576,6 +576,10 @@ class Usercenter extends Api
         if($this->auth->gender == 0 && $this->auth->real_status == 1){
             $price = 0;$money = 0;
         }
+        //性别优势的人发起,免费,与上一条有重复交集
+        if($auth_level > $tous_level){
+            $price = 0;$money = 0;
+        }
 
         Db::startTrans();
         //记录日志
@@ -611,6 +615,7 @@ class Usercenter extends Api
             $get_user = $to_user_info['id'];
             $get_user_free = $to_user_info['free_typing'];
         }else{
+            //这种已经没有了
             $kou_user = $to_user_info['id'];
             $get_user = $this->auth->id;
             $get_user_free = $this->auth->free_typing;