no message
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 22 KiB |
BIN
public/img/unlock.png
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
src/assets/img/detail/edit.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
@ -12,11 +12,12 @@
|
|||||||
<div class="discussion-single-box flexflex flex1">
|
<div class="discussion-single-box flexflex flex1">
|
||||||
<div class="discussion-single-content flexacenter flex1">
|
<div class="discussion-single-content flexacenter flex1">
|
||||||
<input class="discussion-single-input flex1" cursor-spacing="5" type="text"
|
<input class="discussion-single-input flex1" cursor-spacing="5" type="text"
|
||||||
:placeholder="twoCommentData ? '写回复…' : '想问啥,大胆问…'" v-model="commentContent" />
|
:placeholder="twoCommentData ? '写回复…' : '想问啥,大胆问…'" :value="commentContent"
|
||||||
|
@input="inputCommentContent($event)" />
|
||||||
<img class="discussion-single-input-icom" @click.stop="setValue()"
|
<img class="discussion-single-input-icom" @click.stop="setValue()"
|
||||||
src="@/assets/img/detail/unfold.png" />
|
src="@/assets/img/detail/unfold.png" />
|
||||||
</div>
|
</div>
|
||||||
<div class="discussion-single-btn flexcenter" @click.stop="postComment(commentContent)">
|
<div class="discussion-single-btn flexcenter" @click.stop="postComment()">
|
||||||
发布
|
发布
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -32,14 +33,14 @@
|
|||||||
<div class="discussion-text one-line">{{ twoCommentData.content }}</div>
|
<div class="discussion-text one-line">{{ twoCommentData.content }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="discussion-multi-content flexflex flex1">
|
<div class="discussion-multi-content flexflex flex1">
|
||||||
<textarea class="discussion-multi-textarea flex1" type="text" maxlength="500" v-model="commentContent"
|
<textarea class="discussion-multi-textarea flex1" type="text" maxlength="500" :value="commentContent"
|
||||||
:placeholder="twoCommentData ? '写回复…' : '想问啥,大胆问…'"></textarea>
|
:placeholder="twoCommentData ? '写回复…' : '想问啥,大胆问…'" @input="inputCommentContent($event)"></textarea>
|
||||||
<img class="discussion-multi-icom" @click.stop="openDiscussionSingle()"
|
<img class="discussion-multi-icom" @click.stop="openDiscussionSingle()"
|
||||||
src="@/assets/img/detail/pack.png" />
|
src="@/assets/img/detail/pack.png" />
|
||||||
<div class="discussion-multi-sum">{{ 500 - commentContent.length }}</div>
|
<div class="discussion-multi-sum">{{ 500 - commentContent.length }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="discussion-multi-bottom flexflex flexacenter">
|
<div class="discussion-multi-bottom flexflex flexacenter">
|
||||||
<div class="discussion-multi-btn flexcenter" @click.stop="postComment(commentContent)">
|
<div class="discussion-multi-btn flexcenter" @click.stop="postComment()">
|
||||||
发布
|
发布
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -53,30 +54,26 @@ export default {
|
|||||||
name: 'DetailReply',
|
name: 'DetailReply',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
commentContent: "",
|
|
||||||
openDiscussionSingleState: true, // 弹出键盘动画
|
openDiscussionSingleState: true, // 弹出键盘动画
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
props: ["twoCommentData", "popState"],
|
props: ["twoCommentData", "popState", "commentContent"],
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
||||||
console.log("子组件");
|
console.log("子组件");
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
// 提交回复
|
// 提交回复
|
||||||
postComment(commentContent) {
|
postComment() {
|
||||||
this.$parent.postComment(commentContent)
|
this.$parent.postComment()
|
||||||
},
|
},
|
||||||
|
|
||||||
// 关闭弹窗
|
// 关闭弹窗
|
||||||
handlePopCancel() {
|
handlePopCancel() {
|
||||||
console.log(this.$parent.popState, "this.$parent.popState");
|
|
||||||
this.$parent.twoCommentData = null
|
this.$parent.twoCommentData = null
|
||||||
this.$parent.popState = ""
|
this.$parent.popState = ""
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 清空
|
// 清空
|
||||||
@ -98,6 +95,11 @@ export default {
|
|||||||
}, 500);
|
}, 500);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
inputCommentContent(event) {
|
||||||
|
let value = event.currentTarget.value
|
||||||
|
this.$parent.commentContent = value
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -134,9 +134,7 @@
|
|||||||
<img class="card-head-icon" :src="item.avatar" />
|
<img class="card-head-icon" :src="item.avatar" />
|
||||||
<div class="card-head-content flex1 flexflex">
|
<div class="card-head-content flex1 flexflex">
|
||||||
<div class="card-head-name flexflex">{{ item.author }}
|
<div class="card-head-name flexflex">{{ item.author }}
|
||||||
<!-- <div class="landlord flexcenter" v-if="index == 0">
|
<div class="landlord flexcenter" v-if="item.isauthor == 1">楼主</div>
|
||||||
楼主
|
|
||||||
</div> -->
|
|
||||||
</div>
|
</div>
|
||||||
<div class="card-head-time">{{ $formattedDate(item.dateline) }}</div>
|
<div class="card-head-time">{{ $formattedDate(item.dateline) }}</div>
|
||||||
</div>
|
</div>
|
||||||
@ -145,10 +143,13 @@
|
|||||||
index + 2}楼` }}</div>
|
index + 2}楼` }}</div>
|
||||||
<div class="card-head-fool" v-else>{{ `${(postList.page - 1) * postList.limit + index + 1}楼` }}
|
<div class="card-head-fool" v-else>{{ `${(postList.page - 1) * postList.limit + index + 1}楼` }}
|
||||||
</div>
|
</div>
|
||||||
|
<div class="edit-box flexcenter" v-if="item.ismyself == 1" @click.stop="handleIsmyself(item)">
|
||||||
|
<img class="edit-icom" src="@/assets/img/detail/edit.png" />
|
||||||
|
</div>
|
||||||
<!-- <div class="card-head-fool">{{ index == 0 ? '楼主' : `${index}楼` }}</div> -->
|
<!-- <div class="card-head-fool">{{ index == 0 ? '楼主' : `${index}楼` }}</div> -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card-content flex1" @click.stop="handleReplyPop(item.token)" v-html="item.message"></div>
|
<div class="card-content flex1" @click.stop="handleReplyPop(item)" v-html="item.message"></div>
|
||||||
|
|
||||||
|
|
||||||
<template v-if="false">
|
<template v-if="false">
|
||||||
@ -318,7 +319,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<detail-reply :two-comment-data="twoCommentData" :pop-state="popState"></detail-reply>
|
<detail-reply :two-comment-data="twoCommentData" :comment-content="commentContent"
|
||||||
|
:pop-state="popState"></detail-reply>
|
||||||
|
|
||||||
<coins :coin-config="coinConfig" :pop-state="popState"></coins>
|
<coins :coin-config="coinConfig" :pop-state="popState"></coins>
|
||||||
</div>
|
</div>
|
||||||
@ -459,6 +461,8 @@ export default {
|
|||||||
|
|
||||||
loading: null, // 加载中
|
loading: null, // 加载中
|
||||||
|
|
||||||
|
commentContent: "", // 评论的文本
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -488,7 +492,18 @@ export default {
|
|||||||
info['message'] = info['message'].replaceAll(reg, '<br/>')
|
info['message'] = info['message'].replaceAll(reg, '<br/>')
|
||||||
info['message'] = info['message'].replace(/<img[^>]*>/g, (match) => {
|
info['message'] = info['message'].replace(/<img[^>]*>/g, (match) => {
|
||||||
return match.replace(/width="[^"]*"/g, '').replace(/height="[^"]*"/g, '');
|
return match.replace(/width="[^"]*"/g, '').replace(/height="[^"]*"/g, '');
|
||||||
});
|
})
|
||||||
|
|
||||||
|
info["messageList"] = []
|
||||||
|
|
||||||
|
|
||||||
|
info['message'] = info['message'].replace("[hide]作者设置了回复可见[/hide]", `<div class="flexcenter content-unlock content-unlock-no"><img class="unlock-icom" src="./img/unlock.png">作者设置了回复可见</div>`)
|
||||||
|
|
||||||
|
// 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>`
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.info = info
|
this.info = info
|
||||||
this.type = data.type
|
this.type = data.type
|
||||||
@ -498,7 +513,8 @@ export default {
|
|||||||
else if (this.type == 5) this.getsummaryDetails()
|
else if (this.type == 5) this.getsummaryDetails()
|
||||||
else if (this.type == 3) this.getTenementDetails()
|
else if (this.type == 3) this.getTenementDetails()
|
||||||
else if (this.type == 2) this.getInterviewDetails()
|
else if (this.type == 2) this.getInterviewDetails()
|
||||||
this.getPostList()
|
|
||||||
|
info['ispost'] != 0 ? this.getPostList() : ''
|
||||||
|
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
this.$closeUnderLoading(this)
|
this.$closeUnderLoading(this)
|
||||||
@ -513,7 +529,6 @@ export default {
|
|||||||
let data = res.data
|
let data = res.data
|
||||||
// let offerinfo = data.offerinfo
|
// let offerinfo = data.offerinfo
|
||||||
let offerinfo = data.collegelist[0]
|
let offerinfo = data.collegelist[0]
|
||||||
console.log("offerinfo", offerinfo);
|
|
||||||
let useperformanceStr = ""
|
let useperformanceStr = ""
|
||||||
offerinfo.useperformance && offerinfo.useperformance.forEach((el, index) => {
|
offerinfo.useperformance && offerinfo.useperformance.forEach((el, index) => {
|
||||||
useperformanceStr += el + (offerinfo.useperformance.length - 1 == index ? '' : '、')
|
useperformanceStr += el + (offerinfo.useperformance.length - 1 == index ? '' : '、')
|
||||||
@ -523,7 +538,6 @@ export default {
|
|||||||
// offerinfo['schoolname'] = offerinfo.school.name
|
// offerinfo['schoolname'] = offerinfo.school.name
|
||||||
|
|
||||||
this.offerinfo = offerinfo
|
this.offerinfo = offerinfo
|
||||||
// this.shareurl = data.shareurl
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -628,8 +642,8 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
// 处理回复点击弹出弹窗
|
// 处理回复点击弹出弹窗
|
||||||
handleReplyPop(token) {
|
handleReplyPop(item) {
|
||||||
console.log(token);
|
console.log(item);
|
||||||
this.popState = "discussionSingle"
|
this.popState = "discussionSingle"
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -637,12 +651,21 @@ export default {
|
|||||||
postComment(message) {
|
postComment(message) {
|
||||||
this.$http.post("/api/operation/reply", {
|
this.$http.post("/api/operation/reply", {
|
||||||
token: this.token,
|
token: this.token,
|
||||||
message
|
message: this.commentContent
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.code != 200) return
|
if (res.code != 200) return
|
||||||
let data = res.data
|
let data = res.data
|
||||||
console.log(data);
|
console.log(data);
|
||||||
this.popState = ""
|
this.popState = ""
|
||||||
|
|
||||||
|
let { count, limit } = this.postList
|
||||||
|
|
||||||
|
let query = {
|
||||||
|
page: Math.ceil((count + 1) / limit),
|
||||||
|
tid: this.tid
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$router.push({ path: `/detailIndex`, query })
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -700,6 +723,13 @@ export default {
|
|||||||
this.$router.push({ path: `/allSections`, query: { twofid: this.info.fid } })
|
this.$router.push({ path: `/allSections`, query: { twofid: this.info.fid } })
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 处理点击编辑自己的回复
|
||||||
|
handleIsmyself(item) {
|
||||||
|
console.log(item, "item");
|
||||||
|
this.twoCommentData = item.message
|
||||||
|
this.popState = "discussionMulti"
|
||||||
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
@ -844,8 +874,22 @@ export default {
|
|||||||
color: rgb(127, 127, 127);
|
color: rgb(127, 127, 127);
|
||||||
font-size: .32rem;
|
font-size: .32rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.edit-box {
|
||||||
|
width: .64rem;
|
||||||
|
height: .64rem;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: #f6f6f6;
|
||||||
|
margin-left: .32rem;
|
||||||
|
|
||||||
|
.edit-icom {
|
||||||
|
width: .4rem;
|
||||||
|
// height: .4rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.card-content {
|
.card-content {
|
||||||
color: #333;
|
color: #333;
|
||||||
font-size: .36rem;
|
font-size: .36rem;
|
||||||
@ -895,49 +939,50 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.content-unlock {
|
/deep/ {
|
||||||
&.content-unlock-no {
|
.content-unlock {
|
||||||
height: 3.2rem;
|
&.content-unlock-no {
|
||||||
|
height: 3.2rem;
|
||||||
|
|
||||||
.unlock-icom {
|
.unlock-icom {
|
||||||
width: .64rem;
|
width: .64rem;
|
||||||
height: .64rem;
|
height: .64rem;
|
||||||
margin-right: 0.2rem;
|
margin-right: 0.2rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
background: rgba(242, 242, 242, 0.7);
|
|
||||||
margin: .48rem 0;
|
|
||||||
color: #555555;
|
|
||||||
font-size: .32rem;
|
|
||||||
border-radius: .16rem;
|
|
||||||
|
|
||||||
&.content-already {
|
|
||||||
background: rgba(242, 242, 242, 0.7);
|
background: rgba(242, 242, 242, 0.7);
|
||||||
margin: .48rem 0;
|
margin: .48rem 0;
|
||||||
padding: .32rem;
|
|
||||||
color: #555555;
|
color: #555555;
|
||||||
font-size: .32rem;
|
font-size: .32rem;
|
||||||
border-radius: .16rem;
|
border-radius: .16rem;
|
||||||
|
|
||||||
.content-already-header {
|
&.content-already {
|
||||||
color: #7f7f7f;
|
background: rgba(242, 242, 242, 0.7);
|
||||||
font-size: .28rem;
|
margin: .48rem 0;
|
||||||
justify-content: center;
|
padding: .32rem;
|
||||||
|
color: #555555;
|
||||||
|
font-size: .32rem;
|
||||||
|
border-radius: .16rem;
|
||||||
|
|
||||||
|
.content-already-header {
|
||||||
|
color: #7f7f7f;
|
||||||
|
font-size: .28rem;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-unlock-wenzi {
|
||||||
|
color: #333;
|
||||||
|
font-size: .36rem;
|
||||||
|
line-height: .6rem;
|
||||||
|
margin-top: .3rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.content-unlock-wenzi {
|
|
||||||
color: #333;
|
|
||||||
font-size: .36rem;
|
|
||||||
line-height: .6rem;
|
|
||||||
margin-top: .3rem;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.offer-content {
|
.offer-content {
|
||||||
@ -957,6 +1002,48 @@ export default {
|
|||||||
img {
|
img {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.content-unlock {
|
||||||
|
&.content-unlock-no {
|
||||||
|
height: 3.2rem;
|
||||||
|
|
||||||
|
.unlock-icom {
|
||||||
|
width: .64rem;
|
||||||
|
height: .64rem;
|
||||||
|
margin-right: 0.2rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
background: rgba(242, 242, 242, 0.7);
|
||||||
|
margin: .48rem 0;
|
||||||
|
color: #555555;
|
||||||
|
font-size: .32rem;
|
||||||
|
border-radius: .16rem;
|
||||||
|
|
||||||
|
&.content-already {
|
||||||
|
background: rgba(242, 242, 242, 0.7);
|
||||||
|
margin: .48rem 0;
|
||||||
|
padding: .32rem;
|
||||||
|
color: #555555;
|
||||||
|
font-size: .32rem;
|
||||||
|
border-radius: .16rem;
|
||||||
|
|
||||||
|
.content-already-header {
|
||||||
|
color: #7f7f7f;
|
||||||
|
font-size: .28rem;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-unlock-wenzi {
|
||||||
|
color: #333;
|
||||||
|
font-size: .36rem;
|
||||||
|
line-height: .6rem;
|
||||||
|
margin-top: .3rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|