管理端CP等级

This commit is contained in:
2025-11-19 14:57:30 +08:00
parent 8239615cb6
commit 658257bc0a

View File

@@ -135,8 +135,8 @@ class GiveGift extends Model
$give_gift = 0; $give_gift = 0;
$gift_user_data = []; $gift_user_data = [];
$cp_type = 0; $cp_type = 0;
$text = ''; $textt = '';
$text1 = ''; $textt1 = '';
foreach ($toarray as $k => $to_id){ foreach ($toarray as $k => $to_id){
$gift_user_data[]['user_id'] = $to_id; $gift_user_data[]['user_id'] = $to_id;
$gift_box1 = []; $gift_box1 = [];
@@ -524,12 +524,12 @@ class GiveGift extends Model
//cp检测且处理升级事宜 //cp检测且处理升级事宜
$cp_type = model('api/UserCp')->checkGift($uid, $gid, $to_id, $from_id);//0-不处理1-表明心意2-组成Cp $cp_type = model('api/UserCp')->checkGift($uid, $gid, $to_id, $from_id);//0-不处理1-表明心意2-组成Cp
if($cp_type == 1){ if($cp_type == 1){
$text1 = "亲爱的用户,您好!\n".$FromUserInfo['nickname'] . ' 的 【' .$gift_info['gift_name'].' 】 已送达,这是他的心动信号。回赠一个,即可锁定这份缘分!'; $textt1 = "亲爱的用户,您好!\n".$FromUserInfo['nickname'] . ' 的 【' .$gift_info['gift_name'].' 】 已送达,这是他的心动信号。回赠一个,即可锁定这份缘分!';
$text = ''; $textt = '';
}elseif ($cp_type == 2){ }elseif ($cp_type == 2){
//接受方弹起的 信息 //接受方弹起的 信息
$text1 = "恭喜你!". $FromUserInfo['nickname'] ."也向您回赠了【" .$gift_info['gift_name']."】,并接受了你的心动信号。\n从现在起你们正式成为彼此的专属CP共同开启一段甜蜜的旅程。\n【心动空间】已为你们敞开大门这里将记录你们在一起的点滴见证所有心动与陪伴。快去心动空间开启你们的CP升级之旅吧"; $textt1 = "恭喜你!". $FromUserInfo['nickname'] ."也向您回赠了【" .$gift_info['gift_name']."】,并接受了你的心动信号。\n从现在起你们正式成为彼此的专属CP共同开启一段甜蜜的旅程。\n【心动空间】已为你们敞开大门这里将记录你们在一起的点滴见证所有心动与陪伴。快去心动空间开启你们的CP升级之旅吧";
$text = '【心动空间】已为你们敞开大门这里将记录你们在一起的点滴见证所有心动与陪伴。快去心动空间开启你们的CP升级之旅吧';//发送方弹起的信息 $textt = '【心动空间】已为你们敞开大门这里将记录你们在一起的点滴见证所有心动与陪伴。快去心动空间开启你们的CP升级之旅吧';//发送方弹起的信息
} }
} }
@@ -556,7 +556,7 @@ class GiveGift extends Model
} }
Db::commit(); Db::commit();
return ['code' => 1, 'msg' => '送礼成功', 'data' => ['gift_total' => $gift_total,'gift_user_data' =>$gift_user_data,'cp_type' => ['cp_type' => $cp_type,'text' => $text,'text1' => $text1,'gift_id' => $gid]]]; return ['code' => 1, 'msg' => '送礼成功', 'data' => ['gift_total' => $gift_total,'gift_user_data' =>$gift_user_data,'cp_type' => ['cp_type' => $cp_type,'text' => $textt,'text1' => $textt1,'gift_id' => $gid]]];
} }
/* /*