@ -0,0 +1,36 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询新闻列表
|
||||
export function listNews(query) {
|
||||
return request({
|
||||
url: '/portal/news/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 新增新闻
|
||||
export function addNews(data) {
|
||||
return request({
|
||||
url: '/portal/news/add',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改新闻
|
||||
export function updateNews(data) {
|
||||
return request({
|
||||
url: '/portal/news/update',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除新闻
|
||||
export function deleteNews(newsId) {
|
||||
return request({
|
||||
url: '/portal/news/delete/' + newsId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 284 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 256 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 170 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 254 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 176 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 206 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 289 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 248 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 280 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 232 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 121 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 75 KiB |
|
Before Width: | Height: | Size: 9.7 KiB After Width: | Height: | Size: 88 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 244 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 128 KiB |
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 272 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 119 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 133 KiB |
|
After Width: | Height: | Size: 188 KiB |
|
After Width: | Height: | Size: 202 KiB |
|
After Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 163 KiB |
|
After Width: | Height: | Size: 86 KiB |
|
After Width: | Height: | Size: 118 KiB |
|
After Width: | Height: | Size: 153 KiB |
|
After Width: | Height: | Size: 184 KiB |
|
After Width: | Height: | Size: 61 KiB |
|
After Width: | Height: | Size: 151 KiB |
|
After Width: | Height: | Size: 147 KiB |
|
After Width: | Height: | Size: 151 KiB |
|
After Width: | Height: | Size: 211 KiB |
|
After Width: | Height: | Size: 98 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 126 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 102 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 159 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 73 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 84 KiB |
@ -0,0 +1,173 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="title">NEWS CENTER</div>
|
||||
<div class="subTitle">新闻中心</div>
|
||||
<div class="newsList">
|
||||
<div v-for="i in data" class="newsItem">
|
||||
<div class="newsDay">{{ i.day }}</div>
|
||||
<div class="newsTime">{{ i.time }}</div>
|
||||
<div class="newsTitle">{{ i.title }}</div>
|
||||
<div class="newsImage">
|
||||
<el-image
|
||||
style="width: 100%;height: 100%"
|
||||
:src="i.img"
|
||||
fit="contain"></el-image>
|
||||
</div>
|
||||
<div class="newsInfo">
|
||||
{{ i.info }}
|
||||
</div>
|
||||
<div class="newsDetail" @click="viewDetail(i)">查看详情 ></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="learnMore">
|
||||
<el-button type="primary" plain>查看更多</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'ProductCenter',
|
||||
props: ['data'],
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
viewDetail(e) {
|
||||
this.$router.push({
|
||||
path: '/newsDetail',
|
||||
query: {id: e.id}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
@import "~@/style.less";
|
||||
|
||||
.content {
|
||||
width: 70vw;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.title {
|
||||
margin-top: 4.2vw;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 2.5vw;
|
||||
letter-spacing: 2px;
|
||||
color: #0003;
|
||||
}
|
||||
|
||||
.subTitle {
|
||||
margin-top: 0.4vw;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 1.9vw;
|
||||
letter-spacing: 2px;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.newsList {
|
||||
margin-top: 3.9vw;
|
||||
|
||||
.newsItem {
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
display: inline-block;
|
||||
width: 17vw;
|
||||
margin: 0 1vw;
|
||||
background-color: #f8f8f8;
|
||||
text-align: left;
|
||||
padding: 1.5vw;
|
||||
|
||||
.newsDay {
|
||||
margin-top: 0.7vw;
|
||||
font-size: 2.9vw;
|
||||
color: #000;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.newsTime {
|
||||
font-size: 1.1vw;
|
||||
margin-top: 0.15vw;
|
||||
color: #666;
|
||||
transition: all 0.2s;
|
||||
letter-spacing: 2px;
|
||||
}
|
||||
|
||||
.newsTitle {
|
||||
margin-top: 0.8vw;
|
||||
font-size: 1.2vw;
|
||||
color: #000;
|
||||
transition: all 0.2s;
|
||||
line-height: 1.9vw;
|
||||
letter-spacing: 3px;
|
||||
}
|
||||
|
||||
.newsImage {
|
||||
margin-top: 1vw;
|
||||
width: 100%;
|
||||
height: 10.4vw;
|
||||
}
|
||||
|
||||
.newsInfo {
|
||||
margin-top: 0.85vw;
|
||||
font-size: 0.9vw;
|
||||
color: #666;
|
||||
transition: all 0.2s;
|
||||
line-height: 1.4vw;
|
||||
}
|
||||
|
||||
.newsDetail {
|
||||
margin-top: 1vw;
|
||||
font-size: 1vw;
|
||||
color: @standard-color;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
}
|
||||
|
||||
.newsItem:hover {
|
||||
background-color: @standard-color;
|
||||
|
||||
.newsDay {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.newsTime {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.newsTitle {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.newsInfo {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.newsDetail {
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.learnMore {
|
||||
margin-top: 3.2vw;
|
||||
|
||||
/deep/ .el-button {
|
||||
background-color: #0000;
|
||||
padding: 1vw 3vw;
|
||||
border-color: @standard-color;
|
||||
|
||||
span {
|
||||
font-size: 1.2vw;
|
||||
letter-spacing: 3px;
|
||||
color: @standard-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,46 @@
|
||||
<template>
|
||||
<div>
|
||||
|
||||
<div id="quill-container" class="ql-container ql-snow">
|
||||
<div style="text-align: left" class="ql-editor">
|
||||
<div v-html="newsData"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<vue-editor
|
||||
v-show="false"
|
||||
ref="editor"
|
||||
v-model="newsData"
|
||||
:useCustomImageHandler="true"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {VueEditor} from "vue2-editor";
|
||||
import {getHwWeb} from "@/api/hwWeb";
|
||||
|
||||
export default {
|
||||
components: {VueEditor},
|
||||
|
||||
data: () => ({
|
||||
newsData: ""
|
||||
}),
|
||||
watch: {
|
||||
'$route': {
|
||||
handler() {
|
||||
this.getData()
|
||||
},
|
||||
deep: true,
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
getHwWeb(-1).then(res => {
|
||||
let data = JSON.parse(res?.data?.webJsonString || '{}')?.news
|
||||
this.newsData = data.find(e => e.id == this.$route.query.id)?.detail || ''
|
||||
})
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||