smartmeter-app/pages/device/index.vue
2024-03-25 19:46:07 +08:00

229 lines
4.4 KiB
Vue

<template>
<view class="pages">
<u-navbar title="添加设备" :border-bottom="false" :background="bgc" title-color='#262B37' title-size='48' height='136'></u-navbar>
<view class="title">
<text>设备列表</text>
<image src="../../static/sm.png" mode="widthFix"></image><text class="sm"> 正在扫描蓝牙设备...... </text>
</view>
<view class="dblist" v-for="(item,index) in 2" :key="index">
<view class="lt">
<image src="../../static/db.png" mode=""></image>
</view>
<view class="cen">
<view class="name">
智能电表
</view>
<view class="mac">
MAC号: &nbsp; TMTM2152354
</view>
</view>
<view class="rt">
<text @click="btnlj">连接</text>
</view>
</view>
<view class="anniu">
<button>重新扫描</button>
</view>
<view class="mask" v-if="titleflag">
<view class="titles">
温馨提示
</view>
<text>无法扫描到附近设备:</text>
<text>1.确保待连接设备在附近且蓝牙处于打开状态</text>
<text>2.确保设备未与其他设备进行蓝牙连接</text>
<text>确保设备未被添加过</text>
<text>...</text>
<button @click="btnyc">好的</button>
</view>
</view>
</template>
<script>
export default {
data() {
return {
titleflag:true, //提示隐藏
bgc: {
backgroundColor: "#F7FAFE",
},
}
},
onLoad() {
},
methods: {
btnyc(){
this.titleflag = false
},
btnlj(){
uni.navigateTo({
url:'/pages/wifilist/index'
})
}
}
}
</script>
<style lang="scss">
page{
background-color: #F7FAFE !important;
}
.pages{
// padding-top: 136rpx !important;
padding: 0 66rpx;
box-sizing: border-box;
}
// text{
// display: block;
// }
.sm{
color: #77808D;
border-radius: 0rpx 0rpx 0rpx 0rpx;
// margin-top: 48rpx;
display: inline-block;
}
.title{
margin-bottom: 84rpx;
image{
display: inline-block;
width: 48rpx;
height: 48rpx;
vertical-align: bottom;
margin-right: 10rpx;
}
text:nth-child(1){
font-weight: 400;
font-size: 96rpx;
color: #262B37;
line-height: 88rpx;
text-align: left;
font-style: normal;
text-transform: none;
display: block;
margin-bottom: 48rpx;
}
}
.dblist{
display: flex;
width: 100%;
margin-top: 34rpx;
background: #FFFFFF;
box-shadow: 0rpx 10rpx 64rpx 0rpx rgba(0,0,0,0.08);
padding: 20rpx 0 24rpx 18rpx;
box-sizing: border-box;
text-align: center;
border-radius: 10rpx;
.lt{
padding-left: 10rpx;
box-sizing: border-box;
margin-right: 38rpx;
image{
width: 42rpx;
// height: 112rpx;
}
}
.cen{
width: 370rpx;
padding-left: 10rpx;
box-sizing: border-box;
.name{
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
font-weight: 400;
font-size: 32rpx;
color: #262B37;
line-height: 40rpx;
text-align: left;
font-style: normal;
text-transform: none;
margin-top: 10rpx;
}
.mac{
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
font-weight: 400;
font-size: 24rpx;
color: #262B37;
line-height: 32rpx;
text-align: left;
font-style: normal;
text-transform: none;
margin-top: 16rpx;
}
}
.rt{
margin-top: 22rpx;
text{
display: inline-block;
width: 108rpx;
height: 60rpx;
background: rgba(255,255,255,0);
border: 2rpx solid #8883F0;
filter: blur(0px);
border-radius: 20rpx;
text-align: center;
line-height: 60rpx;
color:#8883F0;
}
}
}
.anniu{
padding: 0 90rpx;
width: 100%;
box-sizing: border-box;
position: fixed;
left: 0;
bottom: 112rpx;
button{
background: #8883F0;
border-radius: 52rpx 52rpx 52rpx 52rpx;
color: #fff;
}
}
.mask{
width:622rpx;
height: 710rpx;
background: #FFFFFF;
filter: blur(0px);
border-radius: 20rpx;
position: fixed;
top: 475rpx;
left: 50%;
transform: translateX(-50%);
padding-top: 38rpx;
padding-left: 60rpx;
padding-right: 60rpx;
box-sizing: border-box;
.titles{
font-size: 48rpx;
color: #262B37;
line-height: 70rpx;
text-align: center;
margin-bottom: 24rpx;
}
text{
display: block;
font-size: 32rpx;
color: #262B37;
line-height: 56rpx;
text-align: left;
}
button{
margin-top: 46rpx;
width: 266rpx;
height: 96rpx;
background: #8883F0;
border-radius: 52rpx 52rpx 52rpx 52rpx;
color: #fff;
text-align: center;
line-height: 96rpx;
}
}
</style>