1
0
forked from dyf/APP

分享管理修复bug,210历史记录功能开发

This commit is contained in:
fengerli
2025-08-09 17:59:09 +08:00
parent c0bb2bcd9c
commit 0d13f84744
9 changed files with 70 additions and 37 deletions

View File

@ -17,7 +17,7 @@
<text>{{
tabs[activeTab].name === '我的分享'
? `分享给“${group.sharedTo}”的设备`
: `来自“${group.sharedTo}”分享的设备`
: `来自“${group.othersharedTo}”分享的设备`
}}</text>
<text class="edit-btn"
@click="toggleEdit(groupIndex)">{{editingGroup === groupIndex ? '完成' : '编辑'}}</text>
@ -41,11 +41,9 @@
<view class="ID">
ID:{{item.deviceImei}}</view>
<!-- 在线状态 -->
<view class="onlines"
v-if="item.onlineStatus==1">在线</view>
<view class="onlines" v-if="item.onlineStatus==1">在线</view>
<!-- 离线状态 -->
<view class="offlines"
v-if="item.onlineStatus==0">离线</view>
<view class="offlines" v-if="item.onlineStatus==0">离线</view>
<view>电量{{item.battery || '0'}}%</view>
</view>
</view>
@ -54,11 +52,6 @@
</view>
</block>
</view>
<!-- 加载状态提示 -->
<!-- <view class="loading-status">
<text v-if="loading">加载中...</text>
<text v-if="finished">没有更多数据了</text>
</view> -->
</view>
<view v-else class="noDATA">
<view>
@ -122,10 +115,12 @@
const groups = {};
this.deviceList.forEach(device => {
// 这里假设device.sharedTo是分享目标的手机号
const key = device.sharedTo || '未分享';
const key = this.activeTab === 0 ? device.phonenumber : device.otherPhonenumber;
const displayName = this.activeTab === 0 ? device.phonenumber : device.otherPhonenumber;
if (!groups[key]) {
groups[key] = {
sharedTo: key,
sharedTo: displayName, // 显示用名称
othersharedTo: displayName, // 显示用名称
devices: []
};
}
@ -218,7 +213,8 @@
const newDevices = res.rows.map(device => ({
...device,
showConfirm: false,
sharedTo: device.phonenumber || '未分享'
sharedTo: device.phonenumber,
othersharedTo: device.otherPhonenumber
}));
// 分页处理
if (this.page === 1) {