This commit is contained in:
max 2024-11-14 09:58:38 +08:00
parent fe885ee180
commit f25bda06a4
5 changed files with 16 additions and 11 deletions

View File

@ -19,7 +19,7 @@
<view class="swipe-area">
<swiper class="swiper-box" autoplay interval="3000" indicator-dots="true">
<swiper-item v-for="(item, index) in imgList" :key="index">
<img :src="item.image" alt="" style="width: 100%; height: 100%" />
<image :src="item.image" alt="" style="width: 100%; height: 100%" />
</swiper-item>
</swiper>
</view>
@ -79,16 +79,20 @@ export default {
],
imgList: [
{
image: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
title: '昨夜星辰昨夜风,画楼西畔桂堂东'
image: require('../../../static/images/swiper1.png'),
title: '1'
},
{
image: 'https://cdn.uviewui.com/uview/swiper/2.jpg',
title: '身无彩凤双飞翼,心有灵犀一点通'
image: require('../../../static/images/swiper2.png'),
title: '2'
},
{
image: 'https://cdn.uviewui.com/uview/swiper/3.jpg',
title: '谁念西风独自凉,萧萧黄叶闭疏窗,沉思往事立残阳'
image: require('../../../static/images/swiper3.png'),
title: '3'
},
{
image: require('../../../static/images/swiper4.png'),
title: '4'
}
],
taskList: [],
@ -101,7 +105,6 @@ export default {
this.getMsgList()
setTimeout(() => {
this.$verificationToken()
}, 1000)
},
methods: {
@ -169,9 +172,11 @@ export default {
Authorization: uni.getStorageSync('access_token')
},
success: res => {
console.log('🚀 ~ getMsgList ~ res:', res.data[0].noticeName)
this.text = res.data[0].noticeName
console.log('🚀 ~ getMsgList ~ this.text:', this.text)
console.log('🚀 ~ getMsgList ~ res:', res.data)
if (res.data.length > 0) {
this.text = res.data[0].noticeName
console.log('🚀 ~ getMsgList ~ this.text:', this.text)
}
}
})
},

BIN
static/images/swiper1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 367 KiB

BIN
static/images/swiper2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 376 KiB

BIN
static/images/swiper3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 321 KiB

BIN
static/images/swiper4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 463 KiB