kun 191115 1700
This commit is contained in:
@@ -9,14 +9,14 @@
|
||||
<div class="swiperone">
|
||||
<div class="swiper-container swiper-one swiper-no-swiping">
|
||||
<div class="swiper-wrapper">
|
||||
<template v-for="(banner,index) in bgData.banner">
|
||||
<template v-for="(banner, index) in bgData.banner">
|
||||
<div
|
||||
class="swiper-slide"
|
||||
:key="index"
|
||||
@click="details(banner.id)"
|
||||
>
|
||||
<img :src="banner.cover ? banner.cover : moren" alt />
|
||||
<div class="box">{{banner.title}}</div>
|
||||
<div class="box">{{ banner.title }}</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
@@ -34,16 +34,18 @@
|
||||
<div class="top">
|
||||
<div class="b">
|
||||
<span>通知公告</span>
|
||||
<span class="more" @click="$jParams('newsList',{type:3})">更多>></span>
|
||||
<span class="more" @click="$jParams('newsList', { type: 3 })"
|
||||
>更多>></span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 列表显示 @click="$jParams('newsDetails',{id:notice.id})" -->
|
||||
<ul>
|
||||
<template v-for="(notice,index) in bgData.notice">
|
||||
<template v-for="(notice, index) in bgData.notice">
|
||||
<li :key="index" v-if="index < 8" @click="details(notice.id)">
|
||||
<a href="javascript:void(0);">
|
||||
<span>{{notice.title}}</span>
|
||||
<time>[{{notice.created_at}}]</time>
|
||||
<span>{{ notice.title }}</span>
|
||||
<time>[{{ notice.created_at }}]</time>
|
||||
</a>
|
||||
</li>
|
||||
</template>
|
||||
@@ -61,12 +63,14 @@
|
||||
<img class="o" :src="imgUrl.dh" alt />
|
||||
<span>区域化党建</span>
|
||||
</div>
|
||||
<span class="more" @click="$jParams('newsList',{type:4})">更多>></span>
|
||||
<span class="more" @click="$jParams('newsList', { type: 4 })"
|
||||
>更多>></span
|
||||
>
|
||||
</div>
|
||||
<ul class="ult">
|
||||
<template v-for="(build,index) in bgData.build">
|
||||
<template v-for="(build, index) in bgData.build">
|
||||
<li :key="index" v-if="index < 3" @click="details(build.id)">
|
||||
<a href="javascript:void(0);">{{build.title}}</a>
|
||||
<a href="javascript:void(0);">{{ build.title }}</a>
|
||||
</li>
|
||||
</template>
|
||||
</ul>
|
||||
@@ -79,10 +83,10 @@
|
||||
</div>
|
||||
<div class="p">
|
||||
<ul class="ult-t">
|
||||
<template v-for="(party,index) in bgData.party">
|
||||
<template v-for="(party, index) in bgData.party">
|
||||
<li :key="index">
|
||||
<!-- <a href="javascript:void(0);">{{party.party_name}}</a> -->
|
||||
{{party.party_name}}
|
||||
{{ party.party_name }}
|
||||
</li>
|
||||
</template>
|
||||
</ul>
|
||||
@@ -101,12 +105,14 @@
|
||||
<img class="n" :src="imgUrl.ws" alt />
|
||||
<span>统一战线</span>
|
||||
</div>
|
||||
<span class="more" @click="$jParams('newsList',{type:1})">更多>></span>
|
||||
<span class="more" @click="$jParams('newsList', { type: 1 })"
|
||||
>更多>></span
|
||||
>
|
||||
</div>
|
||||
<ul class="ulo">
|
||||
<template v-for="(battle,index) in bgData.battle">
|
||||
<li :key="index" v-if="index<9" @click="details(battle.id)">
|
||||
<a href="javascript:void(0);">{{battle.title}}</a>
|
||||
<template v-for="(battle, index) in bgData.battle">
|
||||
<li :key="index" v-if="index < 9" @click="details(battle.id)">
|
||||
<a href="javascript:void(0);">{{ battle.title }}</a>
|
||||
</li>
|
||||
</template>
|
||||
</ul>
|
||||
@@ -118,12 +124,18 @@
|
||||
<img class="e" :src="imgUrl.zz" alt />
|
||||
<span>组织生活</span>
|
||||
</div>
|
||||
<span class="more" @click="$jParams('newsList',{type:2})">更多>></span>
|
||||
<span class="more" @click="$jParams('newsList', { type: 2 })"
|
||||
>更多>></span
|
||||
>
|
||||
</div>
|
||||
<ul class="ult">
|
||||
<template v-for="(organization,index) in bgData.organization">
|
||||
<li :key="index" v-if="index < 9" @click="details(organization.id)">
|
||||
<a href="javascript:void(0);">{{organization.title}}</a>
|
||||
<template v-for="(organization, index) in bgData.organization">
|
||||
<li
|
||||
:key="index"
|
||||
v-if="index < 9"
|
||||
@click="details(organization.id)"
|
||||
>
|
||||
<a href="javascript:void(0);">{{ organization.title }}</a>
|
||||
</li>
|
||||
</template>
|
||||
</ul>
|
||||
@@ -134,12 +146,12 @@
|
||||
<div class="container-three">
|
||||
<p class="title">@书记</p>
|
||||
<div class="box-list">
|
||||
<template v-for="(contact,index) in bgData.contact">
|
||||
<div class="list" :key="index" v-if="index<3">
|
||||
<template v-for="(contact, index) in bgData.contact">
|
||||
<div class="list" :key="index" v-if="index < 3">
|
||||
<img :src="contact.thumb" alt />
|
||||
<div class="wen-ben">
|
||||
<h3>{{contact.society_name}}</h3>
|
||||
<p>{{contact.content}}</p>
|
||||
<h3>{{ contact.society_name }}</h3>
|
||||
<p>{{ contact.content }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -150,10 +162,16 @@
|
||||
<p class="title">党建矩阵</p>
|
||||
<div class="swiper-box-list">
|
||||
<div id="img-box" class="f-row">
|
||||
<template v-for="(links,index) in bgData.links">
|
||||
<a class="img-box" :key="index" v-if="index < 8" :href="links.link" target="_blank">
|
||||
<template v-for="(links, index) in bgData.links">
|
||||
<a
|
||||
class="img-box"
|
||||
:key="index"
|
||||
v-if="index < 8"
|
||||
:href="links.link"
|
||||
target="_blank"
|
||||
>
|
||||
<img :src="links.url" alt />
|
||||
<p>{{links.name}}</p>
|
||||
<p>{{ links.name }}</p>
|
||||
</a>
|
||||
</template>
|
||||
<img
|
||||
@@ -163,7 +181,12 @@
|
||||
:src="imgUrl.left"
|
||||
alt
|
||||
/>
|
||||
<img @click="scrollFeeds('right')" class="mv-btn right-side" :src="imgUrl.right" alt />
|
||||
<img
|
||||
@click="scrollFeeds('right')"
|
||||
class="mv-btn right-side"
|
||||
:src="imgUrl.right"
|
||||
alt
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -243,10 +266,10 @@ export default {
|
||||
initSwiper () {
|
||||
// eslint-disable-next-line no-new
|
||||
new Swiper('.swiper-one', {
|
||||
loop: true,
|
||||
autoplayDisableOnInteraction: false,
|
||||
loop: false,
|
||||
autoplay: {
|
||||
delay: 3000
|
||||
delay: 5000,
|
||||
disableOnInteraction: false
|
||||
},
|
||||
|
||||
pagination: {
|
||||
@@ -290,16 +313,20 @@ export default {
|
||||
method: 'get',
|
||||
url: 'v1/index',
|
||||
data: {}
|
||||
}).then(res => {
|
||||
if (res.data.code === 200) {
|
||||
_this.bgData = res.data.data
|
||||
_this.$nextTick(() => { // 修改数据之后立即使用这个方法,获取更新后的 DOM
|
||||
_this.initSwiper()
|
||||
})
|
||||
} else {
|
||||
_this.$message.error('请求数据有问题!')
|
||||
}
|
||||
})
|
||||
.then(res => {
|
||||
if (res.data.code === 200) {
|
||||
_this.bgData = res.data.data
|
||||
if (_this.bgData.banner.length !== 1) {
|
||||
_this.$nextTick(() => {
|
||||
// 修改数据之后立即使用这个方法,获取更新后的 DOM
|
||||
_this.initSwiper()
|
||||
})
|
||||
}
|
||||
} else {
|
||||
_this.$message.error('请求数据有问题!')
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
console.log(err)
|
||||
})
|
||||
@@ -314,7 +341,7 @@ export default {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang='scss' scoped>
|
||||
<style lang="scss" scoped>
|
||||
#imgg {
|
||||
width: 500px;
|
||||
height: 600px;
|
||||
|
||||
Reference in New Issue
Block a user