Parcourir la source

Merge branch 'master' of http://192.168.0.115:3000/chenzhiguang/xinjiang_army

tremble il y a 3 ans
Parent
commit
7e83b10a71

+ 21 - 2
new_backstage/src/configue/api.js

@@ -277,7 +277,7 @@ export function resetPass(data, cb) {
 export const getTabList = () => {
   return axios({
     method: 'post',
-    url: 'cms/goodsModule/list',
+    url: 'cms/goodsModule/list/goods',
   })
 }
 
@@ -286,7 +286,7 @@ export const addTabList = (data) => {
   return axios({
     method: 'post',
     url: 'cms/goodsModule/save',
-    data
+    data:{...data,module:'goods'}
   })
 }
 
@@ -354,4 +354,23 @@ export const userupdatePwd = (data) => {
     url: 'sys/user/updatePwd',
     data
   })
+}
+
+
+// ------------------------学习园地--------------------------
+// 获取学习园地左侧tab列表
+export const getTabStudyList = () => {
+  return axios({
+    method: 'post',
+    url: 'cms/goodsModule/list/news',
+  })
+}
+
+//学习园地左侧tab列表新增和修改
+export const addTabStudyList = (data) => {
+  return axios({
+    method: 'post',
+    url: 'cms/goodsModule/save',
+    data:{...data,module:'news'}
+  })
 }

+ 1 - 1
new_backstage/src/pages/content/collection/componets/img.vue

@@ -51,7 +51,7 @@
     </el-form-item>
     <!-- 新增的链接 -->
     <el-form-item label="链接:">
-      <el-input v-model="form.href"></el-input>
+      <el-input v-model="form.link"></el-input>
     </el-form-item>
   </div>
 </template>

+ 1 - 1
new_backstage/src/pages/content/collection/componets/leftTab.vue

@@ -106,7 +106,7 @@ export default {
   async created() {
     //获取自定义模块的权限
     let temp = localStorage.getItem("XJ_limits_ZDY");
-    temp = JSON.parse(temp);
+    temp = JSON.parse(temp).JPDC;
     this.limits.edit = temp[0].authority;
     this.limits.del = temp[1].authority;
   },

+ 1 - 1
new_backstage/src/pages/content/collection/componets/video.vue

@@ -44,7 +44,7 @@
     </el-form-item>
     <!-- 新增的链接 -->
     <el-form-item label="链接:">
-      <el-input v-model="form.href"></el-input>
+      <el-input v-model="form.link"></el-input>
     </el-form-item>
   </div>
 </template>

+ 20 - 3
new_backstage/src/pages/content/collection/index.vue

@@ -13,7 +13,7 @@
         <el-button
           type="primary"
           style="width: 100%"
-          @click="isShow = true"
+          @click="addModule"
           v-if="limitsEdit"
           >新增模块</el-button
         >
@@ -220,7 +220,19 @@ export default {
         sortType: "time",
       },
       status: "all",
-      menu: [{id:1,name:'...'},{id:2,name:'...'},{id:3,name:'...'},{id:4,name:'...'},{id:5,name:'...'},{id:6,name:'...'},{id:7,name:'...'},{id:8,name:'...'},{id:9,name:'...'},{id:10,name:'...'}],
+      menu: [
+        // 使用的vue里面的menu组件,需要初始化数据,不然刷新会有卡顿
+        { id: 1, name: "..." },
+        { id: 2, name: "..." },
+        { id: 3, name: "..." },
+        { id: 4, name: "..." },
+        { id: 5, name: "..." },
+        { id: 6, name: "..." },
+        { id: 7, name: "..." },
+        { id: 8, name: "..." },
+        { id: 9, name: "..." },
+        { id: 10, name: "..." },
+      ],
       list: {},
       page: {
         size: 25,
@@ -241,6 +253,11 @@ export default {
   },
 
   methods: {
+    // 点击左上方的新增模块
+    addModule() {
+      this.isShow = true;
+      this.isShowId = null;
+    },
     async editTab(id) {
       this.isShowId = id;
       // console.log('点击了编辑',id);
@@ -388,7 +405,7 @@ export default {
     this.getTabList();
     //获取自定义模块的权限
     let temp = localStorage.getItem("XJ_limits_ZDY");
-    temp = JSON.parse(temp);
+    temp = JSON.parse(temp).JPDC;
     this.limitsEdit = temp[0].authority;
   },
 };

+ 163 - 0
new_backstage/src/pages/content/study/componets/leftTab.vue

@@ -0,0 +1,163 @@
+<template>
+  <div class="con-left">
+    <!-- @select="handleSelect($event)" -->
+    <el-menu
+      :default-active="`${type}`"
+      class="el-menu-vertical-demo"
+      @mouseleave.native="ind = null"
+    >
+      <el-submenu index="1">
+        <template slot="title">
+          <i class="el-icon-menu"></i>
+          <span slot="title">{{ title }}</span>
+        </template>
+        <el-menu-item
+          :title="item.name"
+          v-for="item in menu"
+          :key="item.createTime"
+          :index="item.id.toString()"
+          @click="handleSelect(item)"
+          @mouseenter.native="ind = item.id"
+        >
+          {{ item.name }}
+          <div class="hover" v-show="item.id === ind">
+            <i
+              class="el-icon-edit"
+              title="编辑"
+              v-if="item.id !== 4 && item.id !== 5"
+              v-show="limits.edit"
+              @click="editTab($event, item.id)"
+            ></i>
+            <i
+              class="el-icon-close"
+              title="删除"
+              v-if="item.id !== 4 && item.id !== 5"
+              v-show="limits.del"
+              @click="deltTab($event, item.id)"
+            ></i>
+          </div>
+        </el-menu-item>
+        <!-- 鼠标移入的操作 -->
+        <!-- <template v-for="(item, i) in menu">
+          <div
+            class="hover"
+            :key="item.id"
+            :style="{ top: i * 50 + 'px' }"
+            v-show="item.id === ind"
+          >
+            <i
+              v-if="limits.edit"
+              class="el-icon-edit"
+              title="编辑"
+              @click="$emit('editTab', item.id)"
+            ></i>
+            <i
+              v-if="item.id!==1&&item.id!==2&&item.id!==3"
+              v-show="limits.del"
+              class="el-icon-close"
+              title="删除"
+              @click="$emit('deltTab', item.id)"
+            ></i>
+          </div>
+        </template> -->
+      </el-submenu>
+    </el-menu>
+    <!-- <div class="sousuo" @click="isCollapse = !isCollapse">
+      <i :class="isCollapse ? 'el-icon-arrow-right' : 'el-icon-arrow-left'"></i>
+    </div> -->
+  </div>
+</template>
+
+<script>
+export default {
+  name: "con-left",
+  props: ["menu", "title", "default"],
+  data() {
+    return {
+      // 权限的数据
+      limits: {
+        edit: true,
+        del: true,
+      },
+      // type: this.default,
+      ind: null,
+    };
+  },
+  methods: {
+    // 点击编辑模块
+    editTab(e, id) {
+      this.$emit("editTab", id);
+      e.stopPropagation();
+    },
+    // 点击删除模块
+    deltTab(e, id) {
+      this.$emit("deltTab", id);
+      e.stopPropagation();
+    },
+    handleSelect(data) {
+      this.$emit("select", data);
+    },
+  },
+  computed: {
+    type() {
+      return this.default;
+    },
+  },
+  async created() {
+    //获取自定义模块的权限
+    let temp = localStorage.getItem("XJ_limits_ZDY");
+    temp = JSON.parse(temp).XXYD;
+    this.limits.edit = temp[0].authority;
+    this.limits.del = temp[1].authority;
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.con-left {
+  border-right: solid 1px #e5e5e5;
+  position: relative;
+  margin-right: 20px;
+  padding-top: 40px;
+  .sousuo {
+    position: absolute;
+    top: 50%;
+    transform: translateY(-50%);
+    right: -30px;
+  }
+  .hover {
+    cursor: pointer;
+    width: 40px;
+    display: flex;
+    justify-content: right;
+    align-items: center;
+    position: absolute;
+    height: 50px;
+    top: 0;
+    right: 6px;
+    & > i {
+      color: #909399;
+      margin-right: 2px;
+      width: 18px;
+      &:hover {
+        color: #b63c25;
+      }
+    }
+  }
+  /deep/.el-menu-item {
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+  }
+}
+.el-menu-vertical-demo:not(.el-menu--collapse) {
+  height: 600px;
+  overflow-y: auto;
+  overflow-x: hidden;
+  width: 200px;
+  min-height: 400px;
+}
+.el-menu {
+  border-right: none !important;
+}
+</style>

+ 5 - 0
new_backstage/src/pages/content/study/edit.vue

@@ -83,6 +83,11 @@ export default {
           type: this.type,
           ...this.form,
         };
+        //学习园地增加的参数
+        let temp = localStorage.getItem("XJ_studyModuleId");
+        if (temp) params.goodsModuleId = Number(temp);
+        else params.goodsModuleId = 4;
+
         save(this.val, params, () => {
           if (submit) {
             cb && cb();

+ 228 - 36
new_backstage/src/pages/content/study/index.vue

@@ -1,19 +1,39 @@
 <template>
-  <div>
+  <div class="myTab4">
     <main-top>
       <div slot="con" v-if="activeSub['新增']">
-        <el-button @click="goto({ id: 'none',status: 0 })" type="primary"
+        <el-button @click="goto({ id: 'none', status: 0 })" type="primary"
           >新增</el-button
         >
       </div>
     </main-top>
     <div class="tablecon flexcon">
-      <accordion
+      <!-- 新增tab栏的按钮 -->
+      <div class="addTab">
+        <el-button
+          type="primary"
+          style="width: 100%"
+          @click="addModule"
+          v-if="limitsEdit"
+          >新增模块</el-button
+        >
+      </div>
+      <!-- <accordion
         @select="handleMenu"
         :menu="menu"
         :default="subMenu"
         title="学习园地"
+      /> -->
+
+      <LeftTab
+        @editTab="editTab"
+        @deltTab="deltTab"
+        @select="handleMenu"
+        :menu="menu"
+        :default="goodsModuleId"
+        title="学习园地"
       />
+
       <div class="tablebody">
         <status :status="status" @select="selectStatus"></status>
         <search>
@@ -38,8 +58,10 @@
               placeholder="请输入关键字"
             ></el-input>
             <el-button @click="getList" type="primary">查询</el-button>
-            <el-button @click="search.date='',search.inputKey='',getList()" >重置</el-button>
-
+            <el-button
+              @click="(search.date = ''), (search.inputKey = ''), getList()"
+              >重置</el-button
+            >
           </div>
         </search>
         <div class="table">
@@ -62,57 +84,189 @@
             @submit="submit"
             :tableData="list"
           >
-             <template slot-scope="{data}" slot="record">
-              <el-button @click="applyDetail(data,type)" type="text">审核详情</el-button>
+            <template slot-scope="{ data }" slot="record">
+              <el-button @click="applyDetail(data, type)" type="text"
+                >审核详情</el-button
+              >
             </template>
           </vtable>
         </div>
       </div>
     </div>
 
-    <vdialog :show="showApplyDetail" @close="showApplyDetail=false" :tableData="alDetail"></vdialog>
+    <vdialog
+      :show="showApplyDetail"
+      @close="showApplyDetail = false"
+      :tableData="alDetail"
+    ></vdialog>
 
+    <!-- 点击新增模块出现的弹窗 -->
+    <el-dialog
+      :title="ruleForm.id ? '编辑模块' : '新增模块'"
+      :visible="isShow"
+      @close="addTabX"
+    >
+      <el-form
+        :model="ruleForm"
+        ref="ruleForm"
+        label-width="100px"
+        class="demo-ruleForm"
+      >
+        <el-form-item label="模块名称:">
+          <el-input
+            :disabled="isShowId === 4 || isShowId === 5"
+            v-model="ruleForm.name"
+            maxlength="10"
+            show-word-limit
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="展示类型:">
+          <el-radio
+            v-model="ruleForm.type"
+            label="share"
+            :disabled="!!ruleForm.id"
+            >链接</el-radio
+          >
+          <el-radio
+            v-model="ruleForm.type"
+            label="info"
+            :disabled="!!ruleForm.id"
+            >图文</el-radio
+          >
+        </el-form-item>
+      </el-form>
+
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="addTabX">取 消</el-button>
+        <el-button type="primary" @click="addTabOK">确 定</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
 <script>
-
-import { raw, menu, menuStr } from "./data";
-import { getList } from "@/configue/api";
+// 导入后面自己写的tab栏组件
+import LeftTab from "./componets/leftTab.vue";
+import { raw, menuStr } from "./data";
+import {
+  getList,
+  getTabStudyList,
+  getTabInfoById,
+  getTabDelById,
+  addTabStudyList,
+} from "@/configue/api";
 
 import { mapGetters } from "vuex";
 
 export default {
+  name: "tabStudy",
+  components: { LeftTab },
   data() {
     return {
-      type:'news',
-      showApplyDetail:false,
-      alDetail:{},
+      limitsEdit: true,
+      type: "news",
+      showApplyDetail: false,
+      alDetail: {},
       search: {
         inputKey: "",
         date: "",
         state: "",
       },
       status: "all",
-      menu,
+      menu: [
+        // 使用的vue里面的menu组件,需要初始化数据,不然刷新会有卡顿
+        { id: 4, name: "..." },
+        { id: 5, name: "..." },
+        { id: 6, name: "..." },
+        { id: 7, name: "..." },
+        { id: 8, name: "..." },
+        { id: 9, name: "..." },
+        { id: 10, name: "..." },
+      ],
       list: {},
       page: {
         size: 25,
         pageNum: 1,
-      }
+      },
+      goodsModuleId: 4,
+      // 点击新增模块
+      isShowId: null,
+      isShow: false,
+      ruleForm: {
+        name: "",
+        type: "share", //类型, info:知识阅览, share:知识共享
+      },
     };
   },
   methods: {
+    // 点击左上方的新增模块
+    addModule() {
+      this.isShow = true;
+      this.isShowId = null;
+    },
+    async editTab(id) {
+      this.isShowId = id;
+      // console.log('点击了编辑',id);
+      let res = await getTabInfoById(id);
+      if (res.code === 0) {
+        this.ruleForm = res.data;
+        this.isShow = true;
+      } else return this.$message.warning(res.msg);
+      // 根据id获取信息
+    },
+    deltTab(id) {
+      this.$confirm(
+        "确定删除吗? 当前模块下如果存在数据,也会一并删除.",
+        "提示",
+        {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        }
+      ).then(async () => {
+        let res = await getTabDelById(id);
+        if (res.code === 0) {
+          this.$message.success("删除成功!");
+          this.$router.push("/study/info");
+          this.goodsModuleId = 4;
+          this.getTabStudyList();
+        } else return this.$message.warning(res.msg);
+      });
+    },
+    //------------------点击新增模块
+    async addTabOK() {
+      if (this.ruleForm.name.trim() === "")
+        return this.$message.warning("模块名称不能为空");
+      else {
+        let res = await addTabStudyList(this.ruleForm);
+        if (res.code === 0) {
+          this.getTabStudyList();
+          this.isShow = false;
+          this.addTabX();
+          this.$message.success("操作成功");
+        } else this.$message.warning(res.msg);
+      }
+    },
+    addTabX() {
+      this.ruleForm = {
+        name: "",
+        type: "share", 
+      };
+      this.isShow = false;
+    },
+    //----------------------- 新增模块结束
     selectStatus(item) {
       this.status = item.id;
     },
     handleMenu(data) {
+      // 把索引存起来
+      localStorage.setItem("XJ_studyModuleId", data.id);
+      this.goodsModuleId = data.id;
       this.$router.push({
-        params: { ...this.$route.params, type: data },
+        params: { ...this.$route.params, type: data.type, id: data.id },
       });
     },
-    
-    
+
     getList() {
       let { inputKey, date } = this.search;
       getList(
@@ -124,44 +278,82 @@ export default {
           searchKey: inputKey,
           status: this.status == "all" ? "" : this.status,
           type: this.subMenu,
+          goodsModuleId: this.goodsModuleId,
         },
         (data) => {
           this.list = data.data;
         }
       );
     },
+    //封装获取tab列表的方法
+    async getTabStudyList() {
+      let res = await getTabStudyList();
+      this.menu = res.data;
+    },
   },
   computed: {
     ...mapGetters({
       activeMenu: "activeMenu",
-      activeSub:"activeSub"
+      activeSub: "activeSub",
     }),
     data() {
       return raw[this.$route.params.type];
     },
-    subMenu(){
-      return this.$route.params.type
-    }
+    subMenu() {
+      return this.$route.params.type;
+    },
   },
   watch: {
-    subMenu:{
-      deep:true,
-      immediate:true,
-      handler:function (newVal) {
-        this.getAuth(this.activeMenu,menuStr[newVal])
+    goodsModuleId:{
+      deep: true,
+      handler: function () {
+        this.getAuth(this.activeMenu, menuStr[this.subMenu]);
         this.getList();
-      }
+      },
+    },
+    // subMenu: {
+    //   deep: true,
+    //   immediate: true,
+    //   handler: function (newVal) {
+    //     this.getAuth(this.activeMenu, menuStr[newVal]);
+    //     this.getList();
+    //   },
+    // },
+    activeMenu: {
+      deep: true,
+      immediate: true,
+      handler: function (newVal) {
+        this.getAuth(newVal, menuStr[this.subMenu]);
+      },
     },
-    activeMenu:{
-      deep:true,
-      immediate:true,
-      handler:function (newVal) {
-        this.getAuth(newVal,menuStr[this.subMenu])
-      }
-    }
   },
   mounted() {
     this.getList();
   },
+  created() {
+    // 调用获取tab列表方法
+    let myId = localStorage.getItem("XJ_studyModuleId");
+    if (myId) this.goodsModuleId = Number(myId);
+    else this.goodsModuleId = 1;
+    this.getTabStudyList();
+    //获取自定义模块的权限
+    let temp = localStorage.getItem("XJ_limits_ZDY");
+    temp = JSON.parse(temp).XXYD;
+    this.limitsEdit = temp[0].authority;
+  },
 };
 </script>
+<style lang="less" scoped>
+.myTab4 {
+  .tablecon {
+    position: relative;
+    .addTab {
+      width: 201px;
+      z-index: 10;
+      position: absolute;
+      left: 0px;
+      top: 0px;
+    }
+  }
+}
+</style>

+ 9 - 1
new_backstage/src/pages/layout/aside.vue

@@ -67,6 +67,10 @@ export default {
       if (item.id === 200 && this.$route.path !== "/collection/model") {
         localStorage.setItem("XJ_goodsModuleId", 1);
       }
+      //当前页面不在学习园地,进入学习园地的时候把本地存储id变成4
+      if (item.id === 400 && this.$route.path !== "/study/share") {
+        localStorage.setItem("XJ_studyModuleId", 4);
+      }
       let path = {
         path: `/${item.key}${
           item.param ? `/${item.param.map((tt) => tt.default).join("/")}` : ""
@@ -82,9 +86,13 @@ export default {
       });
       // console.log(123,result);
       // 把权限本地存储起来,用来管理新增的功能自定义模块
+      let XJ_limits_ZDY ={
+        JPDC:result.data[1].children[3].children,
+        XXYD:result.data[3].children[2].children
+      }
       localStorage.setItem(
         "XJ_limits_ZDY",
-        JSON.stringify(result.data[1].children[3].children)
+        JSON.stringify(XJ_limits_ZDY)
       );
 
       this.tmpRoute = routes.filter((item) => {

+ 5 - 4
web/src/config/api.js

@@ -284,11 +284,11 @@ export function getNewsDetail(data, cb=()=>{}) {
   });
 }
 
-// 获取精品典藏tab列表
-export const getTabList = () => {
+// 获取精品典藏tab列表和学习园地
+export const getTabList = (type) => {
   return axios({
     method: 'post',
-    url: 'api/web/goods/module/list',
+    url: `api/web/goods/module/list/${type}`,
   })
 }
 
@@ -340,4 +340,5 @@ export const webMesCheck = () => {
     method: 'get',
     url: '/cms/web/manage/check/message',
   })
-}
+}
+

+ 16 - 10
web/src/views/collection/Collection.vue

@@ -4,15 +4,15 @@
       <ul>
         <li
           class="collectionHover"
-          @mouseenter="moveLike=i"
-          @mouseleave="moveLike=null"
+          @mouseenter="moveLike = i"
+          @mouseleave="moveLike = null"
           @click="clickItem($event, item)"
           v-for="(item, i) in tableData"
           :key="i"
         >
           <div>
             <!-- 点赞和投票 -->
-            <i class="like" v-show="moveLike===i">
+            <i class="like" v-show="moveLike === i">
               <img
                 v-if="item.isLike"
                 v-show="likeOFF.isLike"
@@ -78,7 +78,12 @@
 <script>
 import "element-ui/lib/theme-chalk/index.css";
 import { Notification } from "element-ui";
-import { goodsLikeApi, goodsLikeDelApi, goodsVoteApi,goodsVoteDelApi } from "@/config/api";
+import {
+  goodsLikeApi,
+  goodsLikeDelApi,
+  goodsVoteApi,
+  goodsVoteDelApi,
+} from "@/config/api";
 import Paging from "@/components/Paging";
 
 export default {
@@ -96,7 +101,7 @@ export default {
   },
   data() {
     return {
-      moveLike:null
+      moveLike: null,
     };
   },
   mounted() {},
@@ -108,6 +113,7 @@ export default {
         (e.path[0].className === "like_img" || e.path[0].className === "like")
       )
         return;
+      if (item.link) return window.open(item.link);
       this.$showBroadcast({
         item,
         zhuti: this.theme,
@@ -121,7 +127,7 @@ export default {
       });
       if (res.code === 0) {
         this.infoTitle("点赞成功", "success");
-        this.$emit('upLike')
+        this.$emit("upLike");
       }
     },
     //点击取消点赞
@@ -129,7 +135,7 @@ export default {
       let res = await goodsLikeDelApi(id);
       if (res.code === 0) {
         this.infoTitle("取消点赞成功", "success");
-        this.$emit('upLike')
+        this.$emit("upLike");
       }
     },
     // 点击投票
@@ -140,15 +146,15 @@ export default {
       });
       if (res.code === 0) {
         this.infoTitle("投票成功", "success");
-        this.$emit('upLike')
+        this.$emit("upLike");
       }
     },
     // 点击取消投票
-   async voteNo(id) {
+    async voteNo(id) {
       let res = await goodsVoteDelApi(id);
       if (res.code === 0) {
         this.infoTitle("取消投票成功", "success");
-        this.$emit('upLike')
+        this.$emit("upLike");
       }
     },
     // 封装消息提示信息

+ 1 - 1
web/src/views/collection/index.vue

@@ -108,7 +108,7 @@ export default {
       }, 100);
     })
     // 获取经典检查tab栏列表
-    let res = await getTabList();
+    let res = await getTabList('goods');
     // console.log(998,res);
     this.type = res.data;
   },

+ 5 - 0
web/src/views/dynamic/detail.vue

@@ -58,6 +58,9 @@ export default {
     };
   },
   computed: {
+    goodsModuleId(){
+      return this.$route.params.goodsModuleId;
+    },
     activeId() {
       return this.$route.params.type;
     },
@@ -67,6 +70,7 @@ export default {
   },
   mounted() {
     this.getData();
+    console.log('-------',this.$route.params);
   },
   watch: {
     id(newVal) {
@@ -96,6 +100,7 @@ export default {
         pageSize: 1000,
         searchKey: this.searchKey,
         type: this.activeId,
+        goodsModuleId:this.goodsModuleId
       };
       getList("news", params, (res) => {
         res.data.list.forEach((item) => {

+ 26 - 19
web/src/views/dynamic/list.vue

@@ -5,7 +5,7 @@
         <li
           v-for="(item, i) in aside"
           @click="handleItem(item)"
-          :class="{ active: activeId == item.id }"
+          :class="{ active: activeInd == item.id }"
           class="liparimary"
           :key="i"
         >
@@ -32,7 +32,7 @@
 </template>
 
 <script>
-import { getList, getNewsDetail } from "@/config/api";
+import { getList, getNewsDetail,getTabList } from "@/config/api";
 import {title} from './data'
 
 import lrLayout from '@/components/lrLayout'
@@ -41,16 +41,18 @@ export default {
   components:{lrLayout},
   data() {
     return {
-      aside: [
-        {
-          name: "知识阅览",
-          id: "info",
-        },
-        {
-          name: "知识共享",
-          id: "share",
-        },
-      ],
+      aside:[],
+      activeInd:4,
+      // aside: [
+      //   {
+      //     name: "知识阅览",
+      //     id: "info",
+      //   },
+      //   {
+      //     name: "知识共享",
+      //     id: "share",
+      //   },
+      // ],
       title,
       list:[],
       searchKey:''
@@ -61,11 +63,13 @@ export default {
       return this.$route.params.type;
     },
   },
-  mounted() {
+async  mounted() {
     this.getData()
+    let res = await getTabList('news');
+    this.aside=res.data
   },
   watch: {
-    activeId(){
+    activeInd(){
       this.getData()
     }
   },
@@ -78,7 +82,8 @@ export default {
       getNewsDetail({id})
     },
     handleItem(item) {
-      this.$router.push({ params: { type: item.id } });
+      this.activeInd = item.id
+      this.$router.push({ params: { type: item.type,goodsModuleId:item.id } });
     },
     handleLi(item){
       console.log(item);
@@ -88,7 +93,7 @@ export default {
         window.open(url,'_blank')
       }
       else{
-        this.$router.push({ params: {key:'detail', id: item.id } });
+        this.$router.push({ params: {key:'detail', id: item.id,goodsModuleId:item.goodsModuleId } });
       }
     },
     pageChange(data) {
@@ -99,7 +104,8 @@ export default {
         pageNum: 1,
         pageSize: 1000,
         searchKey: this.searchKey,
-        type: this.activeId,
+        goodsModuleId:this.activeInd
+        // type: this.activeId,
       };
       getList("news", params, (res) => {
         res.data.list.forEach(item => {
@@ -116,7 +122,8 @@ export default {
   .content {
     background: #fff;
     width: 100%;
-    padding: 56px 0;
+    max-height: 480px;
+    overflow-y: auto;
     > li {
       height: 80px;
       line-height: 80px;
@@ -144,7 +151,7 @@ export default {
         display: inline-block;
         position: relative;
         color: #999;
-        font-size: 20px;
+        font-size: 18px;
         &::before {
           position: absolute;
           top: 50%;