From 9045dbf2196ad994f266a8a6feb2f2f7662dd8a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=8D=8E=E6=B8=85?= <18691022700@163.com> Date: Fri, 21 Nov 2025 17:54:02 +0800 Subject: [PATCH] =?UTF-8?q?cp=E8=A3=85=E6=89=AE=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/model/UserCp.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/application/api/model/UserCp.php b/application/api/model/UserCp.php index f025c51..a305a6b 100644 --- a/application/api/model/UserCp.php +++ b/application/api/model/UserCp.php @@ -163,6 +163,17 @@ class UserCp extends Model $insert_data = array_merge(['user_id' => $user_id], $decorate_data); Db::name('vs_user_decorate')->insert($insert_data); } + }else{//把原有的装扮取消掉 + $decorate_data = [ + 'type' => 11, // 装扮类型11-cp装扮 + 'is_using' => 2, // 1-使用中,2-未使用 + 'updatetime' => time(), + ]; + foreach ([$from_user_id, $to_user_id] as $user_id) { + $insert_data = array_merge(['user_id' => $user_id], $decorate_data); + Db::name('vs_user_decorate')->where(['type' => 11])->update($insert_data); + } + } } $data['exp'] = $yuan_exp + $exp;