This commit is contained in:
A1300399510 2023-05-22 19:19:28 +08:00
parent 39456715c8
commit bcfaa0b260
5 changed files with 120 additions and 41 deletions

View File

@ -1,18 +1,37 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang=""> <html lang="">
<head>
<meta charset="utf-8"> <head>
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta charset="utf-8">
<meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport"/> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="icon" href="<%= BASE_URL %>/img/favicon.ico"> <meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"
<!-- <title><%= htmlWebpackPlugin.options.title %></title> --> name="viewport" />
<title>寄托论坛</title> <link rel="icon" href="<%= BASE_URL %>/img/favicon.ico">
</head> <!-- <title><%= htmlWebpackPlugin.options.title %></title> -->
<body> <title>寄托论坛</title>
<noscript> </head>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript> <body>
<div id="app"></div> <noscript>
<!-- built files will be auto injected --> <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled.
</body> Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<div style="display:none;">
<script type="text/javascript" src="//v1.cnzz.com/z_stat.php?id=1281224882&amp;web_id=1281224882"></script>
<script type="text/javascript">
var _hmt = _hmt || [];
(function () {
var hm = document.createElement("script");
hm.src = "//hm.baidu.com/hm.js?4bd66cbe45a640b607fe46c48f658746";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
</div>
<!-- 这个统计代码 明天加在H5论坛页面 -->
<!-- built files will be auto injected -->
</body>
</html> </html>

View File

@ -0,0 +1,9 @@
{
"{:1_1:}": "https://bbs.gter.net/static/image/smiley/default/smile.gif",
":(": "https://bbs.gter.net/static/image/smiley/default/frown.gif",
":@": "https://bbs.gter.net/static/image/smiley/default/default.gif",
":O": "https://bbs.gter.net/static/image/smiley/default/shocked.gif",
":p": "https://bbs.gter.net/static/image/smiley/default/frown.gif",
":(": "https://bbs.gter.net/static/image/smiley/default/frown.gif",
":(": "https://bbs.gter.net/static/image/smiley/default/frown.gif"
}

View File

@ -226,7 +226,7 @@
import DetailReply from '@/components/DetailReply' import DetailReply from '@/components/DetailReply'
import Coins from '@/components/unlock/Coins' import Coins from '@/components/unlock/Coins'
import { coinNo } from '@/utils/bizarreUrl' import { coinNo } from '@/utils/bizarreUrl'
import emojiList from '@/assets/emojiList.json'
export default { export default {
name: 'detailIndex', name: 'detailIndex',
data() { data() {
@ -369,6 +369,8 @@ export default {
message: "" message: ""
}, },
isloginBtnState: false,
}; };
@ -390,11 +392,15 @@ export default {
} }
}, },
immediate: true immediate: true
} },
isloginBtnState(newV, oldV) {
if (newV) this.$goTologin()
},
}, },
mounted() { mounted() {
window.scrollTo(0, 0); window.scrollTo(0, 0);
}, },
methods: { methods: {
@ -418,7 +424,8 @@ export default {
}) })
// html // 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 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 replyVisibleHtml = `<div class="flexcenter content-unlock content-unlock-no ${this.islogin ? 'replyVisible' : 'registerVisible'} " @click="setValue('popState', ${this.islogin ? 'discussionSingle' : 'isloginBtnState'})"><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 coinVisibleHtml = `<div class="flexcenter content-unlock content-unlock-no coinVisible"><img class="unlock-icom" src="./img/unlock.png"/>作者设置了投币可见</div>`
// html // html
@ -530,6 +537,18 @@ export default {
this.popState = data.mybalance > price ? "coindisplayuser" : "coinNo" this.popState = data.mybalance > price ? "coindisplayuser" : "coinNo"
}) })
} }
let registerVisibleList = document.getElementsByClassName("registerVisible")
if (!Array.isArray(registerVisibleList)) {
for (let i = 0; i < registerVisibleList.length; i++) {
registerVisibleList[i].addEventListener('click', () => {
this.$emit("registerVisibleClick")
})
}
this.$on('registerVisibleClick', () => {
console.log("fkfkfkf");
this.isloginBtnState = true
})
}
this.info = info this.info = info
this.type = data.type this.type = data.type
@ -665,6 +684,13 @@ export default {
}).then(res => { }).then(res => {
if (res.code != 200) return if (res.code != 200) return
let data = res.data let data = res.data
data.data.forEach(el => {
for (const key in emojiList) {
el.message = el.message.replaceAll(key, `<img class="gif" src="${emojiList[key]}" />`)
}
})
this.postList.list = data.data this.postList.list = data.data
this.postList.page = data.page this.postList.page = data.page
this.postList.limit = data.limit this.postList.limit = data.limit
@ -718,29 +744,42 @@ export default {
pid: this.editCommentPid || (this.twoCommentData && this.twoCommentData.pid) pid: this.editCommentPid || (this.twoCommentData && this.twoCommentData.pid)
}).then(res => { }).then(res => {
if (res.code != 200) return if (res.code != 200) return
this.$Message.success("发布成功")
this.popState = "" this.popState = ""
this.twoCommentData = null this.twoCommentData = null
if (this.editCommentPid) this.$router.go(0) if (this.editCommentPid) { //
setTimeout(() => {
this.$router.go(0)
}, 800);
return
}
this.editCommentPid = null this.editCommentPid = null
let { count, limit } = this.postList let { count, limit } = this.postList
let page = Math.ceil((count + 1) / limit) let page = Math.ceil((count + 1) / limit)
if (page == this.postList.page) { setTimeout(() => {
this.$router.go(0)
return if (page == this.postList.page) {
} this.$router.go(0)
clearTimeout(timer)
return
}
let query = {
page,
tid: this.tid
}
this.$router.push({ path: `/detailIndex`, query })
}, 800);
let query = {
page,
tid: this.tid
}
this.$router.push({ path: `/detailIndex`, query })
}) })
}, },
@ -832,7 +871,6 @@ export default {
components: { components: {
DetailReply, Coins DetailReply, Coins
} }
}; };
</script> </script>
@ -907,7 +945,7 @@ export default {
color: #000; color: #000;
font-size: .56rem; font-size: .56rem;
font-weight: 650; font-weight: 650;
line-height: .56rem; line-height: .86rem;
.detail-title-item { .detail-title-item {
font-size: .32rem; font-size: .32rem;
@ -932,8 +970,8 @@ export default {
padding: 0 .16rem; padding: 0 .16rem;
display: inline-flex; display: inline-flex;
border-radius: .16rem; border-radius: .16rem;
// vertical-align: middle; vertical-align: middle;
vertical-align: top; // vertical-align: top;
} }
} }
@ -1019,6 +1057,10 @@ export default {
img { img {
width: 100% !important; width: 100% !important;
height: auto !important; height: auto !important;
&.gif {
width: auto !important;
}
} }
.quote { .quote {
@ -1027,10 +1069,8 @@ export default {
font-size: .32rem; font-size: .32rem;
border-radius: .16rem; border-radius: .16rem;
background: rgb(246, 246, 246) url(@/assets/img/detail/quotation-left.png) no-repeat .32rem .2666rem; background: rgb(246, 246, 246) url(@/assets/img/detail/quotation-left.png) no-repeat .32rem .2666rem;
padding: .1333rem .1333rem .1333rem 1rem; padding: .1333rem .1333rem .1333rem 1rem;
// padding: .36rem .24rem;
box-sizing: border-box; box-sizing: border-box;
margin-bottom: .48rem; margin-bottom: .48rem;
@ -1444,5 +1484,14 @@ export default {
} }
.loginBtn {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
// background: #50e3c2;
}
} }
</style> </style>

View File

@ -303,7 +303,8 @@ export default {
} }
.setting-container { .setting-container {
position: absolute; // position: absolute;
position: fixed;
bottom: 0; bottom: 0;
left: 0; left: 0;
background-color: #fff; background-color: #fff;

View File

@ -177,10 +177,11 @@ export default {
this.$store.commit('setFavoriteList', []) this.$store.commit('setFavoriteList', [])
this.$store.commit('setHomeRequestState', false) this.$store.commit('setHomeRequestState', false)
this.$clearCookies();
this.$router.push("/")
this.$http.post("/api/user/Logout").then(res => {
this.$clearCookies();
this.$router.push("/")
})