添加了删除提示
This commit is contained in:
parent
77664c98e3
commit
fb173c548d
@ -137,6 +137,7 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { delreply, getcommentlist } from '@/api';
|
import { delreply, getcommentlist } from '@/api';
|
||||||
import { useI18n } from '@/utils/i18n';
|
import { useI18n } from '@/utils/i18n';
|
||||||
|
import { message } from 'ant-design-vue';
|
||||||
import { defineComponent, onMounted, ref } from 'vue';
|
import { defineComponent, onMounted, ref } from 'vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import ReviewItemtwo from "./ReviewItemtwo.vue"
|
import ReviewItemtwo from "./ReviewItemtwo.vue"
|
||||||
@ -219,12 +220,6 @@ export default defineComponent({
|
|||||||
replylist.value =await getcommentlist({type: 3,id: e})
|
replylist.value =await getcommentlist({type: 3,id: e})
|
||||||
ifshow.value = true;
|
ifshow.value = true;
|
||||||
}
|
}
|
||||||
async function del(e?: number){
|
|
||||||
console.log(e)
|
|
||||||
const res=await delreply(e)
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
async function reload() {
|
async function reload() {
|
||||||
if(iszk.value == true){
|
if(iszk.value == true){
|
||||||
iszk.value = false;
|
iszk.value = false;
|
||||||
@ -234,6 +229,17 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
async function del(e?: number){
|
||||||
|
console.log(e)
|
||||||
|
const res=await delreply(e)
|
||||||
|
if(res.code != 0){
|
||||||
|
message.error(res.msg)
|
||||||
|
}
|
||||||
|
reload()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
stars,
|
stars,
|
||||||
|
@ -100,6 +100,7 @@
|
|||||||
import { delreply } from '@/api';
|
import { delreply } from '@/api';
|
||||||
import store from '@/store';
|
import store from '@/store';
|
||||||
import { useI18n } from '@/utils/i18n';
|
import { useI18n } from '@/utils/i18n';
|
||||||
|
import { message } from 'ant-design-vue';
|
||||||
import { defineComponent, ref } from 'vue';
|
import { defineComponent, ref } from 'vue';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
@ -139,6 +140,8 @@ export default defineComponent({
|
|||||||
const res=await delreply(e)
|
const res=await delreply(e)
|
||||||
if(res.code==0){
|
if(res.code==0){
|
||||||
context.emit("reload",prop.replyid)
|
context.emit("reload",prop.replyid)
|
||||||
|
}else {
|
||||||
|
message.error(res.msg)
|
||||||
}
|
}
|
||||||
console.log(res)
|
console.log(res)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user