6170分享设备页面功能开发
This commit is contained in:
@ -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>
|
||||
|
Reference in New Issue
Block a user