回复完成
This commit is contained in:
parent
47e05ec6ff
commit
77664c98e3
@ -46,7 +46,8 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
box-shadow: 0px 5px 6px 0px rgba(158, 158, 158, 0.11);
|
box-shadow: 0px 5px 6px 0px rgba(158, 158, 158, 0.11);
|
||||||
.cover{
|
.cover{
|
||||||
width: 100%;
|
width: 226px;
|
||||||
|
min-width: 100%;
|
||||||
height: 127px;
|
height: 127px;
|
||||||
}
|
}
|
||||||
.play{
|
.play{
|
||||||
|
@ -15,7 +15,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="all" @click="findall(replyid)" >
|
<div class="all" @click="findall(replyid)" >
|
||||||
<span>{{lan.$t('suoyouhuifu')}}</span>
|
<span>{{lan.$t('suoyouhuifu')}}</span>
|
||||||
<img src="@/static/images/arrowdownblue.png" alt="">
|
<img v-show="!iszk" src="@/static/images/arrowdownblue.png" alt="">
|
||||||
|
<img v-show="iszk" src="@/static/images/arrowdownblueup.png" alt="">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="cont">
|
<div class="cont">
|
||||||
@ -23,7 +24,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="bottom">
|
<div class="bottom">
|
||||||
<div class="date">{{date}}</div>
|
<div class="date">{{date}}</div>
|
||||||
<div class="reply" @click="reply(username)">{{lan.$t('huifu')}}</div>
|
<div style="display: flex">
|
||||||
|
<div class="del" @click="del(replyid)">
|
||||||
|
{{lan.$t('shanchu')}}
|
||||||
|
</div>
|
||||||
|
<div class="reply" @click="reply(username)">{{lan.$t('huifu')}}</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="huifu" v-if="ifshow">
|
<div class="huifu" v-if="ifshow">
|
||||||
@ -113,15 +120,22 @@
|
|||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
color: #08AE98;
|
color: #08AE98;
|
||||||
}
|
}
|
||||||
|
.del{
|
||||||
|
font-size: 10px;
|
||||||
|
color:#D12C2D!important;
|
||||||
|
flex-shrink: 0;
|
||||||
|
margin-right: 28px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.huifu{
|
.huifu{
|
||||||
|
border-top: solid 1px #eee;
|
||||||
margin-left: 56px;
|
margin-left: 56px;
|
||||||
margin-top: 30px;
|
margin-top: 30px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { getcommentlist } from '@/api';
|
import { delreply, getcommentlist } from '@/api';
|
||||||
import { useI18n } from '@/utils/i18n';
|
import { useI18n } from '@/utils/i18n';
|
||||||
import { defineComponent, onMounted, ref } from 'vue';
|
import { defineComponent, onMounted, ref } from 'vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
@ -160,6 +174,7 @@ export default defineComponent({
|
|||||||
const reviewlist=ref({})
|
const reviewlist=ref({})
|
||||||
const videoid=ref(useRoute().query.id)
|
const videoid=ref(useRoute().query.id)
|
||||||
const ifshow=ref(false)
|
const ifshow=ref(false)
|
||||||
|
const iszk = ref(false)
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
reviewlist.value=await getcommentlist({type: 2,id: videoid.value})
|
reviewlist.value=await getcommentlist({type: 2,id: videoid.value})
|
||||||
})
|
})
|
||||||
@ -195,9 +210,31 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
async function findall(e: number){
|
async function findall(e: number){
|
||||||
console.log("all")
|
console.log("all")
|
||||||
|
if(iszk.value){
|
||||||
|
iszk.value = false;
|
||||||
|
ifshow.value= false;
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
iszk.value = true
|
||||||
replylist.value =await getcommentlist({type: 3,id: e})
|
replylist.value =await getcommentlist({type: 3,id: e})
|
||||||
ifshow.value=ifshow.value==false?true:false
|
ifshow.value = true;
|
||||||
}
|
}
|
||||||
|
async function del(e?: number){
|
||||||
|
console.log(e)
|
||||||
|
const res=await delreply(e)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
async function reload() {
|
||||||
|
if(iszk.value == true){
|
||||||
|
iszk.value = false;
|
||||||
|
if(prop.replyid){
|
||||||
|
findall(prop.replyid)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
stars,
|
stars,
|
||||||
reply,
|
reply,
|
||||||
@ -206,7 +243,10 @@ export default defineComponent({
|
|||||||
reviewlist,
|
reviewlist,
|
||||||
refresh,
|
refresh,
|
||||||
ifshow,
|
ifshow,
|
||||||
lan
|
lan,
|
||||||
|
del,
|
||||||
|
iszk,
|
||||||
|
reload
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
<!-- <div class="reply" @click="reply(username)">
|
<!-- <div class="reply" @click="reply(username)">
|
||||||
回复
|
回复
|
||||||
</div> -->
|
</div> -->
|
||||||
<div class="del" @click="del(replyid)" v-if="parseInt(memberid)==myid">
|
<div class="del" @click="del(replyid)">
|
||||||
{{lan.$t('shanchu')}}
|
{{lan.$t('shanchu')}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -47,7 +47,8 @@
|
|||||||
box-shadow: 0px 5px 6px 0px rgba(158, 158, 158, 0.11);
|
box-shadow: 0px 5px 6px 0px rgba(158, 158, 158, 0.11);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
.cover{
|
.cover{
|
||||||
width: 100%;
|
width: 226px;
|
||||||
|
min-width: 100%;
|
||||||
height: 127px;
|
height: 127px;
|
||||||
// background-color: #0f0;
|
// background-color: #0f0;
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
:replyid="i.commentid"
|
:replyid="i.commentid"
|
||||||
@replying="reply"
|
@replying="reply"
|
||||||
@findall="findreply"
|
@findall="findreply"
|
||||||
|
:ref="el => {list[j] = el}"
|
||||||
></ReviewItem>
|
></ReviewItem>
|
||||||
|
|
||||||
|
|
||||||
@ -124,6 +125,7 @@ export default defineComponent({
|
|||||||
const replylist =ref({})
|
const replylist =ref({})
|
||||||
const videoid=ref(useRoute().query.id)
|
const videoid=ref(useRoute().query.id)
|
||||||
const url = useRoute().path
|
const url = useRoute().path
|
||||||
|
const list = ref<any>([])
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
let type = 1;
|
let type = 1;
|
||||||
if(url == '/regime/livedetail'){
|
if(url == '/regime/livedetail'){
|
||||||
@ -132,6 +134,7 @@ export default defineComponent({
|
|||||||
type = 2;
|
type = 2;
|
||||||
}
|
}
|
||||||
reviewlist.value=await getcommentlist({type: type,id: videoid.value})
|
reviewlist.value=await getcommentlist({type: type,id: videoid.value})
|
||||||
|
|
||||||
})
|
})
|
||||||
console.log(useRoute().query)
|
console.log(useRoute().query)
|
||||||
console.log(store.state.userinfo.memberid,"userifno")
|
console.log(store.state.userinfo.memberid,"userifno")
|
||||||
@ -151,7 +154,12 @@ export default defineComponent({
|
|||||||
data.value.content=commentval.value
|
data.value.content=commentval.value
|
||||||
console.log(data.value,2221)
|
console.log(data.value,2221)
|
||||||
if(uinfo.value.name){
|
if(uinfo.value.name){
|
||||||
addcomment(toRaw(data.value))
|
addcomment(toRaw(data.value)).then(()=>{
|
||||||
|
for(const i in list.value){
|
||||||
|
list.value[i].reload()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
message.error(lan.$t('xuanzehuifuxuesheng'))
|
message.error(lan.$t('xuanzehuifuxuesheng'))
|
||||||
}
|
}
|
||||||
@ -183,7 +191,8 @@ export default defineComponent({
|
|||||||
haslist,
|
haslist,
|
||||||
reviewlist,
|
reviewlist,
|
||||||
refresh,
|
refresh,
|
||||||
lan
|
lan,
|
||||||
|
list
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
BIN
src/static/images/arrowdownblueup.png
Normal file
BIN
src/static/images/arrowdownblueup.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
Loading…
x
Reference in New Issue
Block a user