修复:求婚限制异性(前端隐藏按钮 + 后端拦截校验)
前端(user-actions.blade.php): - 求婚按钮增加三重条件:对方未婚 + 双方性别均已填写 + 性别不同 后端(MarriageService::propose): - 增加异性校验:两方性别必须为「男/女」且不同 - 报错:只有男女双方才能互相求婚 frame.blade.php: - chatContext 注入 userSex(当前用户性别)供前端判断
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
roomId: {{ $room->id }},
|
||||
userId: {{ $user->id }},
|
||||
username: "{{ $user->username }}",
|
||||
userSex: "{{ $user->sex }}",
|
||||
userLevel: {{ $user->user_level }},
|
||||
superLevel: {{ $superLevel }},
|
||||
levelKick: {{ $levelKick }},
|
||||
|
||||
Reference in New Issue
Block a user