feasure-livedata
lld 2026-03-27 20:09:50 +08:00
parent 8d2c94afe2
commit 48d6a39bdb
5 changed files with 55 additions and 25 deletions

View File

@ -14,6 +14,7 @@
<view
v-for="(item, index) in messageList"
:key="index"
@click="gotoDevice(item)"
class="message-item"
>
<!-- 时间标签 -->
@ -32,14 +33,14 @@
<view class="champion-card">
<view class="sender-info">
<image class="avatar" :src="item.avatar" mode="aspectFill"></image>
<text class="sender-text">{{ item.sender }} 夺得{{ item.date }}日排行榜冠军</text>
<text class="sender-text">{{ item.showTips }}</text>
</view>
</view>
</view>
</scroll-view>
<view class="empty__item tn-margin-top" v-else>
<tn-empty icon="https://resource.tuniaokj.com/images/empty/alien/2.png"
text="空空如也" :imgWidth="200"
text="近7天暂无消息可下拉查看历史消息" :imgWidth="200"
:imgHeight="200"></tn-empty>
</view>
</view>
@ -56,20 +57,15 @@ export default {
type: 'champion',
avatar: 'https://picsum.photos/id/237/60/60',
sender: '王冕',
date: '03月26'
showTips: '03月26日排行榜冠军恭喜你'
},
{
time: '2026-03-25 22:19:00',
type: 'step',
rank: 71,
steps: 6084
showTips: '03月25日排行榜冠军恭喜你'
},
{
time: '2026-03-16 22:19:00',
type: 'champion',
avatar: 'https://picsum.photos/id/237/60/60',
sender: '王冕',
date: '03月25'
showTips: '03月25日排行榜冠军恭喜你'
},
{
time: '2026-03-26 05:36:00',
@ -161,6 +157,19 @@ export default {
//
this.refreshing = false;
}, 800);
},
gotoDevice(item) {
this.$modal.msg("暂未开放!");
return;
var agri = JSON.stringify(
{
imei:item.imei,
agriName:item.agriName,
agriId:item.id,
workMode: item.workMode
}
);
this.$tab.navigateTo('/pages/home/control/index?agriInfo='+encodeURIComponent(agri))
}
}
}

View File

@ -1,7 +1,7 @@
<template>
<view class="message-page">
<!-- 消息列表 -->
<scroll-view scroll-y class="message-list">
<scroll-view scroll-y class="message-list" v-if="messageList.length>0">
<view
v-for="(item, index) in messageList"
:key="index"
@ -33,6 +33,11 @@
</view>
</view>
</scroll-view>
<view class="empty__item tn-margin-top" v-else>
<tn-empty icon="https://resource.tuniaokj.com/images/empty/alien/2.png"
text="近7天暂无消息可下拉查看历史消息" :imgWidth="200"
:imgHeight="200"></tn-empty>
</view>
</view>
</template>

View File

@ -20,7 +20,7 @@
</view>
<!-- 公告列表 -->
<scroll-view scroll-y class="notice-list">
<scroll-view scroll-y class="notice-list" v-if="noticeList.length>0">
<view
v-for="(item, index) in noticeList"
:key="index"
@ -50,6 +50,11 @@
</view>
</view>
</scroll-view>
<view class="empty__item tn-margin-top" v-else>
<tn-empty icon="https://resource.tuniaokj.com/images/empty/alien/2.png"
text="暂无公告" :imgWidth="200"
:imgHeight="200"></tn-empty>
</view>
<uni-popup ref="showNotice" mode="center" >
<!-- 新增修改运行时间的弹窗 -->

View File

@ -35,7 +35,7 @@
</view>
<!-- 视频列表带时间轴 -->
<scroll-view scroll-y class="video-list">
<scroll-view scroll-y class="video-list" v-if="videoList.length>0">
<view
v-for="(item, index) in videoList"
:key="index"
@ -56,7 +56,7 @@
</view>
<!-- 视频卡片 -->
<view class="video-card">
<view class="video-card" @click="gotoDetail(item)">
<view class="video-info">
<text class="device-name">{{ item.device }}</text>
<text class="event-type">{{ item.event }}</text>
@ -66,6 +66,11 @@
</view>
</view>
</scroll-view>
<view class="empty__item tn-margin-top" v-else>
<tn-empty icon="https://resource.tuniaokj.com/images/empty/alien/2.png"
text="暂无视频" :imgWidth="200"
:imgHeight="200"></tn-empty>
</view>
</view>
</template>
@ -78,10 +83,10 @@ export default {
dateList: this.getDateList(),
activeCategory: 'person',
categoryList: [
{ type: 'person', name: '人', imgUrl: "https://picsum.photos/id/1015/400/200" },
{ type: 'car', name: '车', imgUrl: "https://picsum.photos/id/1015/400/200" },
{ type: 'animal', name: '动物', imgUrl: "https://picsum.photos/id/1015/400/200" },
{ type: 'filter', name: '筛选', imgUrl: "https://picsum.photos/id/1015/400/200" }
{type: 'person', name: '人', imgUrl: "https://picsum.photos/id/1015/400/200"},
{type: 'car', name: '车', imgUrl: "https://picsum.photos/id/1015/400/200"},
{type: 'animal', name: '动物', imgUrl: "https://picsum.photos/id/1015/400/200"},
{type: 'filter', name: '筛选', imgUrl: "https://picsum.photos/id/1015/400/200"}
],
videoList: [
{
@ -118,8 +123,8 @@ export default {
methods: {
parseTime,
handleDateClick(item) {
this.dateList = this.dateList.map(d => ({ ...d, active: d === item }))
uni.showToast({ title: `切换到${item.day} ${item.week}` })
this.dateList = this.dateList.map(d => ({...d, active: d === item}))
uni.showToast({title: `切换到${item.day} ${item.week}`})
// todo
// this.videoList = this.getDateList1();
},
@ -130,11 +135,11 @@ export default {
}
// todo
this.activeCategory = type;
uni.showToast({ title: `切换到${type === 'person' ? '人' : type === 'car' ? '车' : '动物'}分类` })
uni.showToast({title: `切换到${type === 'person' ? '人' : type === 'car' ? '车' : '动物'}分类`})
},
handleFilterClick() {
// todo
uni.showToast({ title: '打开筛选面板' })
uni.showToast({title: '打开筛选面板'})
},
getDateList() {
const weekMap = ['日', '一', '二', '三', '四', '五', '六'];
@ -156,10 +161,16 @@ export default {
getDateList1() {
const w = ['日', '一', '二', '三', '四', '五', '六'];
const t = new Date();
return Array.from({length:7}, (_,i)=>{
const d = new Date(t); d.setDate(t.getDate()-6+i);
return { week:w[d.getDay()], day:i===6?'今':d.getDate()+'', active:i===6 }
return Array.from({length: 7}, (_, i) => {
const d = new Date(t);
d.setDate(t.getDate() - 6 + i);
return {week: w[d.getDay()], day: i === 6 ? '今' : d.getDate() + '', active: i === 6}
})
},
gotoDetail(item) {
//
this.$modal.msg("暂未开放!");
return;
}
}
}