feat: remove forum feature (Phase 1)

This commit is contained in:
kate522 committed 2026-08-02 20:02:44 +08:00
1 parent f3e4cdd9cf
commit 2bbd7c01a3
173 files changed
+51 -27360

No files matched your search

+4 -41
View File
@@ -367,8 +367,6 @@
}
function payApiBase(apiKind) {
if (apiKind === 'topic') return '/pay/topic/';
if (apiKind === 'plate_follow') return '/pay/plate-follow/';
return '/pay/content/';
}
@@ -448,34 +446,15 @@
window.location.reload();
return;
}
// Content free: reload. Topic/plate free: auto free-order POST (VIP free / free-after-coupon).
if (preview.is_free && preview.pay_type !== 'topic' && preview.pay_type !== 'plate_follow') {
// Content free: reload.
if (preview.is_free) {
window.location.reload();
return;
}
const isPoints = preview.pay_modo === 'points';
const priceType = (preview._price_type || preview.price_type || '');
const apiKind = preview._api_kind
|| (preview.pay_type === 'topic' ? 'topic' : (preview.pay_type === 'plate_follow' ? 'plate_follow' : 'content'));
// Auto-submit free topic/plate orders so user doesn't click through empty cash UI.
if (preview.is_free && (apiKind === 'topic' || apiKind === 'plate_follow') && !isPoints) {
open(
'<h3 class="aksrt-dl-modal__title">' + tt('confirm_buy', '确认购买') + '</h3>' +
'<p class="aksrt-dl-modal__msg">' + tt('processing', '处理中…') + '</p>',
returnFocusEl
);
const freeBtn = document.createElement('button');
freeBtn.type = 'button';
freeBtn.style.display = 'none';
freeBtn.setAttribute('data-price-type', priceType || '');
document.body.appendChild(freeBtn);
const freeCode = String(preview.coupon_code || preview._coupon_code || '');
submitPurchase(preview.post_id, 'cash', 'balance', freeBtn, returnFocusEl, freeCode, apiKind);
try { freeBtn.remove(); } catch (e0) { /* ignore */ }
return;
}
const apiKind = preview._api_kind || 'content';
let amountLabel = escapeHtml(preview.amount_label || '');
let baseLabel = escapeHtml(preview.base_label || '');
@@ -697,22 +676,6 @@
return;
}
const topicBuyBtn = e.target.closest('[data-aksrt-pay-topic]');
if (topicBuyBtn) {
e.preventDefault();
const topicId = parseInt(topicBuyBtn.getAttribute('data-aksrt-pay-topic') || '0', 10);
if (topicId) openCashier(topicId, topicBuyBtn, '', '', 'topic');
return;
}
const plateFollowBuyBtn = e.target.closest('[data-aksrt-pay-plate-follow]');
if (plateFollowBuyBtn) {
e.preventDefault();
const plateId = parseInt(plateFollowBuyBtn.getAttribute('data-aksrt-pay-plate-follow') || '0', 10);
if (plateId) openCashier(plateId, plateFollowBuyBtn, '', '', 'plate_follow');
return;
}
const buyBtn = e.target.closest('[data-action="aksrt-need-purchase"], [data-aksrt-pay-content]');
if (buyBtn) {
e.preventDefault();
@@ -743,7 +706,7 @@
requestDownload(btn);
});
// Bridge for forum-governance plate money cashier.
// Public cashier bridge (content pay).
window.aksrtOpenCashier = function (postId, returnFocusEl, priceType, couponCode, apiKind) {
openCashier(postId, returnFocusEl || null, priceType || '', couponCode || '', apiKind || 'content');
};