|
@@ -8,6 +8,7 @@
|
|
|
|
|
|
<script>
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
+const { mapActions } = createNamespacedHelpers('admin');
|
|
|
export default {
|
|
|
name: 'homeIndex',
|
|
|
props: {},
|
|
@@ -15,8 +16,16 @@ export default {
|
|
|
data: function () {
|
|
|
return {};
|
|
|
},
|
|
|
- created() {},
|
|
|
- methods: {},
|
|
|
+ created() {
|
|
|
+ this.search();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ ...mapActions(['query']),
|
|
|
+ async search() {
|
|
|
+ let res = await this.query();
|
|
|
+ console.log(res);
|
|
|
+ },
|
|
|
+ },
|
|
|
computed: {
|
|
|
...mapState(['user']),
|
|
|
},
|