| | |
| | | <script> |
| | | import { mapState, mapMutations } from 'vuex'; |
| | | export default { |
| | | onShow() {}, |
| | | onLaunch() {}, |
| | | onHide() { |
| | | console.log('appvue隐藏后台'); |
| | | this.changeisconnect(false); |
| | | console.log(this.globalisUploadimg); |
| | | if (!this.globalisconnect && !this.globalisUploadimg) { |
| | | uni.switchTab({ |
| | | url: '/pages/tabbar-page/index-tabbar/index-tabbar' |
| | | }); |
| | | import { mapState, mapMutations } from 'vuex'; |
| | | export default { |
| | | onLaunch() {}, |
| | | onHide() { |
| | | console.log('appvue隐藏后台'); |
| | | this.changeisconnect(false); |
| | | console.log(this.globalisconnect, this.globalisUploadimg, this.globalisLogin); |
| | | |
| | | }, |
| | | 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的ws'); |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | ...mapMutations(['changeisconnect']) |
| | | }, |
| | | computed: { |
| | | ...mapState(['globalisconnect', 'globalisUploadimg', 'globalisLogin', 'is_open_socket']) |
| | | } |
| | | }, |
| | | methods: { |
| | | ...mapMutations(['changeisconnect']) |
| | | }, |
| | | computed: { |
| | | ...mapState(['globalisconnect', 'globalisUploadimg']) |
| | | } |
| | | }; |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | /*每个页面公共css */ |
| | | @import '@/uni_modules/uview-ui/index.scss'; |
| | | @font-face { |
| | | font-family: siYuanLight; |
| | | src: url('https://mx.jzeg.cn:9095/appimg/fonts/siyuannormal.OTF'); |
| | | } |
| | | @font-face { |
| | | font-family: weighting; |
| | | src: url('https://mx.jzeg.cn:9095/appimg/fonts/weighting.TTF'); |
| | | } |
| | | body { |
| | | font-family: siYuanLight, sans-serif; |
| | | } |
| | | <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> |