xbx #126

Merged
theluyuan merged 9 commits from xbx into master 2020-11-12 02:40:09 +00:00
2 changed files with 16 additions and 7 deletions
Showing only changes of commit fb173c548d - Show all commits

View File

@ -137,6 +137,7 @@
<script lang="ts">
import { delreply, getcommentlist } from '@/api';
import { useI18n } from '@/utils/i18n';
import { message } from 'ant-design-vue';
import { defineComponent, onMounted, ref } from 'vue';
import { useRoute } from 'vue-router';
import ReviewItemtwo from "./ReviewItemtwo.vue"
@ -219,13 +220,7 @@ export default defineComponent({
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() {
async function reload() {
if(iszk.value == true){
iszk.value = false;
if(prop.replyid){
@ -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 {
stars,

View File

@ -100,6 +100,7 @@
import { delreply } from '@/api';
import store from '@/store';
import { useI18n } from '@/utils/i18n';
import { message } from 'ant-design-vue';
import { defineComponent, ref } from 'vue';
export default defineComponent({
@ -139,6 +140,8 @@ export default defineComponent({
const res=await delreply(e)
if(res.code==0){
context.emit("reload",prop.replyid)
}else {
message.error(res.msg)
}
console.log(res)