6170分享设备页面功能开发

This commit is contained in:
fengerli
2025-07-19 10:22:48 +08:00
parent bc3bea6df0
commit 1663ae75e4
9 changed files with 321 additions and 89 deletions

View File

@ -6,7 +6,6 @@
<view class="section" @click="shareDevice">
<text class="section-title">分享设备</text>
</view>
<!-- 分享管理 -->
<view class="section" @click="shareManagement">
<text class="section-title">分享管理</text>
@ -19,14 +18,22 @@
export default {
data() {
return {
itemInfo:""
}
},
methods: {
// 分享设备
shareDevice(){
uni.navigateTo({
url: '/pages/6170/shareDevices/index'
url: '/pages/6170/shareDevices/index',
events: {
ack: function(data) {}
},
success: (res) => {
res.eventChannel.emit('shareDevice', {
data: this.itemInfo,
});
}
});
},
// 分享管理
@ -35,7 +42,14 @@
url: '/pages/6170/shareManagement/index'
});
}
},
onLoad() {
const eventChannel = this.getOpenerEventChannel();
// 监听 'shareDevice' 事件,获取传过来的数据
eventChannel.on('share', (data) => {
console.log(data,'datat');
this.itemInfo = data.data;
})
}
}
</script>