|
@@ -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%;
|