浏览代码

文字聊天扣费修改

lizhen_gitee 3 年之前
父节点
当前提交
23032ad5f8
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      application/api/controller/Usercenter.php

+ 2 - 1
application/api/controller/Usercenter.php

@@ -386,7 +386,8 @@ class Usercenter extends Api
         }
 
         //扣费
-        if($price > 0 && $this->auth->gender == 1){
+        //男的,或 未实名认证的女的 都要扣费
+        if($price > 0 && (($this->auth->gender == 1) || ($this->auth->gender == 0 && $this->auth->idcard_status != 1))){
             $rs = model('wallet')->lockChangeAccountRemain($this->auth->id,'gold',-$price,13,'','user_match_typing_log',$log_id);
             if($rs['status'] === false){
                 Db::rollback();