@@ -1,5 +1,6 @@
import Vue from 'vue';
import Vuex from 'vuex';
+import admin from '@common/src/store/admin';
Vue.use(Vuex);
@@ -8,5 +9,5 @@ export default new Vuex.Store({
getters: {},
mutations: {},
actions: {},
- modules: {},
+ modules: { admin },
});
@@ -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']),
@@ -23,7 +23,7 @@ module.exports = {
target: 'http://broadcast.waityou24.cn',
'/projectadmin/api': {
- target: 'http://192.168.1.144:10101', //http://192.168.1.144:16001
+ target: 'http://127.0.0.1:10102', //http://192.168.1.144:16001
changeOrigin: true,
ws: false,