Commit 3a13e7f8 authored by 吴冠's avatar 吴冠

优化底部三大模块

parent 8651969f
......@@ -220,4 +220,12 @@ export function phoneCode1(data){
method:'post',
data:data
})
}
//信息公告详情
export function getnewsdetails(id){
return request({
url:`/news/content/${id}`,
method:'get',
})
}
\ No newline at end of file
......@@ -3,7 +3,15 @@
<Nuxt />
</div>
</template>
<script>
export default {
data(){
return{
}
},
}
</script>
<style>
html {
font-family:
......
......@@ -3,7 +3,7 @@
<Head></Head>
<Homeinput></Homeinput>
<Nav></Nav>
<nuxt></nuxt>
<nuxt ></nuxt>
<Footer></Footer>
</div>
</template>
......@@ -16,6 +16,11 @@
import Homeinput from '~/components/homeinput'
export default {
name: "homePage",
data () {
return {
}
},
components: {
Head,
Nav,
......
......@@ -35,8 +35,8 @@
<div class="more t1 list-con" @click="latformDynamics">更多></div>
</div>
<ul>
<li v-for="(item,index) in dynamic1" :key="index" v-show="index<5" class="flex-between list-con" @click="latformDynamics">
<nuxt-link tag="div" :to="{name:'index-message-news',params:{id:(item.id)}}">{{item.title}}</nuxt-link>
<li v-for="(item,index) in dynamic1" :key="index" v-show="index<5" class="flex-between list-con" >
<nuxt-link tag="div" :to="{name:'index-message-newsdetails',query:{id:(item.id)}}">{{item.title}}</nuxt-link>
<div class="time">{{item.createTime.slice(0,10)}}</div>
</li>
</ul>
......@@ -47,8 +47,8 @@
<div class="more t1 list-con" @click="lawsRegulations">更多></div>
</div>
<ul>
<li v-for="(item,index) in dynamic2" :key="index" v-show="index<5" class="flex-between list-con" @click="lawsRegulations">
<nuxt-link tag="div" :to="{name:'index-message-news',query:{id:(item.id)}}" >{{item.title}}</nuxt-link>
<li v-for="(item,index) in dynamic2" :key="index" v-show="index<5" class="flex-between list-con" >
<nuxt-link tag="div" :to="{name:'index-message-newsdetails',query:{id:(item.id)}}"" >{{item.title}}</nuxt-link>
<div class="time">{{item.createTime.slice(0,10)}}</div>
</li>
</ul>
......@@ -60,7 +60,7 @@
</div>
<ul>
<li v-for="(item,index) in dynamic3" :key="index" v-show="index<5" class="flex-between list-con" >
<nuxt-link tag="div" :to="{name:'index-message-news',query:{id:(item.id)}}">{{item.title}}</nuxt-link>
<nuxt-link tag="div" :to="{name:'index-message-newsdetails',query:{id:(item.id)}}">{{item.title}}</nuxt-link>
<div class="time">{{item.createTime.slice(0,10)}}</div>
</li>
</ul>
......@@ -90,9 +90,9 @@ import {getSecond,getListSite,getListSite1,getListSite2} from '@/common/list.js'
this.getListSite()
this.getListSite1()
this.getListSite2()
if(window.location.pathname =="/notice/all"){
/* if(window.location.pathname =="/notice/all"){
this.nav = "4"
}
} */
},
methods:{
latformDynamics(){
......
......@@ -5,7 +5,7 @@
<div class="flex-center">
<div class="flex">
<!-- <Aside class="aside"></Aside> -->
<nuxt></nuxt>
<nuxt ></nuxt>
</div>
</div>
</div>
......@@ -20,6 +20,11 @@
import Aside from '~/components/messageAside'
import Bread from '~/components/bread'
export default {
data(){
return{
}
},
name: "notice",
components: {
Head,
......
......@@ -3,17 +3,17 @@
<div class='sidebar'>
<div class="sidebar-title">信息公告</div>
<el-col :span="12">
<el-menu :default-active="123+''" class="el-menu-vertical-demo" @select="handleSelect">
<el-menu-item :index = "item.id +''" v-for="item in artList" :key="item.id"> <!-- :index="`?id=${item.id}`" -->
<el-menu :default-active="activeName" class="el-menu-vertical-demo" @select="handleSelect">
<el-menu-item :index = "item.id +''" v-for="item in artList" :key="item.id" router> <!-- :index="`?id=${item.id}`" -->
<i class="el-icon-menu"></i>
<span slot="title">{{item.title}}</span>
</el-menu-item>
</el-menu>
</el-col>
</div>
<ul v-show="isList">
<li v-for="item in messageList" :key="item.id" @click="urlChage">
<nuxt-link :to="{name:'index-message-news',params:{id:(item.id)}}" :messageContext="item" class="flex-between link-style" router>
<ul >
<li v-for="item in messageList" :key="item.id" >
<nuxt-link :to="{name:'index-message-newsdetails',query:{id:(item.id)}}" class="flex-between link-style" >
<div class="t2">{{item.title}}</div>
<div class="t1">发布时间:{{item.createTime}}</div>
</nuxt-link>
......@@ -30,7 +30,7 @@
</div>
</ul>
<div v-for="item in messageList" :key="item.id" class="content" v-show="!isList">
<!-- <div v-for="item in messageList" :key="item.id" class="content" v-show="!isList">
<h1>{{item.title}}</h1>
<div class="flex-center pos">
<span style="margin-right:20px">发布时间:{{item.createTime}}</span>
......@@ -40,7 +40,7 @@
<div class="flex-center" style="margin-buttom:40px">
<el-button type="primary" @click="returnPrev" style="margin-top:50px">返回</el-button>
</div>
</div>
</div> -->
</div>
</template>
<script>
......@@ -49,19 +49,22 @@ import {
getCategoryList,
} from '@/common/list.js'
export default {
name: 'cardApplyQuery',
mounted(){
this.getCategoryList()
let message = {}
message.currentPage = 1
message.size = 10
message.cateId = 123
let type = window.location.href.split("?id=")[1]
this.activeName = type
message.cateId = this.activeName
this.getListContent(message)
},
data() {
return {
contentList:'',
isList:true,
activeName: '1',
activeName: '123',
conText:"",
activeIndex: '',
size:10,
......@@ -86,18 +89,12 @@ import {
}
},
methods:{
returnPrev(){
this.isList = true
},
urlChage(){
this.isList = !this.isList
},
handleSelect(key, keyPath) {
let keyValue = key/* .slice(4) */
let message = {}
message.cateId = keyValue
this.getListContent(message,keyValue)
this.isList = false
this.getListContent(message)
},
//分类列表
async getCategoryList(){
......
<template>
<div class="sty">
<div class="content">
<h1>{{title}}</h1>
<div class="flex-center pos">
<span style="margin-right:20px">发布时间:{{date}}</span>
<span>作者:{{author}}</span>
</div>
<div v-html = "contentList" style="width:600px;margin:0 auto"></div>
<div class="flex-center" style="margin-buttom:40px">
<el-button type="primary" style="margin-top:50px" @click="back" >返回</el-button>
</div>
</div>
</div>
</template>
<script>
import {getnewsdetails} from '@/common/list.js'
export default {
name: 'cardApplyQuery',
data(){
return{
messageList:[],
title:'',
date:'',
author:'',
contentList:[]
}
},
mounted(){
let id = this.$route.query.id
this.getnewsdetails(id)
console.log(id+'+++++++++++++++++')
},
methods:{
back(){
/* this.$router.back() */
window.history.back(-1)
},
async getnewsdetails(id){
const {data} = await getnewsdetails(id)
/* console.log(data+'---------------') */
this.messageList = data
this.title = data.title
this.date = data.createTime
this.author = data.author
this.contentList = data.content
console.log(data)
console.log(this.messageList)
}
}
}
</script>
<style scoped>
.sty,.content{
width:9.2rem;
border:1px solid black;
}
h1{
text-align: center;
margin-top:20px;
margin-bottom: 50px;
}
.pos{
margin-bottom: 50px;
}
</style>
\ No newline at end of file
......@@ -68,7 +68,7 @@ export default {
},
mounted(){
let id = this.$route.query.id
let id = this.$route.params.id
this.getCadidateDetails(id)
},
methods:{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment