2023-02-10 16:32:41 +08:00
|
|
|
<template>
|
2024-09-10 08:48:01 +08:00
|
|
|
<Cn-page :loading="loading">
|
|
|
|
|
<view slot="body">
|
|
|
|
|
<view class="index">
|
|
|
|
|
<uni-card
|
|
|
|
|
title="设备信息"
|
|
|
|
|
sub-title="副标题"
|
|
|
|
|
v-for="item in 3"
|
|
|
|
|
:key="item"
|
|
|
|
|
thumbnail="/static/real_time_data.png"
|
|
|
|
|
>
|
2023-02-10 16:32:41 +08:00
|
|
|
<view class="footer">
|
|
|
|
|
<text>设备基础信息 </text>
|
|
|
|
|
<view class="footer-btn" @click="del">移除</view>
|
|
|
|
|
</view>
|
|
|
|
|
</uni-card>
|
|
|
|
|
<uni-load-more status="nomore"></uni-load-more>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</Cn-page>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
export default {
|
2024-09-10 08:48:01 +08:00
|
|
|
data() {
|
2023-02-10 16:32:41 +08:00
|
|
|
return {
|
2024-09-10 08:48:01 +08:00
|
|
|
loading: false,
|
2023-02-10 16:32:41 +08:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
2024-09-10 08:48:01 +08:00
|
|
|
del() {
|
2023-02-10 16:32:41 +08:00
|
|
|
uni.showModal({
|
|
|
|
|
title: '提示',
|
|
|
|
|
content: '确定要移除该设备权限吗?',
|
|
|
|
|
success: function (res) {
|
|
|
|
|
if (res.confirm) {
|
2024-09-10 08:48:01 +08:00
|
|
|
console.log('用户点击确定')
|
2023-02-10 16:32:41 +08:00
|
|
|
} else if (res.cancel) {
|
2024-09-10 08:48:01 +08:00
|
|
|
console.log('用户点击取消')
|
2023-02-10 16:32:41 +08:00
|
|
|
}
|
2024-09-10 08:48:01 +08:00
|
|
|
},
|
|
|
|
|
})
|
2023-02-10 16:32:41 +08:00
|
|
|
},
|
2024-09-10 08:48:01 +08:00
|
|
|
newDevice() {
|
2023-02-10 16:32:41 +08:00
|
|
|
uni.scanCode({
|
2024-09-10 08:48:01 +08:00
|
|
|
onlyFromCamera: true,
|
2023-02-10 16:32:41 +08:00
|
|
|
success: function (res) {
|
2024-09-10 08:48:01 +08:00
|
|
|
console.log('条码类型:' + res.scanType)
|
|
|
|
|
console.log('条码内容:' + res.result)
|
2023-02-10 16:32:41 +08:00
|
|
|
uni.navigateTo({
|
2024-09-10 08:48:01 +08:00
|
|
|
url: '/pages/gateway/newDevice',
|
2023-02-10 16:32:41 +08:00
|
|
|
})
|
2024-09-10 08:48:01 +08:00
|
|
|
},
|
|
|
|
|
})
|
2023-02-10 16:32:41 +08:00
|
|
|
},
|
2024-09-10 08:48:01 +08:00
|
|
|
},
|
2023-02-10 16:32:41 +08:00
|
|
|
}
|
|
|
|
|
</script>
|
2024-09-10 08:48:01 +08:00
|
|
|
<style lang="scss">
|
2023-02-10 16:32:41 +08:00
|
|
|
.index {
|
|
|
|
|
.footer {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
|
|
.footer-btn {
|
|
|
|
|
padding: 0 20rpx;
|
|
|
|
|
height: 50rpx;
|
|
|
|
|
background-color: #e47470;
|
|
|
|
|
font-size: 24rpx;
|
|
|
|
|
color: #fff;
|
|
|
|
|
text-align: center;
|
|
|
|
|
line-height: 50rpx;
|
|
|
|
|
border-radius: 10rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-09-10 08:48:01 +08:00
|
|
|
</style>
|