瀏覽代碼

文字聊天修改收费规则

lizhen_gitee 3 年之前
父節點
當前提交
11b5931e55
共有 1 個文件被更改,包括 10 次插入0 次删除
  1. 10 0
      application/api/controller/Usercenter.php

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

@@ -483,6 +483,11 @@ class Usercenter extends Api
         if($auth_level == $tous_level){
             $price = 0;$money = 0;
         }
+        //特殊处理
+        //实名女发起,男性接收,不扣钱
+        if($this->auth->gender == 0 && $this->auth->real_status == 1 && $to_user_info['gender'] == 1){
+            $price = 0;$money = 0;
+        }
 
         Db::startTrans();
         //记录日志
@@ -505,6 +510,11 @@ class Usercenter extends Api
             Db::commit();
             $this->success('success');
         }
+        //零消费,零收益消费,提前结束,其实这条没必要,下面金钱操作还会过滤一次
+        if($price == 0 && $money == 0){
+            Db::commit();
+            $this->success('success');
+        }
 
         //扣钱uid,收钱uid,收钱free_video
         //分数少扣钱,分数多收益