轮播图圆角修正

This commit is contained in:
WindowBird 2025-08-20 13:57:52 +08:00
parent 376dff48f6
commit 1d17611a8d
3 changed files with 51 additions and 44 deletions

View File

@ -64,8 +64,11 @@ export default {
.swiper { .swiper {
height: 300rpx; height: 300rpx;
/* 通用指示器样式 - 覆盖所有可能的类名 */ border-radius: 24rpx;
overflow: hidden;
box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.1);
/* 通用指示器样式 - 覆盖所有可能的类名 */
:deep([class*='swiper-dot']) { :deep([class*='swiper-dot']) {
border-radius: 50% !important; border-radius: 50% !important;
transition: all 0.3s ease !important; transition: all 0.3s ease !important;

View File

@ -43,7 +43,7 @@ import { getNewAnnouncement } from '../../api/article/article.js'
import { getBannerList } from '../../api/banner/banner.js' import { getBannerList } from '../../api/banner/banner.js'
import { getDeviceList } from '../../api/device/device.js' import { getDeviceList } from '../../api/device/device.js'
export default { export default {
components: { components: {
AnnouncementBar, AnnouncementBar,
BannerSwiper, BannerSwiper,
@ -113,7 +113,7 @@ import { getDeviceList } from '../../api/device/device.js'
id: banner.id, id: banner.id,
image: banner.imgUrl, image: banner.imgUrl,
link: banner.link, link: banner.link,
name: `轮播图${banner.id}` name: `轮播图${banner.id}`,
})) }))
this.bannerList = sortedBanners this.bannerList = sortedBanners
@ -125,13 +125,13 @@ import { getDeviceList } from '../../api/device/device.js'
{ {
id: 'default1', id: 'default1',
image: commonEnum.TEMP1, image: commonEnum.TEMP1,
name: '默认轮播图1' name: '默认轮播图1',
}, },
{ {
id: 'default2', id: 'default2',
image: commonEnum.TEMP2, image: commonEnum.TEMP2,
name: '默认轮播图2' name: '默认轮播图2',
} },
] ]
} }
}, },
@ -169,7 +169,7 @@ import { getDeviceList } from '../../api/device/device.js'
sn: device.sn, sn: device.sn,
isOnline: isOnline, isOnline: isOnline,
powerStatus: device.powerStatus, powerStatus: device.powerStatus,
iotExpireTime: device.iotExpireTime iotExpireTime: device.iotExpireTime,
} }
}) })
@ -186,7 +186,7 @@ import { getDeviceList } from '../../api/device/device.js'
startTime: '2025-07-25 13:23:59', startTime: '2025-07-25 13:23:59',
endTime: '2026-07-25 13:23:59', endTime: '2026-07-25 13:23:59',
image: commonEnum.TEMP2, image: commonEnum.TEMP2,
isOnline: true isOnline: true,
}, },
{ {
id: 'default2', id: 'default2',
@ -195,8 +195,8 @@ import { getDeviceList } from '../../api/device/device.js'
startTime: '2025-07-25 13:23:59', startTime: '2025-07-25 13:23:59',
endTime: '2026-07-25 13:23:59', endTime: '2026-07-25 13:23:59',
image: commonEnum.TEMP3, image: commonEnum.TEMP3,
isOnline: true isOnline: true,
} },
] ]
} }
}, },
@ -215,11 +215,11 @@ import { getDeviceList } from '../../api/device/device.js'
// //
uni.showModal({ uni.showModal({
title: this.currentAnnouncement.title || '公告详情', title: this.currentAnnouncement.title || '公告详情',
content: this.currentAnnouncement.content ? content: this.currentAnnouncement.content
this.currentAnnouncement.content.replace(/<[^>]*>/g, '') : ? this.currentAnnouncement.content.replace(/<[^>]*>/g, '')
'暂无公告内容', : '暂无公告内容',
showCancel: false, showCancel: false,
confirmText: '知道了' confirmText: '知道了',
}) })
} else { } else {
uni.showToast({ uni.showToast({
@ -239,7 +239,7 @@ import { getDeviceList } from '../../api/device/device.js'
if (item.link) { if (item.link) {
// //
uni.navigateTo({ uni.navigateTo({
url: item.link url: item.link,
}) })
} }
}, },
@ -248,7 +248,7 @@ import { getDeviceList } from '../../api/device/device.js'
onEquipmentClick(equipment) { onEquipmentClick(equipment) {
// //
uni.navigateTo({ uni.navigateTo({
url: `/pages/device-detail/device-detail?id=${equipment.id}&name=${encodeURIComponent(equipment.name)}` url: `/pages/device-detail/device-detail?id=${equipment.id}&name=${encodeURIComponent(equipment.name)}`,
}) })
}, },
@ -256,7 +256,7 @@ import { getDeviceList } from '../../api/device/device.js'
onRenew(equipment) { onRenew(equipment) {
// //
uni.navigateTo({ uni.navigateTo({
url: `/pages/renew/renew?id=${equipment.id}&name=${encodeURIComponent(equipment.name)}&endTime=${encodeURIComponent(equipment.endTime)}` url: `/pages/renew/renew?id=${equipment.id}&name=${encodeURIComponent(equipment.name)}&endTime=${encodeURIComponent(equipment.endTime)}`,
}) })
}, },
@ -270,7 +270,7 @@ import { getDeviceList } from '../../api/device/device.js'
}) })
}, },
}, },
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -280,5 +280,5 @@ import { getDeviceList } from '../../api/device/device.js'
max-width: 750rpx; max-width: 750rpx;
margin: 0 auto; margin: 0 auto;
z-index: -2; z-index: -2;
} }
</style> </style>

View File

@ -19,9 +19,9 @@
class="avatar-image" class="avatar-image"
mode="aspectFill" mode="aspectFill"
/> />
<text v-else class="avatar-text">{{ <text v-else class="avatar-text"
userInfo.nickName ? userInfo.nickName.charAt(0) : '昵' >{{ userInfo.nickName ? userInfo.nickName.charAt(0) : '昵' }}
}}</text> </text>
</view> </view>
<view class="user-info"> <view class="user-info">
<view class="share-btn" @click="goToSharePromotion"> <view class="share-btn" @click="goToSharePromotion">
@ -166,7 +166,7 @@ export default {
// //
uni.$on('userInfoUpdated', this.handleUserInfoUpdate) uni.$on('userInfoUpdated', this.handleUserInfoUpdate)
}, },
beforeDestroy() { beforeUnmount() {
// //
uni.$off('userInfoUpdated', this.handleUserInfoUpdate) uni.$off('userInfoUpdated', this.handleUserInfoUpdate)
}, },
@ -306,7 +306,7 @@ export default {
nickName: this.userInfo.nickName || this.userInfo.nickname || '昵称', nickName: this.userInfo.nickName || this.userInfo.nickname || '昵称',
avatar: this.userInfo.avatar || '', avatar: this.userInfo.avatar || '',
userId: this.userInfo.userId || '', userId: this.userInfo.userId || '',
phonenumber: this.userInfo.phonenumber || '' phonenumber: this.userInfo.phonenumber || '',
} }
uni.setStorageSync('userInfo', userInfoToStore) uni.setStorageSync('userInfo', userInfoToStore)
@ -317,7 +317,7 @@ export default {
// //
uni.navigateTo({ uni.navigateTo({
url: '/pages/set/set' url: '/pages/set/set',
}) })
}, },
goToAgentApply() { goToAgentApply() {
@ -363,7 +363,7 @@ export default {
// //
this.userInfo = { this.userInfo = {
...this.userInfo, ...this.userInfo,
...updatedUserInfo ...updatedUserInfo,
} }
// //
@ -734,4 +734,8 @@ export default {
} }
} }
} }
//view {
// border: red solid 1px;
//}
</style> </style>