浏览代码

修改首页

version2.0
chutingting 4 年前
父节点
当前提交
9ef30b4be9
共有 2 个文件被更改,包括 8 次插入7 次删除
  1. +3
    -3
      src/page/cultivate/particulars.vue
  2. +5
    -4
      src/page/home/home.vue

+ 3
- 3
src/page/cultivate/particulars.vue 查看文件

@@ -2,9 +2,9 @@
<div class="Box"> <div class="Box">
<textTitle :text="textTop" /> <textTitle :text="textTop" />
<div class="info"> <div class="info">
<div class="info_img">
<el-card class="info_img">
<img :src="data.mainPicRealPath" alt=""> <img :src="data.mainPicRealPath" alt="">
</div>
</el-card>
<div class="info_list"> <div class="info_list">
<p>标题:<span>{{data.title}}</span></p> <p>标题:<span>{{data.title}}</span></p>
<p>日期:<span>{{data.publishDate}}</span></p> <p>日期:<span>{{data.publishDate}}</span></p>
@@ -126,7 +126,7 @@ export default {
} }
.info_list{ .info_list{
float: left; float: left;
margin-left: 30px;
margin-left: 40px;
p{ p{
line-height: 40px; line-height: 40px;
color: #444; color: #444;


+ 5
- 4
src/page/home/home.vue 查看文件

@@ -162,13 +162,13 @@ export default {
}) })
}, },
/* 新闻列表 */ /* 新闻列表 */
getNewsList() {
getData() {
let data = { let data = {
// type: 1, // type: 1,
pageNum: 1, pageNum: 1,
pageSize: 90
pageSize: 100
} }
homeService.getNewsList(data).then(res => {
homeService.getData(data).then(res => {
res.list.forEach(ele => { res.list.forEach(ele => {
if (ele.type == 4) { // 生活服务 if (ele.type == 4) { // 生活服务
this.lifeList.push(ele) this.lifeList.push(ele)
@@ -203,7 +203,7 @@ export default {
}, },
created() { created() {
this.getSlideList() this.getSlideList()
this.getNewsList()
this.getData()
} }
}; };
</script> </script>
@@ -236,6 +236,7 @@ export default {
line-height: 22px; line-height: 22px;
padding: 4px 0; padding: 4px 0;
height: 22px; height: 22px;
white-space: nowrap;
a{ a{
color: #333; color: #333;
} }


正在加载...
取消
保存