Переглянути джерело

Merge branch 'master' of http://git.cc-lotus.info/Free-cysci/common

lrf402788946 4 роки тому
батько
коміт
627894906d

+ 11 - 2
src/components/adminCommon/frame.vue

@@ -12,7 +12,16 @@
       </el-header>
       <el-container class="container">
         <el-aside width="200px" class="aside">
-          <el-menu :default-active="$route.path" class="el-menu-vertical-demo" router overflow-y: scroll>
+          <el-menu
+            :default-active="$route.path"
+            class="el-menu-vertical-demo"
+            background-color="#242f42"
+            text-color="#fff"
+            active-text-color="#409eff"
+            router
+            overflow-y:
+            scroll
+          >
             <el-menu-item index="/adminCenter/homeIndex">首页</el-menu-item>
             <el-menu-item index="/adminCenter/news">新闻管理</el-menu-item>
             <el-menu-item index="/adminCenter/product">科技成果管理</el-menu-item>
@@ -94,7 +103,7 @@ export default {
 }
 .container {
   .aside {
-    border-right: 1px solid #ff0000;
+    background-color: #242f42;
   }
 }
 </style>

+ 1 - 1
src/components/common/top.vue

@@ -16,7 +16,7 @@
             <el-col :span="4" class="right">
               <el-col :span="24" class="phone"><i class="el-icon-phone-outline"></i>服务热线:<span>0431-12345678</span></el-col>
               <el-col :span="24" class="btn">
-                <el-button type="primary" size="mini">管理登录</el-button>
+                <el-button type="primary" size="mini" @click="$router.push({ path: '/login' })">管理登录</el-button>
               </el-col>
             </el-col>
           </div>

+ 1 - 1
src/components/frame/form.vue

@@ -13,7 +13,7 @@
     >
       <el-row type="flex" justify="end" align="middle" v-if="returns" style="padding:10px">
         <el-col :span="2">
-          <el-button size="mini" @click="toReturn">返回</el-button>
+          <el-button type="primary" size="mini" @click="toReturn">返回</el-button>
         </el-col>
       </el-row>
       <template v-for="(item, index) in fields">

+ 43 - 0
src/store/roadShow.js

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