+
-
-

- {{ detailsInfo["viewnum"] || 0 }}
+
+

+

+ {{ detailsInfo.likenum || "赞" }}
@@ -244,7 +249,7 @@
-
+
@@ -943,6 +948,10 @@ export default {
let isNeedLogin = ref(true) // 是否需要有登录
provide("isNeedLogin", isNeedLogin)
+ let emojiMaskState = ref(false)
+
+ provide("emojiMaskState", emojiMaskState)
+
// 跳转登录
const goLogin = () => {
if (typeof window === "undefined") return
@@ -1300,7 +1309,7 @@ export default {
return
}
let data = res.data
- console.log("data", data)
+ // console.log("data", data)
data["info"]["uniqid"] = uniqid
detailsInfo.value = data["info"] || {}
@@ -1375,6 +1384,8 @@ export default {
}
})
+ // console.log("valve", valve)
+
if (!valve) {
let content = ""
if (info?.["content"]?.indexOf("
![]()
{
+ const operateLike = () => {
if (isNeedLogin.value) {
goLogin()
return
}
- $ajax("/api/operate/like", { token }).then(res => {
+ $ajax("/api/operate/like", { token: detailsToken }).then(res => {
if (res.code != 200) return
let data = res.data
- answerList.value[index]["islike"] = data["status"]
- answerList.value[index]["likenum"] = data["count"]
+ islike.value = data.status || 0
+ detailsInfo.value["likenum"] = data.count || 0
handleMsg("success", res["message"] || "操作成功")
})
}
@@ -2365,6 +2376,8 @@ export default {
}
}
+ provide("handleAnswerText", handleAnswerText)
+
// 大图的监听 esc 键盘按钮
const handleKeydown = event => {
if (event.key !== "Escape") return
@@ -2397,7 +2410,7 @@ export default {
}
// 打开举报
- const handleMenuState = (token) => {
+ const handleMenuState = token => {
reportToken = token
alertShow.value = true
}
@@ -2647,7 +2660,7 @@ export default {
watch(initState, (newValue, oldValue) => {
if (newValue === 2) {
const params = route.query
- calculateListIndex(detailsInfo.value, params["uniqid"])
+ // calculateListIndex(detailsInfo.value, params["uniqid"])
}
})
@@ -3082,7 +3095,14 @@ export default {
const commentList = ref([])
- return { isCommentList, commentList, islike, handleLookOnly, zeroreply, replaceNumberObj, closeMyModel, myModelList, myModelState, listHeight, bottomTpsStyle, TAHomePage, sendMessage, avatarState, openUserInfo, isNeedLogin, handleInputYou, openListIAnswer, isListEmptyState, cutYourAnswerAnonymous, handleYourAnswer, yourAnswer, handleLogo, inTheEndState, setItemUrl, seo, originUrl, handleMenuState, reasonList, checkList, alertShow, alertText, selectRadio, alertSubmit, cutType, dialogSrc, answerPage, handleDetailsScroll, replaceState, copyText, boxClass, questionPlaceholderState, yourAnswerPlaceholderState, handleInput, handlePaste, itemStyle, listStyle, listBoxStyle, myType, type, pitchIndex, cut, list, keyword, keywordText, getList, total, typeList, typePitch, getDetails, detailsInfo, detailsIsanswered, detailsIscollection, detailsIsmyself, detailShare, detailLoading, answerList, operateLike, operateCollect, IAnswerState, IAnswerEditState, IAnswerInfo, amendIAnswer, openIAnswer, closeIAnswer, submitAnswer, openCommentState, handleAllComment, myCollectionList, myCollectionCount, myQuestionsList, myQuestionsCount, myAnswerList, myAnswerCount, cutAnswerPopupState, handleDate, handleCollectionScroll, handleAnswersScroll, handleQuestionsScroll, cancelCollection, getMyCollection, questionsSetp, questionsObj, cutAnonymous, cutQuestionsSetp, cutQuestionsPopupState, questionsTypeList, postingIssue, choosingTheme, handleMy, changeAnonymous, changeAnonymousQuestions, pageHeaderHeight, pageListHeight, questionsTransmitState, questionsTransmitMaskState, closeAllTransmitState, closeTransmitState, handleAnswerTransmitList, closeDetailMode, tabListFixeState, handleListScroll, historicalSearchState, historicalSearchList, searchFocus, searchBlur, searchClick, handleClickHistoricalItem, handleClickClear, isSearchMode, questionsInit, myCount, msg, myOpenDetails, handleAnswerText, getCurrentUrl, loading, showComments, jointriposte, randomEmojis, selectEomji, openRespondDetails, respondPopState, respondDetail, respondPopObj, closePopList, coinAmount, openInsert, insertcoinsState, insert, coinMessage, coinSelectAmountDispose, closeInsert, postCoinSbmit, cutOperate, insertcoinsNoState }
+ const commentListRef = ref(null)
+
+ const closeEmojiMask = () => {
+
+ if (commentListRef.value) commentListRef.value.closeEmoji()
+ }
+
+ return { commentListRef, closeEmojiMask, emojiMaskState, isCommentList, commentList, islike, handleLookOnly, zeroreply, replaceNumberObj, closeMyModel, myModelList, myModelState, listHeight, bottomTpsStyle, TAHomePage, sendMessage, avatarState, openUserInfo, isNeedLogin, handleInputYou, openListIAnswer, isListEmptyState, cutYourAnswerAnonymous, handleYourAnswer, yourAnswer, handleLogo, inTheEndState, setItemUrl, seo, originUrl, handleMenuState, reasonList, checkList, alertShow, alertText, selectRadio, alertSubmit, cutType, dialogSrc, answerPage, handleDetailsScroll, replaceState, copyText, boxClass, questionPlaceholderState, yourAnswerPlaceholderState, handleInput, handlePaste, itemStyle, listStyle, listBoxStyle, myType, type, pitchIndex, cut, list, keyword, keywordText, getList, total, typeList, typePitch, getDetails, detailsInfo, detailsIsanswered, detailsIscollection, detailsIsmyself, detailShare, detailLoading, answerList, operateLike, operateCollect, IAnswerState, IAnswerEditState, IAnswerInfo, amendIAnswer, openIAnswer, closeIAnswer, submitAnswer, openCommentState, handleAllComment, myCollectionList, myCollectionCount, myQuestionsList, myQuestionsCount, myAnswerList, myAnswerCount, cutAnswerPopupState, handleDate, handleCollectionScroll, handleAnswersScroll, handleQuestionsScroll, cancelCollection, getMyCollection, questionsSetp, questionsObj, cutAnonymous, cutQuestionsSetp, cutQuestionsPopupState, questionsTypeList, postingIssue, choosingTheme, handleMy, changeAnonymous, changeAnonymousQuestions, pageHeaderHeight, pageListHeight, questionsTransmitState, questionsTransmitMaskState, closeAllTransmitState, closeTransmitState, handleAnswerTransmitList, closeDetailMode, tabListFixeState, handleListScroll, historicalSearchState, historicalSearchList, searchFocus, searchBlur, searchClick, handleClickHistoricalItem, handleClickClear, isSearchMode, questionsInit, myCount, msg, myOpenDetails, handleAnswerText, getCurrentUrl, loading, showComments, jointriposte, randomEmojis, selectEomji, openRespondDetails, respondPopState, respondDetail, respondPopObj, closePopList, coinAmount, openInsert, insertcoinsState, insert, coinMessage, coinSelectAmountDispose, closeInsert, postCoinSbmit, cutOperate, insertcoinsNoState }
},
}
diff --git a/components/commentList.vue b/components/commentList.vue
index 80d7f80..9c45be1 100644
--- a/components/commentList.vue
+++ b/components/commentList.vue
@@ -2,7 +2,7 @@