This commit is contained in:
xiaoronghao 2023-04-13 19:12:17 +08:00
parent d5ab2ca459
commit bb952fc553
15 changed files with 239 additions and 190 deletions

View File

@ -73,8 +73,6 @@ export default {
this.$parent.twoCommentData = null
this.$parent.popState = ""
this.$parent.commentContent = ""
},
//
@ -111,7 +109,9 @@ export default {
width: 100vw;
background-color: #fff;
border-radius: .64rem .64rem 0 0;
position: relative;
position: fixed;
bottom: 0;
left: 0;
}
.discussion-single-box {

View File

@ -22,7 +22,7 @@
<div class="head-more-pop" :class="{ animation: headMorePopState }">
<div class="head-more-userinfo flex1 flexacenter">
<div class="head-more-left flexacenter">
<router-link to="/user">
<router-link to="/user" @click.native="headMorePopState = !headMorePopState">
<img class="head-more-userinfo-avatar" :src="userInfo.avatar || './img/defaultAvatar.jpg'" />
</router-link>
@ -103,9 +103,6 @@ export default {
},
components: {
SearchBox,
},
methods: {
//
@ -137,6 +134,14 @@ export default {
this.collapseShow = false;
},
},
destroyed() {
this.$pageMove();
},
components: {
SearchBox,
},
};
</script>

View File

@ -1,13 +1,13 @@
<!-- 板块导航 头部 点击板块后的头部导航 -->
<template>
<div class="path-box">
<router-link class="path-box" :to="path">
<div>论坛</div>
<span class="path-slash">/</span>
<div class="oneEllipsis">{{ stairname }}</div>
<span class="path-slash">/</span>
<div class="oneEllipsis">{{ subsectionsname }}</div>
<router-link v-if="isskip" class="path-box-a" :to="path"></router-link>
</div>
<!-- <router-link v-if="!isskip" class="path-box-a" :to="path"></router-link> -->
</router-link>
</template>
<script>
@ -19,7 +19,7 @@ export default {
path: "/allSections",
};
},
props: ["stairname", "subsectionsname", "isskip"],
props: ["stairname", "subsectionsname"],
mounted() {
},

View File

@ -22,8 +22,9 @@
<div class="search-content flexcolumn" v-if="$store.state.historicalSearch.length != 0">
<div class="search-text">历史搜索</div>
<div class="search-label">
<span v-for="(item, index) in $store.state.historicalSearch" :key="index" @click.stop="toSearchResult(item)">{{ item
}}</span>
<span v-for="(item, index) in $store.state.historicalSearch" :key="index"
@click.stop="toSearchResult(item)">{{ item
}}</span>
</div>
</div>
<!-- 热门搜索 -->
@ -49,12 +50,13 @@ export default {
}
},
props: ["issearch", "hotSearchkeywords"],
mounted() {
if (this.searchText.length > 0) this.showClear = true
else this.showClear = false
},
methods: {
collapseClick() {
if (this.collapseShow == true) this.collapseShow = false;

View File

@ -29,7 +29,7 @@
</div>
<div class="unlockCoin-hint flexacenter" style="font-size: .36rem;">作者设置了阅读限制解锁所有内容仅需 <div
class="unlockCoin-hint-sum">{{ info.price }}</div> 寄托币</div>
<div class="unlockCoin-btn flexcenter" @click="postCoin(defaultcoinnum)">立即解锁
<div class="unlockCoin-btn flexcenter" @click="postCoin()">立即解锁
</div>
<div class="unlockCoin-hint flexcenter">你共有 {{ mybalance }} 个寄托币</div>
</div>
@ -44,14 +44,12 @@ export default {
props: ["popState", "coinConfig", "info", "mybalance"],
data() {
return {
defaultcoinnum: 1
};
},
mounted() {
},
methods: {
@ -59,6 +57,11 @@ export default {
this.$parent.popState = ""
},
//
postCoin() {
this.$parent.postCoin()
}
},
};
@ -69,7 +72,9 @@ export default {
width: 100vw;
background-color: #fff;
border-radius: .64rem .64rem 0 0;
position: relative;
position: fixed;
bottom: 0;
left: 0;
}
.coin-insufficient {

View File

@ -55,7 +55,6 @@ const routes = [
title: "全部版块"
}
},
]
}, {
path: '/searchResult', // 搜索结果

View File

@ -48,8 +48,6 @@ function copy(value, message) {
// 启动加载中
function startupUnderLoading(that) {
// this.
that.loading = that.$loading({
lock: true,
text: '加载中...',
@ -65,6 +63,7 @@ function closeUnderLoading(that) {
// 时间戳
function formattedDate(timestamp) {
if (!timestamp) return
const date = new Date(timestamp * 1000);
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0');

View File

@ -29,6 +29,7 @@ service.interceptors.request.use(config => {
//发请求前做的一些处理数据转化配置请求头设置token,设置loading等根据需求去添加
//注意使用token的时候需要引入cookie方法或者用本地localStorage等方法推荐js-cookie
config['headers']['authorization'] = "qj2q1qk1on0curclipghjtv5ja1g9eq2"
// config['headers']['authorization'] = "661aiz52k5e6vqgmkxnz0wvbv8nciz8h"
return config
}, error => {
Promise.reject(error)

View File

@ -20,7 +20,7 @@
<!-- -->
<div class="card flexcenter">
<div class="card-item shadow" v-if="postList.page == 1">
<div class="card-item shadow">
<div class="card-head flexacenter">
<img class="card-head-icon" :src="info.avatar" />
<div class="card-head-content flex1 flexflex">
@ -28,6 +28,10 @@
<div class="card-head-time">{{ $formattedDate(info.dateline || '') }}</div>
</div>
<div class="card-head-fool">楼主</div>
<a class="edit-box flexcenter" v-if="info.isauthor == 1"
:href="`https://www.gter.net/bbs/post/edit.html?tid=${tid}&pid=${info.pid}`">
<img class="edit-icom" src="@/assets/img/detail/edit.png" />
</a>
</div>
<template v-if="type == 5">
<div class="summary-content">
@ -122,10 +126,7 @@
<template v-else>
<div class="offer-content">
<!-- <div v-html="info.message" style="line-height: normal;" class="vHtmlMessage"></div> -->
<!-- <div style="line-height: normal;" ref="vHtmlMessage" class="vHtmlMessage">{{ info.message }}</div> -->
<div style="line-height: normal;" ref="vHtmlMessage" class="vHtmlMessage"></div>
</div>
</template>
</div>
@ -140,7 +141,6 @@
</div>
<div class="card-head-time">{{ $formattedDate(item.dateline) }}</div>
</div>
<!-- <div class="card-head-fool">{{ `${index + 1 + 1}` }}</div> -->
<div class="card-head-fool" v-if="postList.page == 1">{{ `${(postList.page - 1) * postList.limit +
index + 2}` }}</div>
<div class="card-head-fool" v-else>{{ `${(postList.page - 1) * postList.limit + index + 1}` }}
@ -148,117 +148,10 @@
<div class="edit-box flexcenter" v-if="item.ismyself == 1" @click.stop="openEditPop(item)">
<img class="edit-icom" src="@/assets/img/detail/edit.png" />
</div>
<!-- <div class="card-head-fool">{{ index == 0 ? '楼主' : `${index}` }}</div> -->
</div>
<div class="card-content flex1" @click.stop="handleReplyPop(item)" v-html="item.message"></div>
<template v-if="false">
<div class="card-content flex1">
<!-- 回复引用 -->
<div class="quotation flexflex" v-if="index == 1">
<svg-icon icon-class="quotation-left" class-name="quotation-icon"></svg-icon>
<div class="quotation-right flex1 flexflex">
<div class="quotation-wenzi flex1 three-lines">
这个离开香港是否超过180天应该是居籍的判断而非物理空间变化的判断简单来说只要你在香港纳税你在香港有工作有现金流有房子这个离开香港是否超过180天应该是居籍的判断而非物理空间变化的判断简单来说只要你在香港纳税你在香港有工作有现金流有房子这个离开香港是否超过180天应该是居籍的判断而非物理空间变化的判断简单来说只要你在香港纳税你在香港有工作有现金流有房子
</div>
<div class="quotation-bottom flexacenter">zhangsd 发表于 2022-7-6 14:56
<svg-icon icon-class="quotation-right" class-name="quotation-icon"></svg-icon>
</div>
</div>
</div> 之前申请永久居民参考了不少寄托的帖子和经验现在回馈给大家积攒RP
<!-- 未解锁区域 -->
<div class="flexcenter content-unlock content-unlock-no" v-if="index == 3 || index == 4">
<img class="unlock-icom" src="@/assets/img/detail/unlock.png">
{{ index == 3 ? '作者设置了回复可见' : '' }}
{{ index == 4 ? '作者设置了投币可见' : '' }}
</div>
<!-- 已经解锁区域 -->
<div class="content-unlock content-already" v-if="index == 5 || index == 6">
<div class="content-already-header flexflex">
- 本内容投币可见 -
</div>
<div class="content-unlock-wenzi">
香港身份证件和IANG Visa label
香港购买的保险和MPF的缴费账单
电话账单和当时香港上台的合约文件
</div>
</div>
之前申请永久居民参考了不少寄托的帖子和经验现在回馈给大家积攒RP
之前申请永久居民参考了不少寄托的帖子和经验现在回馈给大家积攒RP
</div>
</template>
</div>
</template>
<template v-if="false">
<div class="card-item shadow" v-for="(item, index) in 7" :key="index">
<div class="card-head flexacenter">
<img class="card-head-icon"
src="https://axure-file.lanhuapp.com/md516b251fb-9cfa-46fc-a9b6-2a41a7b4dc37__3ad73406ff4bc8b138dafc6dcbf1a635.svg" />
<div class="card-head-content flex1 flexflex">
<div class="card-head-name flexflex">闫旭Mike <div class="landlord flexcenter" v-if="index == 0">
楼主
</div>
</div>
<div class="card-head-time">2022-7-6 14:56</div>
</div>
<div class="card-head-fool">{{ index == 0 ? '楼主' : `${index}` }}</div>
</div>
<div class="card-content flex1">
<!-- 回复引用 -->
<div class="quotation flexflex" v-if="index == 1">
<svg-icon icon-class="quotation-left" class-name="quotation-icon"></svg-icon>
<div class="quotation-right flex1 flexflex">
<div class="quotation-wenzi flex1 three-lines">
这个离开香港是否超过180天应该是居籍的判断而非物理空间变化的判断简单来说只要你在香港纳税你在香港有工作有现金流有房子这个离开香港是否超过180天应该是居籍的判断而非物理空间变化的判断简单来说只要你在香港纳税你在香港有工作有现金流有房子这个离开香港是否超过180天应该是居籍的判断而非物理空间变化的判断简单来说只要你在香港纳税你在香港有工作有现金流有房子
</div>
<div class="quotation-bottom flexacenter">zhangsd 发表于 2022-7-6 14:56
<svg-icon icon-class="quotation-right" class-name="quotation-icon"></svg-icon>
</div>
</div>
</div>
之前申请永久居民参考了不少寄托的帖子和经验现在回馈给大家积攒RP
<!-- 未解锁区域 -->
<div class="flexcenter content-unlock content-unlock-no" v-if="index == 3 || index == 4">
<img class="unlock-icom" src="@/assets/img/detail/unlock.png">
{{ index == 3 ? '作者设置了回复可见' : '' }}
{{ index == 4 ? '作者设置了投币可见' : '' }}
</div>
<!-- 已经解锁区域 -->
<div class="content-unlock content-already" v-if="index == 5 || index == 6">
<div class="content-already-header flexflex">
- 本内容投币可见 -
</div>
<div class="content-unlock-wenzi">
香港身份证件和IANG Visa label
香港购买的保险和MPF的缴费账单
电话账单和当时香港上台的合约文件
</div>
</div>
之前申请永久居民参考了不少寄托的帖子和经验现在回馈给大家积攒RP
之前申请永久居民参考了不少寄托的帖子和经验现在回馈给大家积攒RP
</div>
</div>
</template>
@ -331,10 +224,7 @@ export default {
data() {
return {
twoCommentData: null,
// avatar: "https://oss.gter.net/avatar/97KwEWANd_4DHWiY6VbnSUFSCKroYWFjYQ~~/middle",
// content: "",
// },
editCommentPid: null,
editCommentPid: null, // id
popState: "", // discussionSingle discussionMulti
coinConfig: {
strategy: {
@ -464,13 +354,30 @@ export default {
mybalance: 0, //
islogin: false, //
};
},
mounted() {
this.tid = this.$route.query['tid']
this.postList.page = this.$route.query['page'] || 1
this.getDetail()
watch: {
popState(newV, oldV) {
if (newV) this.$pageStop()
else this.$pageMove()
},
"$store.state.user": {
handler(newV, oldV) {
if (JSON.stringify(newV) != "{}") {
this.islogin = newV.uid > 0 ? true : false;
this.tid = this.$route.query['tid']
this.postList.page = this.$route.query['page'] || 1
this.getDetail()
}
},
immediate: true
}
},
mounted() {
window.scrollTo(0, 0);
},
@ -487,7 +394,6 @@ export default {
let data = res.data
let info = data.info
info['message'] = info['message'].trim()
const reg = new RegExp("\r\n", "g")
@ -496,49 +402,97 @@ export default {
return match.replace(/width="[^"]*"/g, '').replace(/height="[^"]*"/g, '');
})
// html
let replyVisibleHtml = `<div class="flexcenter content-unlock content-unlock-no replyVisible" @click="setValue('popState', 'discussionSingle')"><img class="unlock-icom" src="./img/unlock.png"/>作者设置了${this.islogin ? '回复' : '登录'}可见</div>`
let coinVisibleHtml = `<div class="flexcenter content-unlock content-unlock-no coinVisible"><img class="unlock-icom" src="./img/unlock.png"/>作者设置了投币可见</div>`
let ispost = data.info.ispost
let price = data.info.price
// html
let replyVisibleHtmlAlready = `<div class="content-unlock content-already"><div class="content-already-header flexflex">- 本内容投币可见 -</div><div class="content-unlock-wenzi">标记</div></div>`
if (price > 0) {
let ispost = data.info.ispost //
let price = data.info.price //
let isbuy = data.info.isbuy //
let isauthor = data.info.isauthor //
if (price > 0 && isbuy == 0 && isauthor != 1) {
let message = info['message']
if (message.indexOf("[free]") != -1) {
info['message'] = ""
const regex = /\[free\]([^[]+)\[\/free\]/g;
const regex = /\[(free|hide)\]([^[]+)\[\/(free|hide)\]/g;
let result = message.match(regex);
for (let i = 0; i < result.length; i++) {
result[i] = result[i].replace("[free]", "")
result[i] = result[i].replace("[/free]", "")
info['message'] += result[i]
}
info['message'] += `<div class="flexcenter content-unlock content-unlock-no coinVisible" @click="aa()"><img class="unlock-icom" src="./img/unlock.png"/>作者设置了投币可见</div>`
info['message'] += coinVisibleHtml
}
}
if (isbuy == 1 || isauthor == 1) {
let message = info['message']
let mubiao = "" // message
const regex = /\[(free|hide|\/free|\/hide)\]/g;
const numericIndices = Array.from(message.matchAll(regex), match => match.index);
const result2D = [];
for (let i = 0; i < numericIndices.length; i += 2) {
const pair = [numericIndices[i], numericIndices[i + 1]];
result2D.push(pair);
}
result2D.forEach((element, index) => {
mubiao += message.slice(element[0], element[1] + 7)
if (index != 0) {
let temporary = message.slice(result2D[index - 1][1] + 7, element[0])
temporary = this.goEmpty(temporary)
if (temporary) mubiao += replyVisibleHtmlAlready.replace('标记', message.slice(result2D[index - 1][1] + 7, element[0]))
}
//
if (index == 0) {
let temporary = message.slice(0, element[0])
temporary = this.goEmpty(temporary)
if (temporary) mubiao += replyVisibleHtmlAlready.replace('标记', message.slice(0, element[0]))
}
//
if (index == result2D.length - 1) {
let temporary = message.slice(element[1] + 7, message.length - 1)
temporary = this.goEmpty(temporary)
if (temporary) mubiao += replyVisibleHtmlAlready.replace('标记', message.slice(element[1] + 7, message.length - 1))
}
})
mubiao = mubiao.replaceAll('[free]', '')
mubiao = mubiao.replaceAll('[/free]', '')
info['message'] = mubiao
}
if (info['message'].indexOf("[hide]") != -1) {
if (ispost == 0) info['message'] = info['message'].replaceAll("[hide]作者设置了回复可见[/hide]", `<div class="flexcenter content-unlock content-unlock-no replyVisible" @click="setValue('popState', 'discussionSingle')"><img class="unlock-icom" src="./img/unlock.png"/>作者设置了回复可见</div>`)
if (ispost == 1) {
const regex = /\[hide\].*?\[\/hide\]/g; // [hide]
console.log("ispost", ispost, "isauthor", isauthor);
if (ispost == 0 && isauthor != 1) info['message'] = info['message'].replace(regex, replyVisibleHtml);
if (ispost == 1 || isauthor == 1) {
info['message'] = info['message'].replaceAll("[hide]", `<div class="content-unlock content-already"><div class="content-already-header flexflex">- 本内容回复可见 -</div><div class="content-unlock-wenzi">`)
info['message'] = info['message'].replaceAll("[/hide]", `</div></div>`)
}
}
// if (ispost == 1) info['message'] = info['message'].replaceAll("[hide][/hide]", "")
// if (info.message.indexOf("[hide][/hide]")) {
// `<div class="flexcenter content-unlock content-unlock-no"><img class="unlock-icom" src="@/assets/img/detail/unlock.png"></div>`
// }
// info['message'] = this.$sanitize(info['message'])
data.type == 0 ? this.$refs['vHtmlMessage'] ? this.$refs.vHtmlMessage.innerHTML = info['message'] : "" : ""
let replyVisibleList = document.getElementsByClassName("replyVisible")
@ -561,14 +515,10 @@ export default {
})
}
this.$on('coinVisibleClick', () => {
// coinNo coindisplayuser
this.popState = data.mybalance > price ? "coindisplayuser" : "coinNo"
})
}
// console.log(info, "offerinfo", data.type);
this.info = info
this.type = data.type
this.token = data.token
@ -579,21 +529,34 @@ export default {
else if (this.type == 3) this.getTenementDetails()
else if (this.type == 2) this.getInterviewDetails()
// info['ispost'] != 0 ? this.getPostList() : ''
this.getPostList()
info['replies'] != 0 ? this.getPostList() : ''
// this.getPostList()
}).finally(() => {
this.$closeUnderLoading(this)
})
},
//
goEmpty(temporary) {
temporary = temporary.trim()
while (temporary.indexOf('<br/>') != -1) {
temporary = temporary.replace('<br/>', '')
}
return temporary
},
// offer
getOfferDetail() {
this.$http.get("/api/forum/details", {
id: this.token
}, 'offer').then(res => {
let data = res.data
// let offerinfo = data.offerinfo
let offerinfo = data.collegelist[0]
let useperformanceStr = ""
offerinfo.useperformance && offerinfo.useperformance.forEach((el, index) => {
@ -601,7 +564,6 @@ export default {
})
offerinfo['useperformanceStr'] = useperformanceStr
// offerinfo['schoolname'] = offerinfo.school.name
this.offerinfo = offerinfo
})
@ -630,7 +592,6 @@ export default {
})
},
//
getTenementDetails() {
this.$http.post("/tenement/forum/show", {
@ -671,12 +632,10 @@ export default {
//
getInterviewDetails() {
this.$http.post("/InterviewExperience/thread", {
tid: this.tid,
token: this.token
}, "tenement").then(res => {
// console.log(res);
if (res.code != 200) return
let data = res.data
this.info = { ...this.info, ...data }
@ -685,6 +644,8 @@ export default {
//
getPostList() {
this.$startupUnderLoading(this)
let { page, limit } = this.postList
this.$http.post("/api/thread/postList", {
token: this.token,
@ -697,15 +658,20 @@ export default {
this.postList.page = data.page
this.postList.limit = data.limit
this.postList.count = data.count
}).finally(() => {
this.$closeUnderLoading(this)
})
},
//
openEditPop(item) {
console.log(item);
let message = item.message
message = message.replace(/<div[^>]*>[\s\S]*?<\/div>/gi, ''); //
// message = message.replace(/<div[^>]*>[\s\S]*?<\/div>/gi, ''); //
message = message.replace(/<[^>]*>/g, ''); //
// htmlContent.replace(/<[^>]*>/g, '');
// clean_content = re.sub('<.*?>', '', content)
message = message.trim()
this.commentContent = message
this.editCommentPid = item.pid
@ -715,9 +681,15 @@ export default {
//
handleReplyPop(item) {
let message = item.message
// message = message.replace(/<(*?)[^>]*>[\s\S]*?<\/(*?)>/gi, ''); //
message = message.replace(/<[^>]*>/g, ''); //
message = message.trim()
this.twoCommentData = {
avatar: item.avatar,
content: item.message,
content: message,
pid: item.pid
}
this.popState = "discussionSingle"
@ -770,7 +742,12 @@ export default {
tid: this.tid
}
this.$router.push({ path: `/detailIndex`, query })
this.getPostList()
this.$updateURLSearchParams(query)
// this.$router.push({ path: `/detailIndex`, query })
},
//
@ -786,7 +763,7 @@ export default {
this.$http.post(url, { tid: this.tid }).then(res => {
if (res.code != 200) return
if (key == "like") this.info.islike = 1
if (key == "like") this.info.islike = 1, this.info.recommends + 1
if (key == "collect") this.info.isfav = 1
if (key == "uncollect") this.info.isfav = 0
this.$message.success(res.message)
@ -819,6 +796,22 @@ export default {
this.commentContent = item.message
},
postCoin() {
console.log("点击解锁");
this.$http.post("/api/operation/coinPurchase", {
token: this.token
}).then(res => {
if (res.code != 200) return
this.$message.success(res.message)
// return
this.popState = ""
this.$router.go(0)
})
}
},
components: {

View File

@ -22,10 +22,8 @@
</div>
</div>
<div v-else style="margin:.64rem 0;">
<div class="" @click.stop="flybackAll()">
<plate-navigation :stairname="plate.stairname" :subsectionsname="plate.subsectionsname"
:fid="fid"></plate-navigation>
</div>
<plate-navigation @click.native="flybackAll()" :stairname="plate.stairname"
:subsectionsname="plate.subsectionsname" :fid="fid"></plate-navigation>
<div style="margin:.4rem 0.35rem">
@ -70,6 +68,8 @@ export default {
isPlateListState: true, //
favoriteList: [], // id
}
},
@ -78,6 +78,14 @@ export default {
handler(newV, oldV) {
if (!Array.isArray(newV)) return
this.list = newV
if (newV && this.favoriteList.length > 0) this.handleAllCollectList()
},
immediate: true
},
"$store.state.favoriteList": {
handler(newV, oldV) {
this.favoriteList = newV
if (newV && newV.length > 0 && this.list.length > 0) this.handleAllCollectList()
},
immediate: true
}
@ -90,6 +98,7 @@ export default {
let { invitationPage, fid } = this.$route.query
if (fid) this.fid = fid
if (invitationPage) this.invitationPage = Number(invitationPage)
if (Number(fid) > 0) this.handQuery()
@ -98,6 +107,18 @@ export default {
},
methods: {
// 使
handleAllCollectList() {
let favoriteList = this.favoriteList
this.list.forEach(element => {
element.data.forEach(el => {
if (favoriteList.includes(el.fid)) el['iscollection'] = 1
else el['iscollection'] = 0
})
})
this.$forceUpdate()
},
// query
handQuery() {
if (this.list.length >= 2) {

View File

@ -53,7 +53,7 @@
<!-- 路径 -->
<template v-if="fid != 0">
<plate-navigation :isskip="true" :stairname="plate.stairname" :subsectionsname="plate.subsectionsname"></plate-navigation>
<plate-navigation :stairname="plate.stairname" :subsectionsname="plate.subsectionsname"></plate-navigation>
</template>
<!-- 内容区域 -->

View File

@ -4,9 +4,10 @@
<template slot="header-title">寄托天下论坛</template>
</header-nav>
<nav>
<router-link to="/recommend">推荐阅读</router-link>
<router-link to="/collect">收藏的版块</router-link>
<router-link to="/allSections">全部版块</router-link>
<router-link :to="recommendURl" exact>推荐阅读</router-link>
<router-link :to="collect" exact>收藏的版块</router-link>
<router-link :to="allSections" exact>全部版块</router-link>
<!-- <router-link to="/allSections" exact>全部版块</router-link> -->
</nav>
<!-- 发帖子 -->
<div class="publish flexcolumn flexcenter">
@ -25,7 +26,11 @@ export default {
return {
favorite: [], //
recommend: [], //
query: {},
query: { fid: 1125 },
fid: null,
allSections: "/allSections",
collect: "/collect",
recommendURl: "/recommend",
};
},
@ -43,10 +48,19 @@ export default {
this.recommend = recommendList
},
immediate: true
},
'$route': {
handler(to, from) {
let fullPath = to.fullPath
if (fullPath.indexOf('allSections') != -1) this.allSections = fullPath
if (fullPath.indexOf('collect') != -1) this.collect = fullPath
if (fullPath.indexOf('recommend') != -1) this.recommendURl = fullPath
},
immediate: true
}
},
mounted() {
},
components: {
HeaderNav,

View File

@ -6,7 +6,7 @@
@click="hotLabelClick(item.fid)">{{ item.name }}</div>
</div>
<!-- 路径 -->
<plate-navigation isskip="true" v-if="fid != 0" :stairname="plate.stairname"
<plate-navigation v-if="fid != 0" :stairname="plate.stairname"
:subsectionsname="plate.subsectionsname"></plate-navigation>
<section>
<template v-if="list.length != 0 || loading">
@ -65,13 +65,23 @@ export default {
}
},
mounted() {
let query = {}
let { page, fid } = this.$route.query
if (page) this.page = Number(page)
if (page) {
this.page = Number(page)
query['page'] = Number(page)
// this.
}
if (fid) {
this.fid = fid
this.handleForumFid()
query['fid'] = Number(fid)
}
this.$parent['query'] = query
console.log("query", query);
this.init()
},

View File

@ -221,6 +221,7 @@ export default {
.result-box {
justify-content: center;
flex-direction: column;
overflow: auto;
.result-item {
margin-bottom: .32rem;

View File

@ -151,6 +151,7 @@ export default {
this.$http.post("/api/user", "").then(res => {
let data = res.data
this.count = data.count
this.user = data.user
let user = data.user
@ -163,8 +164,6 @@ export default {
// 退
logOut() {
console.log("点击退出登录");
this.user = {
avatar: "",
nickname: "",