分享ui
parent
f7592e59ec
commit
a98be528d2
|
|
@ -64,6 +64,13 @@ export function findAllUser(query) {
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export function getRecentShareUser(query) {
|
||||||
|
return request({
|
||||||
|
url: '/assets/userAgri/getRecentShareUser',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export function batchAssociaUser(data) {
|
export function batchAssociaUser(data) {
|
||||||
return request({
|
return request({
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<view class="page">
|
<view class="page">
|
||||||
<!-- 设备卡片 -->
|
<!-- 设备卡片 -->
|
||||||
<view class="device-card">
|
<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">
|
<view class="device-info">
|
||||||
<text class="device-name">{{ deviceInfo.name }}</text>
|
<text class="device-name">{{ deviceInfo.name }}</text>
|
||||||
<text class="device-serial">序列号:{{ deviceInfo.serial }}</text>
|
<text class="device-serial">序列号:{{ deviceInfo.serial }}</text>
|
||||||
|
|
@ -108,7 +108,7 @@ page {
|
||||||
|
|
||||||
.page {
|
.page {
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
padding: 20rpx 25rpx;
|
padding: 30rpx 25rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 设备卡片 */
|
/* 设备卡片 */
|
||||||
|
|
@ -124,6 +124,7 @@ page {
|
||||||
height: 90rpx;
|
height: 90rpx;
|
||||||
margin-right: 20rpx;
|
margin-right: 20rpx;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
border-radius: 12rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.device-info {
|
.device-info {
|
||||||
|
|
@ -185,7 +186,7 @@ page {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
.target-item {
|
.target-item {
|
||||||
padding: 40rpx 34rpx;
|
padding: 24rpx 34rpx;
|
||||||
border-bottom: 1rpx solid #f2f2f2;
|
border-bottom: 1rpx solid #f2f2f2;
|
||||||
|
|
||||||
&:last-child { border-bottom: none; }
|
&:last-child { border-bottom: none; }
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ page {
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding: 30rpx 20rpx;
|
padding: 40rpx 30rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-hint {
|
.page-hint {
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,7 @@ export default {
|
||||||
{ icon: 'https://img.xiaoces.com/photos/share/access.png', label: '选择视频和权限' },
|
{ icon: 'https://img.xiaoces.com/photos/share/access.png', label: '选择视频和权限' },
|
||||||
{ icon: 'https://img.xiaoces.com/photos/share/share__.png', label: '接受分享' }
|
{ icon: 'https://img.xiaoces.com/photos/share/share__.png', label: '接受分享' }
|
||||||
],
|
],
|
||||||
featureTags: ['功能按需分享', '最多分享 5 人', '仅视频设备'],
|
featureTags: ['功能按需分享', '最多分享 5 人', '仅大棚设备'],
|
||||||
activeSubTab: 'mine',
|
activeSubTab: 'mine',
|
||||||
subTabs: [
|
subTabs: [
|
||||||
{ label: '我的分享', value: 'mine' },
|
{ label: '我的分享', value: 'mine' },
|
||||||
|
|
@ -312,6 +312,7 @@ page {
|
||||||
height: 90rpx;
|
height: 90rpx;
|
||||||
margin-right: 20rpx;
|
margin-right: 20rpx;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
border-radius: 12rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.device-info {
|
.device-info {
|
||||||
|
|
|
||||||
|
|
@ -22,30 +22,28 @@
|
||||||
<view class="recent-list">
|
<view class="recent-list">
|
||||||
<view
|
<view
|
||||||
v-for="item in recentList"
|
v-for="item in recentList"
|
||||||
:key="item.id"
|
:key="item.userId"
|
||||||
class="recent-item"
|
class="recent-item"
|
||||||
@click="selectRecent(item)"
|
@click="selectRecent(item)"
|
||||||
>
|
>
|
||||||
<text class="recent-phone">{{ item.phone }}</text>
|
<text class="recent-phone">{{ item.privity }}</text>
|
||||||
<view class="arrow">›</view>
|
<view class="arrow">›</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view v-if="recentList.length==0" class="empty-tip">暂无最近分享记录</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import {findAgriUser, getRecentShareUser} from "@/api/system/assets/userAgri";
|
||||||
|
import store from "@/store";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
phone: '',
|
phone: '',
|
||||||
// 最近分享记录(实际对接API)
|
// 最近分享记录(实际对接API)
|
||||||
recentList: [
|
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' }
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
@ -53,6 +51,9 @@ export default {
|
||||||
return /^1\d{10}$/.test(this.phone)
|
return /^1\d{10}$/.test(this.phone)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onShow() {
|
||||||
|
this.getRecentList()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onPhoneInput(e) {
|
onPhoneInput(e) {
|
||||||
this.phone = e.detail.value
|
this.phone = e.detail.value
|
||||||
|
|
@ -69,6 +70,20 @@ export default {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/home/invite/selectDevice/index?phone=${this.phone}`
|
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>
|
</style>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue