diff --git a/src/views/home/HomePage.vue b/src/views/home/HomePage.vue
index dc563af..b94ee22 100644
--- a/src/views/home/HomePage.vue
+++ b/src/views/home/HomePage.vue
@@ -9,14 +9,14 @@
-
+
![]()
-
{{banner.title}}
+
{{ banner.title }}
@@ -34,16 +34,18 @@
-
更多>>
+
更多>>
@@ -79,10 +83,10 @@
-
+
-
- {{party.party_name}}
+ {{ party.party_name }}
@@ -101,12 +105,14 @@
统一战线
- 更多>>
+ 更多>>
@@ -118,12 +124,18 @@
组织生活
- 更多>>
+ 更多>>
@@ -134,12 +146,12 @@
@书记
-
-
+
+
-
{{contact.society_name}}
-
{{contact.content}}
+
{{ contact.society_name }}
+
{{ contact.content }}
@@ -150,10 +162,16 @@
党建矩阵
@@ -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 {
}
-