This commit is contained in:
rain
2026-07-24 16:04:59 +08:00
parent 58edd3fc45
commit 0e88255852
3 changed files with 14 additions and 16 deletions
+9 -12
View File
@@ -1063,8 +1063,7 @@
return Boolean(
!purchased &&
!isArticlePrePurchased(item) &&
(isArticlePrePurchase(item) ||
(!getArticleId(item) && isPendingPublishArticle(item))),
!getArticleId(item),
);
}
@@ -1880,13 +1879,15 @@
}
// Buy dialog
function requirePurchaseAuth() {
if (ApiClient.getToken()) return true;
CommonUtil.requireAuth(function () {});
return false;
}
function openPrePurchaseDialog(index) {
const item = currentArticleList[index] || {};
if (!ApiClient.getToken()) {
layui.layer.msg("请先登录");
window.location.href = "login.html";
return;
}
if (!requirePurchaseAuth()) return;
currentPurchaseMode = "prepurchase";
currentArticleId = "";
currentPrePurchaseItem = item;
@@ -1903,11 +1904,7 @@
}
function openBuyDialog(articleId) {
if (!ApiClient.getToken()) {
layui.layer.msg("请先登录");
window.location.href = "login.html";
return;
}
if (!requirePurchaseAuth()) return;
currentPurchaseMode = "purchase";
currentPrePurchaseItem = null;
currentArticleId = articleId;
+2 -1
View File
@@ -653,7 +653,8 @@
'" target="_blank"><img src="' +
escapeHtml(article.accountAvatar || article.expertAvatar) +
'" alt="" class="article-item__icon" />' +
(authorName ? '<span class="article-item__author">' + escapeHtml(authorName) + "</span>" : "") +
(authorName ? '<span class="article-item__author">' +
escapeHtml(authorName) + "</span>" : "") +
'<span class="article-item__title">' +
escapeHtml(article.title || "文章标题") +
"</span>" +
+3 -3
View File
@@ -393,9 +393,9 @@ button.cxz-number-wrap {
}
.cxz-data-table td .cxz-number-wrap--open .cxz-number-ball {
width: 22px;
height: 22px;
font-size: 11px;
width: 26px;
height: 26px;
font-size: 13px;
}
.cxz-number-wrap--open .cxz-number-group {