|
@@ -4,7 +4,7 @@
|
|
|
<div class="swiper">
|
|
|
<el-carousel :interval="5000" type="card" height="200px" class="swiper-box">
|
|
|
<el-carousel-item v-for="(r,index) in rotation" :key="index" class="swiper-box-item">
|
|
|
- <img :src="image(r.image)" class="swiper-img" @click="newsTo(0,r)">
|
|
|
+ <img :src="r.image" class="swiper-img" @click="newsTo(0,r)">
|
|
|
<div class="title">
|
|
|
{{ r.title }}
|
|
|
</div>
|
|
@@ -17,7 +17,7 @@
|
|
|
</div>
|
|
|
<div class="list">
|
|
|
<div class="item" v-for="(n,index) in partakeList" @click="navTo(index)">
|
|
|
- <img :src="image(n.image)" class="iNimg">
|
|
|
+ <img :src="n.image" class="iNimg">
|
|
|
<div class="name">
|
|
|
{{ n.title }}
|
|
|
</div>
|
|
@@ -29,8 +29,8 @@
|
|
|
市红十字会新闻 <div class="more" @click="urlTo('news')">【查看更多】</div>
|
|
|
</div>
|
|
|
<div class="list chooseitem">
|
|
|
- <div class="item" v-for="c in cityNewsList" @click="newsTo(0,c)">
|
|
|
- <div class="title" :title="c.title">
|
|
|
+ <div class="item" v-for="c in cityNewsList" @click="newsTo(0,c)" :title="c.title">
|
|
|
+ <div class="title">
|
|
|
<div class="spot"></div>
|
|
|
<div class="nowarp">
|
|
|
{{ c.title }}
|
|
@@ -80,8 +80,8 @@
|
|
|
县市区红十字新闻 <div class="more" @click="urlTo('news',1)">【查看更多】</div>
|
|
|
</div>
|
|
|
<div class="list chooseitem">
|
|
|
- <div class="item" v-for="c in countyNewsList" @click="newsTo(1,c)">
|
|
|
- <div class="title" :title="c.title">
|
|
|
+ <div class="item" v-for="c in countyNewsList" @click="newsTo(1,c)" :title="c.title">
|
|
|
+ <div class="title">
|
|
|
<div class="spot"></div>
|
|
|
<div class="nowarp">
|
|
|
{{ c.title }}
|
|
@@ -95,11 +95,11 @@
|
|
|
</div>
|
|
|
<div class="box">
|
|
|
<div class="title title2">
|
|
|
- 公示/公告 <div class="more" @click="urlTo('news',3)">【查看更多】</div>
|
|
|
+ 公示/公告 <div class="more" @click="urlTo('news',2)">【查看更多】</div>
|
|
|
</div>
|
|
|
<div class="list chooseitem">
|
|
|
- <div class="item" v-for="p in publicityList" @click="newsTo(3,p)">
|
|
|
- <div class="title" :title="p.title">
|
|
|
+ <div class="item" v-for="p in publicityList" @click="newsTo(3,p)" :title="p.title">
|
|
|
+ <div class="title">
|
|
|
<div class="spot"></div>
|
|
|
<div class="nowarp">
|
|
|
{{ p.title }}
|
|
@@ -127,7 +127,7 @@
|
|
|
</div>
|
|
|
<slideLaR class="slideLaR">
|
|
|
<div class="item" v-for="(l,index) in wallList" @click="volunteerTo(l.id)">
|
|
|
- <img :src="image(l.image)" >
|
|
|
+ <img :src="l.image" >
|
|
|
</div>
|
|
|
</slideLaR>
|
|
|
</div>
|
|
@@ -137,8 +137,8 @@
|
|
|
微信公众号
|
|
|
</div>
|
|
|
<div class="qrcode">
|
|
|
- <div class="">
|
|
|
- <img src="../assets/img/scanning.png" class="scanning">
|
|
|
+ <div class="header">
|
|
|
+ <img src="../assets/img/sm.png" class="scanning">
|
|
|
<div> 请扫码关注<br>荆门市红十字会<br>官方微信公众号 </div>
|
|
|
</div>
|
|
|
<div class="qrcodeImg">
|
|
@@ -196,11 +196,11 @@ import slideLaR from '../components/slideLaR.vue'
|
|
|
},
|
|
|
{
|
|
|
img: require('@/assets/img/yq4.png'),
|
|
|
- url: 'http://www.hbmdp.org.cn/'
|
|
|
+ url: 'http://www.hbqgjx.com/'
|
|
|
},
|
|
|
{
|
|
|
img: require('@/assets/img/yq5.png'),
|
|
|
- url: 'http://www.hbqgjx.com/'
|
|
|
+ url: 'http://www.hbmdp.org.cn/'
|
|
|
},
|
|
|
|
|
|
]
|
|
@@ -230,7 +230,7 @@ import slideLaR from '../components/slideLaR.vue'
|
|
|
},
|
|
|
// 优秀志愿者
|
|
|
getWallList() {
|
|
|
- getArticList({page:1,limit:15},21).then(({data}) => {
|
|
|
+ getArticList({page:1,limit:30},21).then(({data}) => {
|
|
|
this.wallList = data.list
|
|
|
this.$store.commit('setWallList',data.list)
|
|
|
})
|
|
@@ -241,7 +241,7 @@ import slideLaR from '../components/slideLaR.vue'
|
|
|
},
|
|
|
// 爱心榜
|
|
|
getlaveListson() {
|
|
|
- getlaveList({page:1,limit:2}).then(res => {
|
|
|
+ getlaveList({page:1,limit:10}).then(res => {
|
|
|
this.rankingList = res.data.data
|
|
|
this.$store.commit('setRankingList',res.data.data)
|
|
|
})
|
|
@@ -249,33 +249,51 @@ import slideLaR from '../components/slideLaR.vue'
|
|
|
// 新闻
|
|
|
getNewsList() {
|
|
|
// 市红十字会新闻
|
|
|
- getArticList({},27,1,10).then(({data}) => {
|
|
|
+ getArticList({page:1,limit:10},27).then(({data}) => {
|
|
|
this.cityNewsList = data.list
|
|
|
this.$store.commit('setCityNewsList',data.list)
|
|
|
})
|
|
|
// 县市区红十字新闻
|
|
|
- getArticList({},28,1,10).then(({data}) => {
|
|
|
+ getArticList({page:1,limit:5},28).then(({data}) => {
|
|
|
this.countyNewsList = data.list
|
|
|
this.$store.commit('setCountyNewsList',data.list)
|
|
|
})
|
|
|
// 公示/公告
|
|
|
- getArticList({},30,1,10).then(({data}) => {
|
|
|
- this.publicityList = data.list
|
|
|
- this.$store.commit('setPublicityList',data.list)
|
|
|
+ getArticList({page:1,limit:10},30,29).then(e => {
|
|
|
+ const data = e.data.list
|
|
|
+ getArticList({page:1,limit:10},29).then(res => {
|
|
|
+ const lastData = data.concat(res.data.list)
|
|
|
+ this.publicityList = lastData.sort( this.compare( "releasetime"));
|
|
|
+ this.$store.commit('setPublicityList',this.publicityList)
|
|
|
+ })
|
|
|
})
|
|
|
this.toTop()
|
|
|
},
|
|
|
+ //定义一个比较器
|
|
|
+ compare( propertyName) {
|
|
|
+ return function( object1, object2) {
|
|
|
+ var value1 = object1[propertyName];
|
|
|
+ var value2 = object2[propertyName];
|
|
|
+ if (value2 > value1) {
|
|
|
+ return 1;
|
|
|
+ } else if (value2 < value1) {
|
|
|
+ return - 1;
|
|
|
+ } else {
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
// 跳转页面
|
|
|
urlTo(name,navChoose) {
|
|
|
this.$router.push({
|
|
|
name: name,
|
|
|
- params:{navChoose :navChoose || 0}
|
|
|
+ params:{navChoose: navChoose || 0}
|
|
|
})
|
|
|
this.toTop()
|
|
|
},
|
|
|
// 跳外部链接
|
|
|
toRescue(url) {
|
|
|
- window.location.href = url;
|
|
|
+ window.open(url)
|
|
|
},
|
|
|
volunteerTo(id) {
|
|
|
this.$router.push({
|
|
@@ -369,16 +387,18 @@ import slideLaR from '../components/slideLaR.vue'
|
|
|
height: 420px;
|
|
|
overflow: hidden;
|
|
|
.swiper-box {
|
|
|
- margin: 0 -230px;
|
|
|
- width: calc(100% + 300px);
|
|
|
+ margin: 0 -270px;
|
|
|
+ width: calc(100% + 430px);
|
|
|
height: 420px;
|
|
|
.swiper-box-item {
|
|
|
- width: calc(100% + 300px);
|
|
|
+ width: calc(100% + 410px);
|
|
|
height: 420px;
|
|
|
.swiper-img {
|
|
|
- margin: auto auto;
|
|
|
- min-width: 600px;
|
|
|
- min-height: 420px;
|
|
|
+ // margin-left:auto;
|
|
|
+ display:table-cell;
|
|
|
+ vertical-align:middle;
|
|
|
+ height: 100%;
|
|
|
+ min-width: 650px;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -439,6 +459,9 @@ import slideLaR from '../components/slideLaR.vue'
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
font-size: 14px;
|
|
|
+ overflow: hidden;
|
|
|
+ height: 28px;
|
|
|
+ line-height: 28px;
|
|
|
.title {
|
|
|
display: flex;
|
|
|
line-height: 25px;
|
|
@@ -450,13 +473,9 @@ import slideLaR from '../components/slideLaR.vue'
|
|
|
width: 5px;
|
|
|
height: 5px;
|
|
|
border-radius: 50%;
|
|
|
- background-color: #D8D8D8;
|
|
|
margin: auto 8px;
|
|
|
}
|
|
|
}
|
|
|
- overflow: hidden;
|
|
|
- height: 25px;
|
|
|
- line-height: 25px;
|
|
|
.time {
|
|
|
padding: 0 10px;
|
|
|
}
|
|
@@ -516,7 +535,7 @@ import slideLaR from '../components/slideLaR.vue'
|
|
|
flex: 1;
|
|
|
position: relative;
|
|
|
border-top: solid 2px $red;
|
|
|
- height: 320px;
|
|
|
+ height: 300px;
|
|
|
overflow: hidden;
|
|
|
box-shadow: 1px 1px 6px #e1e1e1;
|
|
|
.more {
|
|
@@ -528,33 +547,31 @@ import slideLaR from '../components/slideLaR.vue'
|
|
|
font-size: 11px;
|
|
|
}
|
|
|
.list {
|
|
|
- .title {
|
|
|
- line-height: 25px;
|
|
|
- overflow: hidden;
|
|
|
- height: 25px;
|
|
|
+ .item {
|
|
|
+ font-size: 14px;
|
|
|
+ padding: 5px 0;
|
|
|
+ line-height: 28px;
|
|
|
+ height: 28px;
|
|
|
display: flex;
|
|
|
- .nowarp {
|
|
|
- max-width: 350px;
|
|
|
- }
|
|
|
- .spot {
|
|
|
- width: 5px;
|
|
|
- height: 5px;
|
|
|
- border-radius: 50%;
|
|
|
- background-color: #D8D8D8;
|
|
|
- margin: auto 8px;
|
|
|
+ justify-content: space-between;
|
|
|
+ .title {
|
|
|
+ display: flex;
|
|
|
+ .nowarp {
|
|
|
+ max-width: 350px;
|
|
|
+ }
|
|
|
+ .spot {
|
|
|
+ width: 5px;
|
|
|
+ height: 5px;
|
|
|
+ border-radius: 50%;
|
|
|
+ margin: auto 8px;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
.time {
|
|
|
- // padding: 0 10px;
|
|
|
+ padding: 0 10px;
|
|
|
}
|
|
|
}
|
|
|
.list {
|
|
|
- .item {
|
|
|
- font-size: 14px;
|
|
|
- padding: 10px;
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -568,7 +585,7 @@ import slideLaR from '../components/slideLaR.vue'
|
|
|
display: flex;
|
|
|
.wall {
|
|
|
box-shadow: 1px 1px 6px #e1e1e1;
|
|
|
- flex: 4;
|
|
|
+ flex: 3;
|
|
|
border-top: solid 1px $red;
|
|
|
min-width: 50%;
|
|
|
margin-right: 10px;
|
|
@@ -585,10 +602,11 @@ import slideLaR from '../components/slideLaR.vue'
|
|
|
float: right;
|
|
|
position: relative;
|
|
|
input {
|
|
|
- min-width: 200px;
|
|
|
+ min-width: 180px;
|
|
|
border-radius: 20px;
|
|
|
border: solid 1px $red;
|
|
|
padding: 5px 10px;
|
|
|
+ padding-right: 30px;
|
|
|
height: 15px;
|
|
|
outline: none; // 设置点击后无效果
|
|
|
}
|
|
@@ -602,9 +620,9 @@ import slideLaR from '../components/slideLaR.vue'
|
|
|
.slideLaR {
|
|
|
margin-top: 20px;
|
|
|
.item {
|
|
|
- margin: 5px 10px;
|
|
|
+ margin: 10px;
|
|
|
img {
|
|
|
- height: 90px
|
|
|
+ height: 120px
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -631,14 +649,23 @@ import slideLaR from '../components/slideLaR.vue'
|
|
|
color: #333333;
|
|
|
font-size: 14px;
|
|
|
line-height: 20px;
|
|
|
+ .header {
|
|
|
+ height: 140px;
|
|
|
+ display: grid;
|
|
|
+ justify-content: space-around;
|
|
|
+ margin: auto ;
|
|
|
+ }
|
|
|
.scanning {
|
|
|
- width: 50px;
|
|
|
- height: 50px;
|
|
|
+ margin: auto ;
|
|
|
+ width: 40px;
|
|
|
+ height: 40px;
|
|
|
}
|
|
|
.qrcodeImg {
|
|
|
+ height: 140px;
|
|
|
img {
|
|
|
- width: 100px;
|
|
|
- height: 100px;
|
|
|
+ width: 140px;
|
|
|
+ height: calc(100%);
|
|
|
+ margin-top: -7px;
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -664,9 +691,15 @@ import slideLaR from '../components/slideLaR.vue'
|
|
|
}
|
|
|
}
|
|
|
.chooseitem {
|
|
|
- color: #333333;
|
|
|
+ color: #333333;
|
|
|
+ .spot {
|
|
|
+ background-color: #D8D8D8;
|
|
|
+ }
|
|
|
}
|
|
|
.chooseitem :hover {
|
|
|
- color: $pink;
|
|
|
+ color: $pink;
|
|
|
+ .spot {
|
|
|
+ background-color: $pink;
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|