1
0
forked from dyf/APP
Files
APP/pages/6155/bluetooth/bluetooth.vue

257 lines
4.8 KiB
Vue
Raw Normal View History

<template>
<view class="">
<custom-navbar :showBack="true"></custom-navbar>
<view class="pageContent" :style="{ paddingTop: navBarHeight + 'px' }">
<view class="scanner">
<view class="pulse"></view>
<view class="device-name">
<!-- <image src="/static/images/svgg.png" class="bluth"></image> -->
</view>
</view>
<view class="device">我的设备</view>
<scroll-view class="device-list" scroll-y>
<block v-for="(item, index) in deviceList" :key="index" :ref="'swipeItem_' + index">
<!-- 设备卡片内容保持不变 -->
<view @click.stop="handleFile(item)" class="device-card">
<view class="device-header">
<view class="deviceIMG">
<!-- <image src="/static/images/bip.png" mode="" class="IMG"></image> -->
</view>
<view class="device-name1">
<view>设备:001-00</view>
<view class="ID">
<view>ID:0222222</view>
</view>
</view>
</view>
</view>
</block>
</scroll-view>
<view class="device">其他设备</view>
<scroll-view class="device-list" scroll-y>
<block v-for="(item, index) in 3" :key="index" :ref="'swipeItem_' + index">
<!-- 设备卡片内容保持不变 -->
<view @click.stop="handleFile(item)" class="device-card">
<view class="device-header">
<view class="deviceIMG">
<!-- <image src="/static/images/bip.png" mode="" class="IMG"></image> -->
</view>
<view class="device-name1">
<view>设备:001-00</view>
<view class="ID">
<view>ID:0222222</view>
</view>
</view>
</view>
</view>
</block>
</scroll-view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
// 这里可以添加数据绑定
navBarHeight: 70 + uni.getSystemInfoSync().statusBarHeight,
deviceList:[{}]
}
},
methods: {
// 扫描
}
}
</script>
<style scoped>
.pageContent {
min-height: 100vh;
background-color: rgb(18, 18, 18);
padding: 30rpx;
}
.scanner {
position: relative;
width: 600rpx;
height: 600rpx;
display: flex;
align-items: center;
justify-content: center;
margin: 0 auto;
}
/* 设备名称 */
.device-name {
position: relative;
z-index: 10;
width: 104rpx;
height: 104rpx;
background: rgba(187, 230, 0, 1);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
}
.bluth {
width: 36rpx;
height: 36rpx;
}
/* 脉冲波纹效果 */
.pulse {
position: absolute;
width: 100%;
height: 100%;
border-radius: 50%;
border: 1px solid rgba(206, 242, 49, 0.05);
background: rgba(206, 242, 49, 0.05);
animation: pulse 4s infinite cubic-bezier(0.2, 0, 0.2, 1);
}
/* 通过伪元素创建4层波纹 */
.pulse::before,
.pulse::after,
.pulse .ripple-1,
.pulse .ripple-2 {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
border-radius: 50%;
background: rgba(187, 230, 0, 0.4);
border: 1px solid rgba(206, 242, 49, 0.04);
animation: inherit;
}
.pulse::before {
animation-delay: 1s;
}
.pulse::after {
animation-delay: 2s;
}
.pulse .ripple-1 {
animation-delay: 0.5s;
}
.pulse .ripple-2 {
animation-delay: 1.5s;
}
@keyframes pulse {
0% {
transform: scale(0.1);
opacity: 0.8;
}
70% {
opacity: 0.4;
}
100% {
transform: scale(1);
opacity: 0.5;
}
}
.device {
color: rgba(255, 255, 255, 0.6);
margin-bottom: 20rpx;
}
/* 设备卡片 */
.device-card {
background-color: rgb(26, 26, 26);
border-radius: 16rpx;
margin-bottom: 20rpx;
box-sizing: border-box;
position: relative;
}
.device-header {
display: flex;
align-items: center;
margin-bottom: 15rpx;
padding: 30rpx 0 10rpx 30rpx;
}
.device-name1 {
font-size: 32rpx;
color: rgba(255, 255, 255, 0.87);
margin-left:40rpx;
line-height: 50rpx;
width: 70%;
}
.ID {
color: rgba(255, 255, 255, 0.6);
font-size: 26rpx;
display: flex;
justify-content: space-between;
}
.device-status {
width: 122rpx;
height: 52rpx;
font-size: 26rpx;
border-radius: 0px 8px 0px 8px;
background-color: rgb(42, 42, 42);
position: absolute;
top: 0rpx;
right: 0rpx;
text-align: center;
line-height: 52rpx;
}
.circle {
width:8rpx;
height: 40rpx;
position: absolute;
right:25rpx;
top:85rpx;
}
.online {
color: rgb(187, 230, 0);
}
.device-id {
font-size: 26rpx;
color: #999;
margin-bottom: 20rpx;
display: block;
}
.device-info {
display: flex;
justify-content: space-evenly;
font-size: 28rpx;
color: rgba(255, 255, 255, 0.87);
position: relative;
padding: 0rpx 0rpx 30rpx 30rpx;
}
.deviceIMG {
/* width: 100rpx;
height: 100rpx;
border-radius: 16rpx;
position: relative;
background-color: rgba(42, 42, 42, 0.6);
display: flex;
align-items: center; */
}
.IMG {
width:38rpx;
height: 80rpx;
margin-left: 17%;
}
</style>