迁移婚姻弹窗基础按钮事件绑定
This commit is contained in:
@@ -2029,11 +2029,11 @@ async function generateWechatBindCode() {
|
||||
<div style="display:flex; align-items:center; gap:12px;">
|
||||
<span style="font-size:14px; font-weight:bold;">💍 婚姻系统</span>
|
||||
<div style="display:flex; gap:6px;">
|
||||
<button id="marriage-tabbtn-mine" class="marriage-tab-btn active" onclick="switchMarriageTab('mine')">我的婚姻</button>
|
||||
<button id="marriage-tabbtn-list" class="marriage-tab-btn" onclick="switchMarriageTab('list')">已婚列表</button>
|
||||
<button id="marriage-tabbtn-mine" class="marriage-tab-btn active" data-marriage-tab="mine">我的婚姻</button>
|
||||
<button id="marriage-tabbtn-list" class="marriage-tab-btn" data-marriage-tab="list">已婚列表</button>
|
||||
</div>
|
||||
</div>
|
||||
<span onclick="closeMarriageStatusModal()"
|
||||
<span data-marriage-modal-close
|
||||
style="cursor:pointer; font-size:18px; opacity:.8; line-height:1;">✕</span>
|
||||
</div>
|
||||
|
||||
@@ -2051,9 +2051,9 @@ async function generateWechatBindCode() {
|
||||
<div style="text-align:center; color:#aaa; padding:30px 0; font-size:12px;">加载中…</div>
|
||||
</div>
|
||||
<div id="married-list-pagination" style="padding:10px 16px; border-top:1px solid #fce7f3; display:flex; justify-content:space-between; align-items:center; font-size:11px;">
|
||||
<button onclick="fetchMarriedList(marriedListPage - 1)" id="married-prev-btn" style="border:1px solid #fbcfe8; background:#fff; color:#be185d; padding:2px 8px; border-radius:4px; cursor:pointer;">上一页</button>
|
||||
<button data-marriage-page-delta="-1" id="married-prev-btn" style="border:1px solid #fbcfe8; background:#fff; color:#be185d; padding:2px 8px; border-radius:4px; cursor:pointer;">上一页</button>
|
||||
<span id="married-page-info" style="color:#be185d; font-weight:bold;">1 / 1</span>
|
||||
<button onclick="fetchMarriedList(marriedListPage + 1)" id="married-next-btn" style="border:1px solid #fbcfe8; background:#fff; color:#be185d; padding:2px 8px; border-radius:4px; cursor:pointer;">下一页</button>
|
||||
<button data-marriage-page-delta="1" id="married-next-btn" style="border:1px solid #fbcfe8; background:#fff; color:#be185d; padding:2px 8px; border-radius:4px; cursor:pointer;">下一页</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -2155,12 +2155,12 @@ async function generateWechatBindCode() {
|
||||
return `
|
||||
<div class="married-list-item">
|
||||
<div class="married-couple-info">
|
||||
<div class="married-user-box" style="cursor:pointer;" onclick="openUserCard('${user.username}')">
|
||||
<div class="married-user-box" style="cursor:pointer;" data-marriage-user-card="${user.username}">
|
||||
<img src="${user.headface_url || '/images/headface/1.gif'}" class="married-user-avatar" onerror="this.src='/images/headface/1.gif'">
|
||||
<span class="married-user-name" style="${userColor}" title="${user.username}">${user.username}</span>
|
||||
</div>
|
||||
<div class="married-heart">💖</div>
|
||||
<div class="married-user-box" style="cursor:pointer;" onclick="openUserCard('${partner.username}')">
|
||||
<div class="married-user-box" style="cursor:pointer;" data-marriage-user-card="${partner.username}">
|
||||
<img src="${partner.headface_url || '/images/headface/1.gif'}" class="married-user-avatar" onerror="this.src='/images/headface/1.gif'">
|
||||
<span class="married-user-name" style="${partnerColor}" title="${partner.username}">${partner.username}</span>
|
||||
</div>
|
||||
@@ -2205,7 +2205,7 @@ async function generateWechatBindCode() {
|
||||
</div>
|
||||
</div>`;
|
||||
footer.innerHTML = `
|
||||
<button onclick="closeMarriageStatusModal()"
|
||||
<button data-marriage-modal-close
|
||||
style="flex:1; padding:9px; background:#f3f4f6; color:#555;
|
||||
border:1px solid #d1d5db; border-radius:6px; font-size:13px; cursor:pointer;">
|
||||
关闭
|
||||
@@ -2247,12 +2247,12 @@ async function generateWechatBindCode() {
|
||||
if (!iProposed) {
|
||||
// 被求婚方:可以接受 / 拒绝
|
||||
footer.innerHTML = `
|
||||
<button onclick="marriageAction('${m.id}','reject'); closeMarriageStatusModal();"
|
||||
<button data-marriage-action="reject" data-marriage-id="${m.id}" data-marriage-close-after-action="1"
|
||||
style="flex:1;padding:9px;background:#f3f4f6;color:#555;
|
||||
border:1px solid #d1d5db;border-radius:6px;font-size:13px;cursor:pointer;">
|
||||
😢 婉拒
|
||||
</button>
|
||||
<button onclick="marriageAction('${m.id}','accept'); closeMarriageStatusModal();"
|
||||
<button data-marriage-action="accept" data-marriage-id="${m.id}" data-marriage-close-after-action="1"
|
||||
style="flex:1;padding:9px;background:linear-gradient(135deg,#be185d,#f43f5e);
|
||||
color:#fff;border:none;border-radius:6px;font-size:13px;
|
||||
font-weight:bold;cursor:pointer;">
|
||||
@@ -2260,7 +2260,7 @@ async function generateWechatBindCode() {
|
||||
</button>`;
|
||||
} else {
|
||||
footer.innerHTML = `
|
||||
<button onclick="closeMarriageStatusModal()"
|
||||
<button data-marriage-modal-close
|
||||
style="flex:1;padding:9px;background:#f3f4f6;color:#555;
|
||||
border:1px solid #d1d5db;border-radius:6px;font-size:13px;cursor:pointer;">
|
||||
关闭(等待对方回应)
|
||||
@@ -2304,12 +2304,12 @@ async function generateWechatBindCode() {
|
||||
|
||||
// 已婚底部:离婚入口(需要二次确认)
|
||||
footer.innerHTML = `
|
||||
<button onclick="closeMarriageStatusModal()"
|
||||
<button data-marriage-modal-close
|
||||
style="flex:1;padding:9px;background:#f3f4f6;color:#555;
|
||||
border:1px solid #d1d5db;border-radius:6px;font-size:13px;cursor:pointer;">
|
||||
关闭
|
||||
</button>
|
||||
<button onclick="tryDivorce('${m.id}')"
|
||||
<button data-marriage-divorce="${m.id}"
|
||||
style="flex:.8;padding:9px;border:1px solid #fca5a5;background:#fff;
|
||||
color:#dc2626;border-radius:6px;font-size:12px;cursor:pointer;">
|
||||
💔 申请离婚
|
||||
@@ -2321,7 +2321,7 @@ async function generateWechatBindCode() {
|
||||
body.innerHTML =
|
||||
`<div style="text-align:center;color:#999;padding:30px 0;font-size:12px;">暂无有效婚姻记录</div>`;
|
||||
footer.innerHTML = `
|
||||
<button onclick="closeMarriageStatusModal()"
|
||||
<button data-marriage-modal-close
|
||||
style="flex:1;padding:9px;background:#f3f4f6;color:#555;
|
||||
border:1px solid #d1d5db;border-radius:6px;font-size:13px;cursor:pointer;">关闭</button>`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user