guhongwei 2 年之前
父节点
当前提交
421ad12fca
共有 3 个文件被更改,包括 57 次插入1 次删除
  1. 1 1
      src/components/frame/c-dialog.vue
  2. 14 0
      src/layout/site.js
  3. 42 0
      src/store/app/appbasic.js

+ 1 - 1
src/components/frame/c-dialog.vue

@@ -12,7 +12,7 @@ export default {
   name: 'e-dialog',
   props: {
     dialog: { type: Object, default: () => {} },
-    width: { type: String, default: '40%' },
+    width: { type: String, default: '50%' },
   },
   components: {},
   data: function () {

+ 14 - 0
src/layout/site.js

@@ -116,6 +116,20 @@ export const menus = [
       },
     ],
   },
+  {
+    _id: 'menus_3',
+    icon: 'el-icon-user',
+    name: 'app/小程序管理',
+    type: '1',
+    children: [
+      {
+        _id: 'menus_2_1',
+        icon: 'el-icon-user',
+        name: '基本信息',
+        path: '/app/basic',
+      },
+    ],
+  },
   {
     _id: 'menus_100',
     icon: 'el-icon-user',

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

@@ -0,0 +1,42 @@
+import Vue from 'vue';
+import Vuex from 'vuex';
+import _ from 'lodash';
+Vue.use(Vuex);
+const api = {
+  test: `/projectadmin/api/appbasic`,
+};
+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,
+};