fix(utils/http.js): 更新开发环境下的miucms_session值
fix(app.vue): 修改realname默认值为1并优化用户信息获取逻辑 fix(pages/index.html/index.vue): 移除调试日志输出 fix(pages/details/[id].vue): 注释掉调试日志 fix(components/DetailsComments.vue): 添加提交评论的日志输出 chore: 更新构建输出文件和依赖
This commit is contained in:
@@ -455,6 +455,8 @@ const realname = inject("realname");
|
||||
|
||||
// 提交回答-评论
|
||||
const submitAnswerComments = (content, index, i) => {
|
||||
console.log("submitAnswerComments",submitAnswerComments);
|
||||
|
||||
if (realname.value == 0 && userInfoWin.value.uin > 0) {
|
||||
openAttest();
|
||||
return;
|
||||
|
||||
@@ -10,11 +10,10 @@
|
||||
</div>
|
||||
|
||||
<div class="empty-box flexcenter" v-loading="true" v-if="(MyPopupState == 'collect' && collectLoading) || (MyPopupState == 'takevote' && takevoteloading) || (MyPopupState == 'publish' && publisloading)"></div>
|
||||
<div class="empty-box flexcenter" v-if="showList.length == 0">
|
||||
<div class="empty-box flexcenter" v-if="(MyPopupState == 'collect' && !collectLoading && collectList.length == 0) || (MyPopupState == 'takevote' && !takevoteloading && takevoteList.length == 0) || (MyPopupState == 'publish' && !publisloading && publishList.length == 0)">
|
||||
<Empty></Empty>
|
||||
</div>
|
||||
<el-scrollbar v-else height="553px">
|
||||
<!-- <el-scrollbar v-else height="40px"> -->
|
||||
<el-scrollbar v-if="showList.length > 0" height="553px">
|
||||
<div class="content" @scroll="handleListScroll">
|
||||
<div class="item flexflex" v-for="(item, index) in showList" :key="item.uniqid" @click="goDetails(item['uniqid'] || item?.data?.uniqid)">
|
||||
<div class="left flexflex">
|
||||
@@ -83,7 +82,7 @@ onMounted(() => {})
|
||||
// 展示的 列表数据
|
||||
let showList = ref([])
|
||||
|
||||
let collectList = []
|
||||
let collectList = ref([])
|
||||
let collectPage = 1
|
||||
let collectLoading = ref(false)
|
||||
let collectCount = ref(0)
|
||||
@@ -91,17 +90,14 @@ let collectCount = ref(0)
|
||||
const getCollect = () => {
|
||||
if (collectPage == 0 || collectLoading.value) return
|
||||
collectLoading.value = true
|
||||
// if (collectPage == 2) return
|
||||
|
||||
MyUserCollectHttp({ page: collectPage })
|
||||
.then(res => {
|
||||
if (res.code != 200) return
|
||||
let data = res.data
|
||||
collectList = collectList.concat(data.data)
|
||||
showList.value = collectList
|
||||
// showList.value = showList.value.concat(data.data)
|
||||
collectList.value = collectList.value.concat(data.data)
|
||||
showList.value = collectList.value
|
||||
|
||||
if (collectList.length < data["count"]) collectPage++
|
||||
if (collectList.value.length < data["count"]) collectPage++
|
||||
else collectPage = 0
|
||||
|
||||
collectCount.value = data["count"]
|
||||
@@ -109,7 +105,7 @@ const getCollect = () => {
|
||||
.finally(() => (collectLoading.value = false))
|
||||
}
|
||||
|
||||
let publishList = []
|
||||
let publishList = ref([])
|
||||
let publisPage = 1
|
||||
let publisloading = ref(false)
|
||||
const getPublish = () => {
|
||||
@@ -120,16 +116,16 @@ const getPublish = () => {
|
||||
.then(res => {
|
||||
if (res.code != 200) return
|
||||
let data = res.data
|
||||
publishList = publishList.concat(data.data)
|
||||
publishList.value = publishList.value.concat(data.data)
|
||||
|
||||
if (publishList.length < data["count"]) publisPage++
|
||||
if (publishList.value.length < data["count"]) publisPage++
|
||||
else publisPage = 0
|
||||
showList.value = publishList
|
||||
showList.value = publishList.value
|
||||
})
|
||||
.finally(() => (publisloading.value = false))
|
||||
}
|
||||
|
||||
let takevoteList = []
|
||||
let takevoteList = ref([])
|
||||
let takevotePage = 1
|
||||
let takevoteloading = ref(false)
|
||||
const getTakevote = () => {
|
||||
@@ -139,10 +135,10 @@ const getTakevote = () => {
|
||||
.then(res => {
|
||||
if (res.code != 200) return
|
||||
let data = res.data
|
||||
takevoteList = takevoteList.concat(data.data)
|
||||
if (takevoteList.length < data["count"]) takevotePage++
|
||||
takevoteList.value = takevoteList.value.concat(data.data)
|
||||
if (takevoteList.value.length < data["count"]) takevotePage++
|
||||
else takevotePage = 0
|
||||
showList.value = takevoteList
|
||||
showList.value = takevoteList.value
|
||||
})
|
||||
.finally(() => (takevoteloading.value = false))
|
||||
}
|
||||
@@ -150,24 +146,24 @@ const getTakevote = () => {
|
||||
// 切换 isEmpty 是否清空收藏数据, 因为不确定用户是否有新收藏
|
||||
const cutMy = (key, isEmpty) => {
|
||||
if (isEmpty) {
|
||||
collectList = []
|
||||
collectList.value = []
|
||||
collectPage = 1
|
||||
collectCount.value = 0
|
||||
|
||||
takevoteList = []
|
||||
takevoteList.value = []
|
||||
takevotePage = 1
|
||||
|
||||
publishList = []
|
||||
publishList.value = []
|
||||
publisPage = 1
|
||||
}
|
||||
|
||||
if (key == "collect" && collectList.length == 0) getCollect()
|
||||
else if (key == "takevote" && takevoteList.length == 0) getTakevote()
|
||||
else if (key == "publish" && publishList.length == 0) getPublish()
|
||||
if (key == "collect" && collectList.value.length == 0) getCollect()
|
||||
else if (key == "takevote" && takevoteList.value.length == 0) getTakevote()
|
||||
else if (key == "publish" && publishList.value.length == 0) getPublish()
|
||||
|
||||
if (key == "collect") showList.value = collectList
|
||||
else if (key == "takevote") showList.value = takevoteList
|
||||
else if (key == "publish") showList.value = publishList
|
||||
if (key == "collect") showList.value = collectList.value
|
||||
else if (key == "takevote") showList.value = takevoteList.value
|
||||
else if (key == "publish") showList.value = publishList.value
|
||||
|
||||
MyPopupState.value = key
|
||||
|
||||
@@ -176,19 +172,19 @@ const cutMy = (key, isEmpty) => {
|
||||
|
||||
// 打开匿名弹窗
|
||||
const openAnonymousState = index => {
|
||||
publishList.forEach(element => {
|
||||
publishList.value.forEach(element => {
|
||||
element["anonymousState"] = false
|
||||
})
|
||||
publishList[index]["anonymousState"] = true
|
||||
showList.value = [...publishList]
|
||||
publishList.value[index]["anonymousState"] = true
|
||||
showList.value = [...publishList.value]
|
||||
}
|
||||
|
||||
// 关闭全部匿名弹窗
|
||||
const closeAllAnonymousState = () => {
|
||||
publishList.forEach(element => {
|
||||
publishList.value.forEach(element => {
|
||||
element["anonymousState"] = false
|
||||
})
|
||||
showList.value = [...publishList]
|
||||
showList.value = [...publishList.value]
|
||||
}
|
||||
|
||||
const refreshDataOnly = inject("refreshDataOnly")
|
||||
@@ -200,10 +196,10 @@ const handleAnonymousState = (token, index, anonymous) => {
|
||||
return
|
||||
}
|
||||
|
||||
publishList[index]["anonymous"] = anonymous
|
||||
showList.value = [...publishList]
|
||||
publishList.value[index]["anonymous"] = anonymous
|
||||
showList.value = [...publishList.value]
|
||||
closeAllAnonymousState()
|
||||
const uniqid = publishList[index]["uniqid"]
|
||||
const uniqid = publishList.value[index]["uniqid"]
|
||||
if (route.name == "details-id" && route.params.id == uniqid) {
|
||||
refreshDataOnly()
|
||||
}
|
||||
@@ -261,10 +257,10 @@ const cancelCollection = (token, index, uniqid) => {
|
||||
return
|
||||
}
|
||||
|
||||
collectList.splice(index, 1)
|
||||
collectList.value.splice(index, 1)
|
||||
count.value.collect--
|
||||
collectCount.value--
|
||||
showList.value = [...collectList]
|
||||
showList.value = [...collectList.value]
|
||||
|
||||
if (id == uniqid) unbookmarkSamePage()
|
||||
})
|
||||
@@ -290,8 +286,8 @@ const deleteVote = () => {
|
||||
}
|
||||
|
||||
count.value.publish--
|
||||
publishList.splice(deleteobj["index"], 1)
|
||||
showList.value = [...publishList]
|
||||
publishList.value.splice(deleteobj["index"], 1)
|
||||
showList.value = [...publishList.value]
|
||||
|
||||
if (id == deleteobj["uniqid"]) unbookmark()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user