Browse Source

亲密度升级,金币除以100

lizhen_gitee 11 months ago
parent
commit
d4d6bb4882
1 changed files with 5 additions and 1 deletions
  1. 5 1
      application/common/model/User.php

+ 5 - 1
application/common/model/User.php

@@ -289,7 +289,11 @@ class User extends Model
     }
     //增加亲密度,顺带升级
     public static function add_intimacy($uid = 0, $other_uid = 0, $value = 0) {
-        if($value <= 0) return false;
+        if($value <= 0) return true;
+
+        $value = bcdiv($value,100,1);
+        if($value <= 0) return true;
+
         //增加亲密度
         $level_remark = ''; //亲密度等级是否变动: 0未变动 >0是亲密度等级
         $user_intimacy_info = Db::name('user_intimacy')->where(['uid' => $uid, 'other_uid' => $other_uid])->find();