guhongwei 2 years ago
parent
commit
1f1a104caf
2 changed files with 49 additions and 1 deletions
  1. 7 1
      src/layout/site.js
  2. 42 0
      src/store/app/appapk.js

+ 7 - 1
src/layout/site.js

@@ -135,11 +135,17 @@ export const menus = [
         path: '/app/banner',
       },
       {
-        _id: 'me3us_2_2',
+        _id: 'me3us_2_3',
         icon: 'el-icon-user',
         name: '热门链接',
         path: '/app/hotlink',
       },
+      {
+        _id: 'me3us_2_4',
+        icon: 'el-icon-user',
+        name: '应用管理',
+        path: '/app/appapk',
+      },
     ],
   },
   {

+ 42 - 0
src/store/app/appapk.js

@@ -0,0 +1,42 @@
+import Vue from 'vue';
+import Vuex from 'vuex';
+import _ from 'lodash';
+Vue.use(Vuex);
+const api = {
+  test: `/projectadmin/api/appapk`,
+};
+const state = () => ({});
+const mutations = {};
+
+const actions = {
+  async query({ commit }, { skip = 0, limit, ...info } = {}) {
+    const res = await this.$axios.$get(`${api.test}`, {
+      skip,
+      limit,
+      ...info,
+    });
+    return res;
+  },
+  async fetch({ commit }, payload) {
+    const res = await this.$axios.$get(`${api.test}/${payload}`);
+    return res;
+  },
+  async create({ commit }, payload) {
+    const res = await this.$axios.$post(`${api.test}`, payload);
+    return res;
+  },
+  async update({ commit }, { _id, ...info } = {}) {
+    const res = await this.$axios.$post(`${api.test}/${_id}`, { ...info });
+    return res;
+  },
+  async delete({ commit }, payload) {
+    const res = await this.$axios.$delete(`${api.test}/${payload}`);
+    return res;
+  },
+};
+export default {
+  namespaced: true,
+  state,
+  mutations,
+  actions,
+};