Compare commits
No commits in common. 'main' and 'master' have entirely different histories.
@ -1,35 +0,0 @@
|
||||
# ---> Android
|
||||
# Gradle files
|
||||
.gradle/
|
||||
build/
|
||||
|
||||
# Local configuration file (sdk path, etc)
|
||||
local.properties
|
||||
|
||||
# Log/OS Files
|
||||
*.log
|
||||
|
||||
# Android Studio generated files and folders
|
||||
captures/
|
||||
.externalNativeBuild/
|
||||
.cxx/
|
||||
*.apk
|
||||
output.json
|
||||
|
||||
# IntelliJ
|
||||
*.iml
|
||||
.idea/
|
||||
misc.xml
|
||||
deploymentTargetDropDown.xml
|
||||
render.experimental.xml
|
||||
|
||||
# Keystore files
|
||||
*.jks
|
||||
*.keystore
|
||||
|
||||
# Google Services (e.g. APIs or Firebase)
|
||||
google-services.json
|
||||
|
||||
# Android Profiling
|
||||
*.hprof
|
||||
|
||||
@ -0,0 +1 @@
|
||||
Subproject commit 86e187160624b16153ad5f1e456a1ddf184d7fc6
|
||||
@ -0,0 +1 @@
|
||||
1233
|
||||
@ -1,20 +0,0 @@
|
||||
Copyright (c) 1995-1999 The Apache Group. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. All advertising materials mentioning features or use of this software must display the following acknowledgment: "This product includes software developed by the Apache Group for use in the Apache HTTP server project (http://www.apache.org/)."
|
||||
|
||||
4. The names "Apache" and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org.
|
||||
|
||||
5. Products derived from this software may not be called "Apache" nor may "Apache" appear in their name, without prior written permission of the Apache Group.
|
||||
|
||||
6. Redistributions of any form whatsoever must retain the following acknowledgment:
|
||||
"This product includes software developed by the Apache Group for use in the Apache HTTP server project (http://www.apache.org/)."
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE GROUP OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
This software consists of voluntary contributions made by many individuals on behalf of the Apache Group and was originally based on public domain software written at the National Center for Supercomputing Applications, University of Illinois, Urbana-Champaign. For more information on the Apache Group and the Apache HTTP server project, please see <http://www.apache.org/>.
|
||||
@ -0,0 +1 @@
|
||||
System.out.printf("helloworlds")
|
||||
@ -0,0 +1,123 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-row>
|
||||
<el-col :span="7">
|
||||
<Banner :data="newsTopList" @on-click="onBannerClick" />
|
||||
</el-col>
|
||||
<el-col :span="17">
|
||||
<el-col @click.native="newsItemClick(news)" :span="6" :key="index" v-for="(news, index) in newsTopList">
|
||||
<div style="padding: 0 10px;">
|
||||
<img :src="news.cover" :alt="news.name" style="width: 100%;height: 118px;border-radius: 5px;">
|
||||
<h3 class="news-title">{{ news.name }}</h3>
|
||||
<div style="font-size: 12px;">
|
||||
<span class="news-tags">{{ news.tagName }}</span>
|
||||
<span style="margin-left: 10px;">{{ parseTime(news.createTime) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<TagLine :dataList="tagsList" @on-click="tagOnClick" />
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col @click.native="newsItemClick(news)" :span="4" :key="index" v-for="(news, index) in newsList">
|
||||
<div style="padding: 0 10px 10px 0;box-sizing: border-box;">
|
||||
<img :src="news.cover" :alt="news.name" style="width: 100%;height: 118px;border-radius: 5px;">
|
||||
<h3 class="news-title">{{ news.name }}</h3>
|
||||
<div style="font-size: 12px;">
|
||||
<span class="news-tags">{{ news.tagName }}</span>
|
||||
<span style="margin-left: 10px;">{{ parseTime(news.createTime) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import TagLine from "@/components/TagLine"
|
||||
import Banner from "@/components/Banner"
|
||||
import { timeAgo } from "@/utils/data"
|
||||
export default {
|
||||
components: { TagLine, Banner },
|
||||
data() {
|
||||
return {
|
||||
tagsList: [], // 标签列表
|
||||
newsList: [], // 健康资讯列表
|
||||
newsTopList: [], // 推荐的健康资讯数据列表
|
||||
newQueryDto: { tagId: null },
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.loadAllTags();
|
||||
this.loadAllNews();
|
||||
this.loadAllTopNews();
|
||||
},
|
||||
methods: {
|
||||
// 轮播图点击事件回传
|
||||
onBannerClick(banner) {
|
||||
sessionStorage.setItem('newsInfo', JSON.stringify(banner));
|
||||
this.$router.push('/news-detail');
|
||||
},
|
||||
// 健康资讯列表的项点击事件
|
||||
newsItemClick(news) {
|
||||
sessionStorage.setItem('newsInfo', JSON.stringify(news));
|
||||
this.$router.push('/news-detail');
|
||||
},
|
||||
// 转换时间
|
||||
parseTime(time) {
|
||||
return timeAgo(time);
|
||||
},
|
||||
tagOnClick(tags) {
|
||||
this.newQueryDto.tagId = tags.id;
|
||||
this.loadAllNews();
|
||||
},
|
||||
// 查询全部的标签记录
|
||||
loadAllTags() {
|
||||
this.$axios.post('/tags/query', {}).then(response => {
|
||||
const { data } = response;
|
||||
if (data.code === 200) {
|
||||
this.tagsList = data.data;
|
||||
}
|
||||
})
|
||||
},
|
||||
// 查标签下的资讯信息
|
||||
loadAllTopNews() {
|
||||
const newQueryDto = { isTop: true };
|
||||
this.$axios.post('/news/query', newQueryDto).then(response => {
|
||||
const { data } = response;
|
||||
if (data.code === 200) {
|
||||
this.newsTopList = data.data;
|
||||
}
|
||||
})
|
||||
},
|
||||
// 查标签下的资讯信息
|
||||
loadAllNews() {
|
||||
this.$axios.post('/news/query', this.newQueryDto).then(response => {
|
||||
const { data } = response;
|
||||
if (data.code === 200) {
|
||||
this.newsList = data.data;
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.news-tags {
|
||||
display: inline-block;
|
||||
padding: 2px 5px;
|
||||
background-color: rgb(222, 243, 251);
|
||||
color: #1d3cc4;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.news-title {
|
||||
overflow: hidden;
|
||||
/* 显示省略符号来代表被修剪的文本。 */
|
||||
text-overflow: ellipsis;
|
||||
/* 文本不换行 */
|
||||
white-space: nowrap;
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in new issue