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