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