|
@@ -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();
|