|
@@ -21,6 +21,8 @@ import list from './parts/list.vue';
|
|
|
import top from '@/layout/common/top.vue';
|
|
|
import page from '@/layout/common/page.vue';
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
+const { mapActions: mapRefute } = createNamespacedHelpers('refute');
|
|
|
+
|
|
|
export default {
|
|
|
name: 'index',
|
|
|
props: {},
|
|
@@ -99,8 +101,14 @@ export default {
|
|
|
this.$set(this, `clientHeight`, clientHeight);
|
|
|
},
|
|
|
methods: {
|
|
|
- search({ skip = 0, limit = 10, searchName, ...info } = {}) {
|
|
|
- console.log(searchName);
|
|
|
+ ...mapRefute(['query']),
|
|
|
+ async search({ skip = 0, limit = 5, searchName, ...info } = {}) {
|
|
|
+ if (searchName) info.title = searchName;
|
|
|
+ let res = await this.query({ skip, limit, ...info });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `refuteList`, res.data);
|
|
|
+ this.$set(this, `total`, res.total);
|
|
|
+ }
|
|
|
},
|
|
|
// 详情
|
|
|
detailBtn(data) {
|