From 71ba67906896248aa2df5e70756b997fad9a9033 Mon Sep 17 00:00:00 2001 From: wk Date: 星期一, 09 九月 2024 17:54:18 +0800 Subject: [PATCH] feat:门卫 --- App.vue | 50 ++++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 42 insertions(+), 8 deletions(-) diff --git a/App.vue b/App.vue index 5eb0a20..aefc22f 100644 --- a/App.vue +++ b/App.vue @@ -1,18 +1,52 @@ <script> + import { mapState, mapMutations } from 'vuex'; export default { - onLaunch: function() { - console.log('App Launch') + onLaunch() {}, + onHide() { + console.log('appvue闅愯棌鍚庡彴'); + this.changeisconnect(false); + console.log(this.globalisconnect, this.globalisUploadimg, this.globalisLogin); + }, - onShow: function() { - console.log('App Show') + onShow() { + console.log('appvue鏄剧ず'); + if (!this.globalisconnect && !this.globalisUploadimg && this.globalisLogin) { + if (!this.is_open_socket) { + this.$store.dispatch('websocketInit') + this.changeisconnect(true); + console.log('appvue鐨剋s'); + } + } }, - onHide: function() { - console.log('App Hide') + methods: { + ...mapMutations(['changeisconnect']) + }, + computed: { + ...mapState(['globalisconnect', 'globalisUploadimg', 'globalisLogin', 'is_open_socket']) } - } + }; </script> -<style lang="scss" scoped> +<style lang="scss" + scoped> /*姣忎釜椤甸潰鍏叡css */ @import '@/uni_modules/uview-ui/index.scss'; + + @font-face { + font-family: siYuanLight; + src: url('https://wrzs.czjlchem.com:9090/appimg/fonts/siyuannormal.OTF'); + } + + @font-face { + font-family: weighting; + src: url('https://wrzs.czjlchem.com:9090/appimg/fonts/weighting.TTF'); + } + + body { + font-family: siYuanLight, sans-serif; + } </style> +<style lang='scss'> + @import '@/utils/publicStyle.scss'; + +</style> \ No newline at end of file -- Gitblit v1.9.1