cp 等级升级 装扮挂件和特效修改
This commit is contained in:
@@ -248,20 +248,23 @@ class UserCp extends Model
|
||||
|
||||
//添加一个记录
|
||||
$pendant = db::name('vs_decorate_price')->where('id',$level['pendant_id'])->field('did,day')->find();
|
||||
$pendant_title = '装扮-'.$pendant['day'].'天-'.db::name('vs_decorate')->where('did',$pendant['did'])->value('title');
|
||||
$datas = [
|
||||
'room_id' => $room_id,
|
||||
'from_user_id' => $from_user_id,
|
||||
'to_user_id' => $to_user_id,
|
||||
'gift_id' => 0,
|
||||
'num' => 0,
|
||||
'cp_zone_id' => $cp_zone_id,
|
||||
'exp' => 0,
|
||||
'exp_total' => 0,
|
||||
'remark' => '我们等级达到了'.$level['level'].'级,获得奖励'.$pendant_title,
|
||||
'createtime' => time(),
|
||||
];
|
||||
Db::name('user_cp_gift_log')->insert($datas);
|
||||
if($pendant){
|
||||
$pendant_title = '装扮-'.$pendant['day'].'天-'.db::name('vs_decorate')->where('did',$pendant['did'])->value('title');
|
||||
$datas = [
|
||||
'room_id' => $room_id,
|
||||
'from_user_id' => $from_user_id,
|
||||
'to_user_id' => $to_user_id,
|
||||
'gift_id' => 0,
|
||||
'num' => 0,
|
||||
'cp_zone_id' => $cp_zone_id,
|
||||
'exp' => 0,
|
||||
'exp_total' => 0,
|
||||
'remark' => '我们等级达到了'.$level['level'].'级,获得奖励'.$pendant_title,
|
||||
'createtime' => time(),
|
||||
];
|
||||
Db::name('user_cp_gift_log')->insert($datas);
|
||||
}
|
||||
|
||||
}
|
||||
$data['exp'] = $yuan_exp + $exp;
|
||||
Db::name('user_cp_zone')->where(['id' => $cp_zone_id])->update($data);
|
||||
|
||||
Reference in New Issue
Block a user