ruoyi-geek-App/src/App.vue

31 lines
677 B
Vue
Raw Normal View History

2023-08-12 15:44:27 +00:00
<script>
export default {
onLaunch: function () {
console.log('App Launch')
2023-09-12 17:32:10 +00:00
this.$socket.connect({ url: "ws://127.0.0.1:8080/sc" }).then(res => {
console.log("success");
this.$socket.onMessage(res => {
console.log("onmessage",res);
})
this.$socket.on("on").then(res=>{
console.log("on",res);
})
this.$socket.send({msg:"xxx"},true).then(res=>{
console.log("callback-uuid",res);
})
this.$socket.send({event:"on"})
})
2023-08-12 15:44:27 +00:00
},
onShow: function () {
console.log('App Show')
},
onHide: function () {
console.log('App Hide')
}
}
</script>
<style lang="scss">
@import "uview-plus/index.scss";
@import '@/static/scss/index.scss';
</style>