修复:当前用户未设性别时求婚按钮静默消失的问题
根因:lkddi 的 sex=0(未设置),mySex 为空字符串, 导致 && mySex 判断为 false,求婚按钮被隐藏无任何提示。 修复: 1. 将 lkddi.sex 更新为 1(男) 2. 新增「未设置性别」提示块: - 当前用户未设性别 + 对方有性别 + 对方未婚 时显示 - 灰色虚线样式,hover 提示「请到个人资料页设置性别后即可求婚」 - 不再静默隐藏,避免用户困惑
This commit is contained in:
@@ -723,6 +723,19 @@
|
||||
💍 求婚
|
||||
</button>
|
||||
|
||||
{{-- 自己未设置性别时的提示(让用户去完善资料) --}}
|
||||
<div x-show="!marriageLoading
|
||||
&& (!targetMarriage || targetMarriage.status === 'none')
|
||||
&& userInfo.sex
|
||||
&& !mySex
|
||||
&& userInfo.sex !== mySex"
|
||||
style="flex:1; display:flex; align-items:center; justify-content:center;
|
||||
padding:7px 10px; border-radius:5px; font-size:11px;
|
||||
background:#f8fafc; border:1px dashed #cbd5e1; color:#94a3b8; font-weight:bold; cursor:default;"
|
||||
title="请到个人资料页设置您的性别后即可求婚">
|
||||
💍 请先设置性别
|
||||
</div>
|
||||
|
||||
{{-- 对方已婚时显示提示 --}}
|
||||
<div x-show="!marriageLoading && targetMarriage && targetMarriage.status === 'married'"
|
||||
style="flex:1; display:flex; align-items:center; justify-content:center;
|
||||
|
||||
Reference in New Issue
Block a user