From 37a0b120e66bcda386b0a8c256ca0fe9f09b29cb Mon Sep 17 00:00:00 2001
From: qingyiay <2386314947@qq.com>
Date: 星期四, 29 六月 2023 18:16:26 +0800
Subject: [PATCH] 司机首页添加状态,细节修改
---
App.vue | 75 +++++++++++++++++++++----------------
1 files changed, 42 insertions(+), 33 deletions(-)
diff --git a/App.vue b/App.vue
index 697e173..758985e 100644
--- a/App.vue
+++ b/App.vue
@@ -1,37 +1,46 @@
<script>
-import { mapState, mapMutations } from 'vuex';
-export default {
- onShow() {},
- onHide() {
- console.log('appvue闅愯棌鍚庡彴');
- this.changeisconnect(false);
- if (!this.globalisconnect) {
- 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.$store.dispatch('websocketInit')
+ this.changeisconnect(false);
+ console.log('appvue鐨剋s');
+ }
+ },
+ methods: {
+ ...mapMutations(['changeisconnect'])
+ },
+ computed: {
+ ...mapState(['globalisconnect', 'globalisUploadimg', 'globalisLogin'])
}
- },
- methods: {
- ...mapMutations(['changeisconnect'])
- },
- computed: {
- ...mapState(['globalisconnect'])
- }
-};
+ };
</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>
+<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>
\ No newline at end of file
--
Gitblit v1.9.1