210页面完成
This commit is contained in:
@ -641,33 +641,37 @@
|
||||
this.lightModeA = false;
|
||||
// console.log("保存的时间:", time);
|
||||
},
|
||||
handleIconClick(index) {
|
||||
// 历史记录
|
||||
if (index === 0) {
|
||||
handleIconClick(s, e) {
|
||||
if (s === 0) {
|
||||
console.log("消息",s);
|
||||
uni.navigateTo({
|
||||
url: '/pages/210/historyRecords/index',
|
||||
events: {
|
||||
ack: function(data) {}
|
||||
},
|
||||
url: '/pages/670/History',
|
||||
success: (res) => {
|
||||
res.eventChannel.emit('share', {
|
||||
data: this.itemInfo,
|
||||
res.eventChannel.emit('detailData', {
|
||||
data: this.device,
|
||||
});
|
||||
}
|
||||
})
|
||||
} else {
|
||||
return;
|
||||
} else if (s === 1) {
|
||||
console.log("分享");
|
||||
uni.navigateTo({
|
||||
url: '/pages/6170/share/index',
|
||||
url: '/pages/common/share/index',
|
||||
events: {
|
||||
ack: function(data) {}
|
||||
},
|
||||
success: (res) => {
|
||||
let json = {
|
||||
persissonType: '210'
|
||||
};
|
||||
Object.assign(json, this.device);
|
||||
res.eventChannel.emit('share', {
|
||||
data: this.itemInfo,
|
||||
data: json
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
// 分享
|
||||
|
||||
@ -1,120 +0,0 @@
|
||||
<template>
|
||||
<view class="histyRecords">
|
||||
<scroll-view class="tab-bar" scroll-x="true" scroll-with-animation>
|
||||
<view class="tab-container">
|
||||
<view v-for="(tab, index) in tabs" :key="index"
|
||||
:class="['tab-item', activeTab === index ? 'active' : '']" @click="switchTab(tab,index)">
|
||||
{{tab.name}}
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<scroll-view class="content-list" scroll-y="true">
|
||||
<view class="record-item" v-for="item in recodesInfo" :key="item.index">
|
||||
<view class="record-details">
|
||||
<text class="detail-time">开机时间</text>
|
||||
<text class="detail-line">2026.08.29 21:13:58</text>
|
||||
<text class="detail-line">关机时间</text>
|
||||
<text class="detail-time">2025.06.30 00:45:20</text>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tabs: [{
|
||||
name: '开机',
|
||||
},
|
||||
{
|
||||
name: '报警',
|
||||
},
|
||||
],
|
||||
activeTab: 0,
|
||||
recodesInfo: [{}]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// tab切换页
|
||||
switchTab(tab, index) {
|
||||
this.activeTab = index
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.histyRecords {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
background: rgba(18, 18, 18, 1);
|
||||
padding: 30rpx;
|
||||
}
|
||||
|
||||
.tab-bar {
|
||||
width: 100%;
|
||||
color: rgb(255, 255, 255);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.tab-container {
|
||||
display: flex;
|
||||
cursor: pointer;
|
||||
margin-bottom: 40rpx;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.tab-item {
|
||||
font-size: 28rpx;
|
||||
padding: 0 30rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.active {
|
||||
color: rgba(187, 230, 0, 1);
|
||||
border-bottom: 6rpx solid rgba(187, 230, 0, 1);
|
||||
height: 60rpx;
|
||||
}
|
||||
|
||||
.content-list {
|
||||
height: calc(100vh - 300rpx);
|
||||
}
|
||||
|
||||
.record-item {
|
||||
display: flex;
|
||||
margin-bottom: 20rpx;
|
||||
background: rgba(26, 26, 26, 1);
|
||||
border-radius: 18rpx;
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.record-details {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.detail-line {
|
||||
display: block;
|
||||
font-size: 28rpx;
|
||||
margin-bottom: 10rpx;
|
||||
color: rgba(255, 255, 255, 0.87);
|
||||
font-size: 24rpx;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
.detail-time {
|
||||
color: rgba(255, 255, 255, 0.6);
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.time-display {
|
||||
position: absolute;
|
||||
top: 30rpx;
|
||||
right: 30rpx;
|
||||
font-size: 28rpx;
|
||||
color: #BBE600;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user