main
王宇航 2024-05-23 10:28:33 +08:00
parent 2a7bd832b9
commit cd0511317f
2 changed files with 67 additions and 70 deletions

View File

@ -13,74 +13,71 @@
<script>
import {listDynamic, getDynamic, treeDynamic} from "@/api/app/dynamic";
export default {
// export default {
//
// data() {
// return {
// id: '',
// //
// loading: true,
// //
// ids: [],
// //
// single: true,
// //
// multiple: true,
// //
// showSearch: true,
// //
// total: 0,
// // App
// dynamicList: [],
// //
// title: "",
// //
// open: false,
//
//
// created() {
// this.getList();
// this.getDynamic(this.id);
// },
//
// mounted: function () {
// this.id = this.$route().params.dynamicId;
// },
// methods: {
//
// getList() {
// this.loading = true;
// listDynamic(this.queryParams).then(response => {
// this.registerList = response.rows;
// this.total = response.total;
// this.loading = false;
// });
// },
// handleDetail(row) {
// const id = row.id || row.ids;
//
// this.$router.push({path: '/app/dynamic/detail'});
// this.queryParams.dynamicId = id;
//
// treeDynamic(this.queryParams).then(response => {
// this.form = response.data;
// this.open = true;
// this.title = "App";
//
// // Access the data here
// console.log(this.form); // Or use the data in any way you need
// });
// },
// getDynamic(id){
// getDynamic(id).then(response => {
// console.log(response.data);
// })
// }
//
// }
//
// }
// }
// }
data() {
return {
id: '',
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
// App
dynamicList: [],
//
title: "",
//
open: false,
created() {
this.getList();
this.getDynamic(this.id);
},
mounted: function () {
this.id = this.$route().params.id;
},
methods: {
getList() {
this.loading = true;
listDynamic(this.queryParams).then(response => {
this.registerList = response.rows;
this.total = response.total;
this.loading = false;
});
},
handleDetail(row) {
const id = row.id || row.ids;
this.queryParams.dynamicId = id;
treeDynamic(this.queryParams).then(response => {
this.form = response.data;
this.open = true;
this.title = "App用户动态详情";
// Access the data here
console.log(this.form); // Or use the data in any way you need
});
},
getDynamic(id){
getDynamic(id).then(response => {
console.log(response.data);
})
}
}
}
}
}
</script>

View File

@ -262,7 +262,7 @@ export default {
/** 详情按钮操作 跳转到新页面*/
handleDetail(row) {
const id = row.id || 0;
this.$router.push({path: '/dynamic/detail'+ id})
this.$router.push({path: '/app/content/dynamic_detail?id='+ id})
},
/** 新增按钮操作 */
handleAdd() {