no message
This commit is contained in:
parent
b91bbd90fc
commit
9ffc19ed65
@ -1536,7 +1536,6 @@ header.page-header .box .tab-list .item.pitch::after {
|
||||
margin-right: 12px;
|
||||
}
|
||||
#answer-app .i-answer-box .question-middle .question-textarea {
|
||||
height: 412px;
|
||||
width: 100%;
|
||||
border: none;
|
||||
outline: none;
|
||||
|
@ -1968,7 +1968,7 @@ header.page-header .box .tab-list .item.pitch::after {
|
||||
}
|
||||
|
||||
.question-textarea {
|
||||
height: 412px;
|
||||
// height: 412px;
|
||||
width: 100%;
|
||||
border: none;
|
||||
outline: none;
|
||||
|
10
index.html
10
index.html
@ -71,7 +71,7 @@
|
||||
</div>
|
||||
<div class="answer ellipsis" v-html="item['content']"></div>
|
||||
<div class="bottom flexacenter">
|
||||
<div class="quantity">{{ item['answers'] == 0 ? '暂无回答' : `共${ item['answers'] }个回答` }}</div>
|
||||
<div class="quantity">{{ item['answers'] == 0 ? '暂无回答' : '共' + item['answers'] + '个回答' }}</div>
|
||||
<template v-if="type=='list'">
|
||||
<div class="longString"></div>
|
||||
<div class="answer-btn" @click.stop="getDetails(item['uniqid'],index,true)">我来回答</div>
|
||||
@ -402,7 +402,7 @@
|
||||
<div class="icon q flexcenter">Q</div>
|
||||
<div class="centre flexflex flex1">
|
||||
<div class="title ellipsis">{{ item['data']['title'] }}</div>
|
||||
<div class="text ellipsis">{{ item['data']['answers'] > 0 ? `共${ item['data']['answers'] }个回答` : '暂无回答'}}</div>
|
||||
<div class="text ellipsis">{{ item['data']['answers'] > 0 ? '共' + item['data']['answers'] + '个回答' : '暂无回答'}}</div>
|
||||
</div>
|
||||
<div class="delete-box flexacenter">
|
||||
<img class="delete-icon" @click.stop="cancelCollection(item['token'],index)" src="./img/delete-icon.svg">
|
||||
@ -456,7 +456,7 @@
|
||||
<div class="new-answer flexacenter" v-if="item['authornewnum'] > 0">有{{ item['authornewnum'] }}个新回答 <div class="long-string"></div>
|
||||
</div>
|
||||
|
||||
{{ item['answers'] == 0 ? '暂无回答' : `共${item['answers']}个回答`}}
|
||||
{{ item['answers'] == 0 ? '暂无回答' : '共' + item['answers'] + '个回答'}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="operate-box flexacenter">
|
||||
@ -503,7 +503,7 @@
|
||||
<textarea v-model="questionsObj.title" placeholder="一句话描述问题,以问号结尾"></textarea>
|
||||
<!-- <input class="" v-model="questionsObj.title" placeholder="一句话描述问题,以问号结尾" /> -->
|
||||
</div>
|
||||
<textarea class="issue-replenish" v-model="questionsObj.content" placeholder="欢迎对问题补充说明,清晰表达问题的关键点,可获得更有效的解答(非必填)"></textarea>
|
||||
<textarea class="issue-replenish" v-model="questionsObj.content" placeholder="欢迎补充,清晰表达问题的关键点,可获得更有效的解答(非必填;请正确填写,发布后将不能修改)"></textarea>
|
||||
<div class="issue-bottom flexacenter">
|
||||
<div class="option-box flexacenter" @click="cutAnonymous">
|
||||
<img class="option-icon" v-if="questionsObj.anonymous == 0" src="./img/tick-no.svg">
|
||||
@ -562,7 +562,6 @@
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 提示框 -->
|
||||
<transition name="msg" appear v-show="msg['state']">
|
||||
<!-- <div :class="['box-item', boxClass]" v-if="" :style="{top: info.top + 'px'}"> -->
|
||||
@ -612,7 +611,6 @@
|
||||
<script src="./js/axios.min.js"></script>
|
||||
<script src="./js/index.js"></script>
|
||||
<script src="https://app.gter.net/bottom?tpl=footer"></script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
45
js/index.js
45
js/index.js
@ -19,6 +19,7 @@ const forumApp = Vue.createApp({
|
||||
|
||||
})
|
||||
|
||||
|
||||
onUnmounted(() => {
|
||||
window.removeEventListener('keydown', handleKeydown)
|
||||
window.removeEventListener('scroll', handleScroll);
|
||||
@ -174,7 +175,9 @@ const forumApp = Vue.createApp({
|
||||
|
||||
keywordText.value = keyword.value || ''
|
||||
|
||||
page++
|
||||
// page++
|
||||
if (list.value.length != data['count']) page++
|
||||
else page = 0
|
||||
|
||||
if (keyword.value) isSearchMode.value = true
|
||||
else isSearchMode.value = false
|
||||
@ -193,8 +196,6 @@ const forumApp = Vue.createApp({
|
||||
let data = res.data
|
||||
typeList.value = data
|
||||
|
||||
console.log("data", data);
|
||||
|
||||
getPageHeight()
|
||||
})
|
||||
}
|
||||
@ -223,7 +224,8 @@ const forumApp = Vue.createApp({
|
||||
if (detailLoading.value) return
|
||||
detailLoading.value = true
|
||||
|
||||
// uniqid = "fubm5CnD05qj" // 标记一下 8yr1m1fOH5CS
|
||||
uniqid = "fubm5CnD05qj" // 标记一下 8yr1m1fOH5CS
|
||||
|
||||
detailsInfo.value = {}
|
||||
answerList.value = []
|
||||
answerPage.value = 0
|
||||
@ -350,13 +352,6 @@ const forumApp = Vue.createApp({
|
||||
})
|
||||
}
|
||||
|
||||
// 操作 - 回答
|
||||
const operateIAnswer = (token = detailsToken, index) => {
|
||||
$ajax("/api/publish/answerSubmit", { token }).then(res => {
|
||||
console.log("res", res);
|
||||
})
|
||||
}
|
||||
|
||||
let IAnswerState = ref(false) // 我来回答-弹窗的状态
|
||||
let IAnswerEditState = ref(false) // 编辑回答-弹窗的状态
|
||||
|
||||
@ -471,9 +466,9 @@ const forumApp = Vue.createApp({
|
||||
if (res.code != 200) return
|
||||
let data = res.data
|
||||
let slice3 = data.data.slice(3)
|
||||
console.log(answerList.value[index]['commentList'], "commentList");
|
||||
let merged = [...answerList.value[index]['commentList'], ...slice3.filter(item2 => !answerList.value[index]['commentList'].find(item1 => item1.id == item2.id))];
|
||||
|
||||
answerList.value[index]['commentList'] = answerList.value[index]['commentList'].concat(data.data.slice(3))
|
||||
// answerList.value[index]['commentList'] = answerList.value[index]['commentList'].concat(data.data.slice(3))
|
||||
answerList.value[index]['commentList'] = merged
|
||||
handleMsg('success', res['message'] || '操作成功')
|
||||
})
|
||||
@ -549,6 +544,7 @@ const forumApp = Vue.createApp({
|
||||
|
||||
} else {
|
||||
let targetData = {
|
||||
id: data['commentid'],
|
||||
content,
|
||||
isauthor: 1,
|
||||
islike: 0,
|
||||
@ -557,6 +553,7 @@ const forumApp = Vue.createApp({
|
||||
child: []
|
||||
}
|
||||
targetAnswerList[index]['commentList'].unshift(targetData)
|
||||
targetAnswerList[index]['commentCount']++
|
||||
}
|
||||
|
||||
closeAnswerCommentsChild()
|
||||
@ -565,7 +562,7 @@ const forumApp = Vue.createApp({
|
||||
})
|
||||
}
|
||||
|
||||
// 回答-评论 点赞 operateIAnswer
|
||||
// 回答-评论 点赞
|
||||
const operateAnswerCommentsLike = (token, index, ind, i) => {
|
||||
$ajax("/api/comment/like", {
|
||||
token,
|
||||
@ -591,15 +588,10 @@ const forumApp = Vue.createApp({
|
||||
|
||||
// 打开 回答-评论 的子评论
|
||||
const openAnswerCommentsChild = (index, ind, i) => {
|
||||
console.log("");
|
||||
closeAnswerCommentsChild()
|
||||
|
||||
if (i == null) {
|
||||
answerList.value[index].commentList[ind]['childState'] = true
|
||||
} else {
|
||||
answerList.value[index].commentList[ind]['child'][i]['childState'] = true
|
||||
}
|
||||
|
||||
if (i == null) answerList.value[index].commentList[ind]['childState'] = true
|
||||
else answerList.value[index].commentList[ind]['child'][i]['childState'] = true
|
||||
}
|
||||
|
||||
// 关闭 回答-评论 的子评论
|
||||
@ -807,7 +799,6 @@ const forumApp = Vue.createApp({
|
||||
const handleQuestionsScroll = e => {
|
||||
const el = e.target;
|
||||
// 判断滚动到底部
|
||||
console.log(el.scrollHeight - el.scrollTop >= el.clientHeight + 10);
|
||||
if (el.scrollHeight - el.scrollTop >= el.clientHeight + 10) return
|
||||
getMyQuestions()
|
||||
}
|
||||
@ -864,7 +855,6 @@ const forumApp = Vue.createApp({
|
||||
questionsObj.value['token'] = data['token']
|
||||
|
||||
questionsTypeList.value = data['typeList'] || []
|
||||
console.log("data['typeList']", data['typeList']);
|
||||
cutQuestionsSetp(1)
|
||||
})
|
||||
}
|
||||
@ -1004,7 +994,7 @@ const forumApp = Vue.createApp({
|
||||
emulateJSON: true,
|
||||
withCredentials: true,
|
||||
headers: {
|
||||
authorization: "efd8239b3f9ab533ac59311096738096"
|
||||
authorization: "017189d7d01fa8ccf649f36e82807937" // 头部标记
|
||||
}
|
||||
}).then(function (res) {
|
||||
var data = null
|
||||
@ -1296,6 +1286,11 @@ const forumApp = Vue.createApp({
|
||||
})
|
||||
}
|
||||
|
||||
watch(() => {
|
||||
if (questionsSetp.value || myType.value || IAnswerEditState.value || IAnswerState.value || dialogSrc.value) document.body.style.overflow = 'hidden'
|
||||
else document.body.style.overflow = 'auto'
|
||||
|
||||
})
|
||||
|
||||
return {
|
||||
handleMenuState,
|
||||
@ -1345,7 +1340,6 @@ const forumApp = Vue.createApp({
|
||||
amendIAnswer,
|
||||
openIAnswer,
|
||||
closeIAnswer,
|
||||
operateIAnswer,
|
||||
submitAnswer,
|
||||
openCommentState,
|
||||
submitAnswerComments,
|
||||
@ -1407,5 +1401,4 @@ const forumApp = Vue.createApp({
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
forumApp.mount("#answer-app"); //初始化
|
Loading…
x
Reference in New Issue
Block a user