feasure-livedata
lld 2026-04-06 04:23:48 +08:00
parent f7592e59ec
commit a98be528d2
5 changed files with 45 additions and 14 deletions

View File

@ -64,6 +64,13 @@ export function findAllUser(query) {
params: query
})
}
export function getRecentShareUser(query) {
return request({
url: '/assets/userAgri/getRecentShareUser',
method: 'get',
params: query
})
}
export function batchAssociaUser(data) {
return request({

View File

@ -2,7 +2,7 @@
<view class="page">
<!-- 设备卡片 -->
<view class="device-card">
<image :src="deviceInfo.img" class="device-img" mode="aspectFit" />
<image src="https://img.xiaoces.com/photos/share/agri.png" class="device-img" mode="aspectFit" />
<view class="device-info">
<text class="device-name">{{ deviceInfo.name }}</text>
<text class="device-serial">序列号{{ deviceInfo.serial }}</text>
@ -108,7 +108,7 @@ page {
.page {
min-height: 100vh;
padding: 20rpx 25rpx;
padding: 30rpx 25rpx;
}
/* 设备卡片 */
@ -124,6 +124,7 @@ page {
height: 90rpx;
margin-right: 20rpx;
flex-shrink: 0;
border-radius: 12rpx;
}
.device-info {
@ -185,7 +186,7 @@ page {
overflow: hidden;
.target-item {
padding: 40rpx 34rpx;
padding: 24rpx 34rpx;
border-bottom: 1rpx solid #f2f2f2;
&:last-child { border-bottom: none; }

View File

@ -85,7 +85,7 @@ page {
min-height: 100vh;
display: flex;
flex-direction: column;
padding: 30rpx 20rpx;
padding: 40rpx 30rpx;
}
.page-hint {

View File

@ -101,7 +101,7 @@ export default {
{ icon: 'https://img.xiaoces.com/photos/share/access.png', label: '选择视频和权限' },
{ icon: 'https://img.xiaoces.com/photos/share/share__.png', label: '接受分享' }
],
featureTags: ['功能按需分享', '最多分享 5 人', '仅视频设备'],
featureTags: ['功能按需分享', '最多分享 5 人', '仅大棚设备'],
activeSubTab: 'mine',
subTabs: [
{ label: '我的分享', value: 'mine' },
@ -312,6 +312,7 @@ page {
height: 90rpx;
margin-right: 20rpx;
flex-shrink: 0;
border-radius: 12rpx;
}
.device-info {

View File

@ -22,30 +22,28 @@
<view class="recent-list">
<view
v-for="item in recentList"
:key="item.id"
:key="item.userId"
class="recent-item"
@click="selectRecent(item)"
>
<text class="recent-phone">{{ item.phone }}</text>
<text class="recent-phone">{{ item.privity }}</text>
<view class="arrow"></view>
</view>
<view v-if="recentList.length==0" class="empty-tip"></view>
</view>
</view>
</template>
<script>
import {findAgriUser, getRecentShareUser} from "@/api/system/assets/userAgri";
import store from "@/store";
export default {
data() {
return {
phone: '',
// API
recentList: [
{ id: 1, phone: '132*****131' },
{ id: 2, phone: '156*****228' },
{ id: 3, phone: '183*****326' },
{ id: 4, phone: '155*****330' },
{ id: 5, phone: '150*****639' }
]
recentList: []
}
},
computed: {
@ -53,6 +51,9 @@ export default {
return /^1\d{10}$/.test(this.phone)
}
},
onShow() {
this.getRecentList()
},
methods: {
onPhoneInput(e) {
this.phone = e.detail.value
@ -69,6 +70,20 @@ export default {
uni.navigateTo({
url: `/pages/home/invite/selectDevice/index?phone=${this.phone}`
})
},
getRecentList() {
this.recentList = [];
getRecentShareUser().then(res => {
if (res.code === 200) {
res.data.map(item => {
this.recentList.push({
id: item.userId,
phone: item.phonenumber,
privity: item.phonenumber.slice(0, 3) + '****' + item.phonenumber.slice(7, 11)
})
});
}
})
}
}
}
@ -169,4 +184,11 @@ page {
}
}
}
.empty-tip {
text-align: center;
color: #bbb;
font-size: 26rpx;
padding: 60rpx 0;
}
</style>