1
This commit is contained in:
+9
-12
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user