diff --git a/App.vue b/App.vue index 6305afb..cd6c74a 100644 --- a/App.vue +++ b/App.vue @@ -9,8 +9,12 @@ onLaunch: function() {}, methods: { ...mapMutations(['socketOpenfalse']), + ...mapMutations(['scoket']), }, onShow: function() { + if (uni.getStorageSync('patientId') && !this.$store.state.socketOpen) { + this.scoket(); + } createMobileToken().then(res => { uni.setStorageSync("token", res.data.token) })