|
|
|
@ -44,59 +44,30 @@ |
|
|
|
|
<div class="box2">{{ info.notice || '暂无信息' }}</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="btn"> |
|
|
|
|
<div class="btnTop"> |
|
|
|
|
<h3>留言交流</h3> |
|
|
|
|
<button>我要留言</button> |
|
|
|
|
</div> |
|
|
|
|
<div class="btnBtn"> |
|
|
|
|
<div class="left"> |
|
|
|
|
<div class="box"> |
|
|
|
|
<img width="90px" src="@/assets/images/mainHome/h.png" alt="" /> |
|
|
|
|
<div class="news-list"> |
|
|
|
|
<div class="item" v-for="i in newList" :key="i"> |
|
|
|
|
<div class="left" |
|
|
|
|
><div class="year">{{ i.publishTime.split('-')[0] }}-{{ i.publishTime.split('-')[1] }}</div |
|
|
|
|
><div class="day">{{ i.publishTime.split(' ')[0].split('-')[2] }}</div></div |
|
|
|
|
> |
|
|
|
|
<div class="right"> |
|
|
|
|
<div class="title">{{ i.title }}</div> |
|
|
|
|
<div class="editor">{{ i.source }}</div> |
|
|
|
|
<div class="description"><div v-html="i.info"></div></div> |
|
|
|
|
<div class="get-info" @click="onGetInfo(i)">查看详情</div> |
|
|
|
|
</div> |
|
|
|
|
游客123456 |
|
|
|
|
</div> |
|
|
|
|
<div class="right"> |
|
|
|
|
<p>什么时候仪器空闲,</p> |
|
|
|
|
<p>麻烦联系123456789,谢谢</p> |
|
|
|
|
<div class="time">发布时间:2024.10.16  17:26</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="btnBtn"> |
|
|
|
|
<div class="left"> |
|
|
|
|
<div class="box"> |
|
|
|
|
<img width="90px" src="@/assets/images/mainHome/h.png" alt="" /> |
|
|
|
|
</div> |
|
|
|
|
游客123456 |
|
|
|
|
</div> |
|
|
|
|
<div class="right"> |
|
|
|
|
<p>什么时候仪器空闲,</p> |
|
|
|
|
<p>麻烦联系123456789,谢谢</p> |
|
|
|
|
<div class="time">发布时间:2024.10.16  17:26</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="btnBtn"> |
|
|
|
|
<div class="left"> |
|
|
|
|
<div class="box"> |
|
|
|
|
<img width="90px" src="@/assets/images/mainHome/h.png" alt="" /> |
|
|
|
|
</div> |
|
|
|
|
游客123456 |
|
|
|
|
</div> |
|
|
|
|
<div class="right"> |
|
|
|
|
<p>什么时候仪器空闲,</p> |
|
|
|
|
<p>麻烦联系123456789,谢谢</p> |
|
|
|
|
<div class="time">发布时间:2024.10.16  17:26</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
<script setup> |
|
|
|
|
import { getindexnew } from '@/api/mainHome/index'; |
|
|
|
|
import { getindexnew, getindexcolumn, getindexarticle } from '@/api/mainHome/index'; |
|
|
|
|
import { ref } from 'vue'; |
|
|
|
|
import { useRoute } from 'vue-router'; |
|
|
|
|
import { useRoute,useRouter } from 'vue-router'; |
|
|
|
|
import aredData from 'china-area-data'; |
|
|
|
|
|
|
|
|
|
const router = useRouter(); |
|
|
|
|
const route = useRoute(); |
|
|
|
|
const info = ref({}); |
|
|
|
|
const cityName = ref(''); |
|
|
|
@ -104,11 +75,34 @@ |
|
|
|
|
const res = await getindexnew({ id: route.query.id }); |
|
|
|
|
info.value = res.records[0]; |
|
|
|
|
// console.log(aredData ); |
|
|
|
|
console.log(aredData[86][info.value.address.substring(0, 2) + '0000'] ); |
|
|
|
|
console.log(aredData[86][info.value.address.substring(0, 2) + '0000']); |
|
|
|
|
|
|
|
|
|
cityName.value = aredData[86][info.value.address.substring(0, 2) + '0000'] + aredData[info.value.address.substring(0, 4) + '00'][info.value.address]; |
|
|
|
|
cityName.value = |
|
|
|
|
aredData[86][info.value.address.substring(0, 2) + '0000'] + aredData[info.value.address.substring(0, 4) + '00'][info.value.address]; |
|
|
|
|
}; |
|
|
|
|
getInfo(); |
|
|
|
|
const columnId = ref(''); |
|
|
|
|
const getindexcolumnEvent = async () => { |
|
|
|
|
const res = await getindexcolumn(); |
|
|
|
|
console.log(res); |
|
|
|
|
columnId.value = res.find((item) => item.name === '技术交流').id; |
|
|
|
|
getindexarticleEvent(); |
|
|
|
|
}; |
|
|
|
|
getindexcolumnEvent(); |
|
|
|
|
const newList = ref([]); |
|
|
|
|
const getindexarticleEvent = async () => { |
|
|
|
|
const res = await getindexarticle({ columnId: columnId.value }); |
|
|
|
|
newList.value = res.records; |
|
|
|
|
}; |
|
|
|
|
const onGetInfo = (item) => { |
|
|
|
|
console.log(item); |
|
|
|
|
router.push({ |
|
|
|
|
path: '/main-home/newsInfo', |
|
|
|
|
query: { |
|
|
|
|
id: item.id, |
|
|
|
|
}, |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
</script> |
|
|
|
|
<style lang="less" scoped> |
|
|
|
|
.container { |
|
|
|
@ -191,7 +185,7 @@ |
|
|
|
|
|
|
|
|
|
.center { |
|
|
|
|
width: 100%; |
|
|
|
|
height: 1050px; |
|
|
|
|
// height: 1050px; |
|
|
|
|
background-color: #ffffff; |
|
|
|
|
padding: 50px; |
|
|
|
|
border-top: #ebebeb 1px solid; |
|
|
|
@ -210,7 +204,7 @@ |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.btn { |
|
|
|
|
height: 500px; |
|
|
|
|
// height: 500px; |
|
|
|
|
|
|
|
|
|
padding: 20px 0px 10px 30px; |
|
|
|
|
.btnTop { |
|
|
|
@ -258,4 +252,75 @@ |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.news-list { |
|
|
|
|
position: relative; |
|
|
|
|
width: calc(1200px - 415px); |
|
|
|
|
margin-right: 30px; |
|
|
|
|
min-height: 755px; |
|
|
|
|
padding-bottom: 80px; |
|
|
|
|
.item { |
|
|
|
|
display: flex; |
|
|
|
|
width: 100%; |
|
|
|
|
border-bottom: 2px solid #ccc; |
|
|
|
|
padding-bottom: 45px; |
|
|
|
|
margin-top: 40px; |
|
|
|
|
.left { |
|
|
|
|
width: 100px; |
|
|
|
|
height: 100px; |
|
|
|
|
border: 1px solid #ccc; |
|
|
|
|
display: flex; |
|
|
|
|
flex-direction: column; |
|
|
|
|
justify-content: center; |
|
|
|
|
align-items: center; |
|
|
|
|
.year { |
|
|
|
|
font-size: 16px; |
|
|
|
|
color: #333; |
|
|
|
|
} |
|
|
|
|
.day { |
|
|
|
|
font-size: 40px; |
|
|
|
|
font-weight: 600; |
|
|
|
|
color: #333; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.right { |
|
|
|
|
margin-left: 30px; |
|
|
|
|
.title { |
|
|
|
|
font-size: 22px; |
|
|
|
|
color: #000; |
|
|
|
|
font-weight: 600; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.editor { |
|
|
|
|
position: relative; |
|
|
|
|
font-size: 14px; |
|
|
|
|
color: #999; |
|
|
|
|
font-size: 14px; |
|
|
|
|
margin-top: 10px; |
|
|
|
|
} |
|
|
|
|
.editor::before { |
|
|
|
|
content: ''; |
|
|
|
|
display: block; |
|
|
|
|
position: absolute; |
|
|
|
|
width: 53px; |
|
|
|
|
bottom: -15px; |
|
|
|
|
height: 4px; |
|
|
|
|
background-color: #d9d9d9; |
|
|
|
|
} |
|
|
|
|
.description { |
|
|
|
|
margin-top: 30px; |
|
|
|
|
width: 660px; |
|
|
|
|
} |
|
|
|
|
.get-info { |
|
|
|
|
color: #fff; |
|
|
|
|
width: 132px; |
|
|
|
|
height: 40px; |
|
|
|
|
text-align: center; |
|
|
|
|
line-height: 40px; |
|
|
|
|
margin-top: 30px; |
|
|
|
|
background-color: #002e97; |
|
|
|
|
cursor: pointer; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|