qingyiay
2023-05-15 b3e602a218cd1a6a6bcad672a5ee2cb14efca614
App.vue
@@ -1,19 +1,22 @@
<script>
import { mapState, mapMutations } from 'vuex';
export default {
   onShow() {},
   methods: {}
   // created() {
   //    uni.loadFontFace({
   //       family: 'siYuanLight', // 字体名称,可以自定义
   //       source: 'url("/utils/fonts/siyuan.OTF")', // 字体文件路径
   //       success() {
   //          console.log('字体加载成功');
   //       },
   //       fail() {
   //          console.log('字体加载失败');
   //       }
   //    });
   // }
   onHide() {
      console.log('appvue隐藏后台');
      this.changeisconnect(false);
      if (!this.globalisconnect) {
         uni.switchTab({
            url: '/pages/tabbar-page/index-tabbar/index-tabbar'
         });
      }
   },
   methods: {
      ...mapMutations(['changeisconnect'])
   },
   computed: {
      ...mapState(['globalisconnect'])
   }
};
</script>
@@ -22,7 +25,7 @@
@import '@/uni_modules/uview-ui/index.scss';
@font-face {
   font-family: siYuanLight;
   src: url('https://mx.jzeg.cn:9095/appimg/fonts/siyuan.OTF');
   src: url('https://mx.jzeg.cn:9095/appimg/fonts/siyuannormal.OTF');
}
@font-face {
   font-family: weighting;
@@ -31,8 +34,4 @@
body {
   font-family: siYuanLight, sans-serif;
}
// @font-face {
//    font-family: 'weighting';
//    src: url('./utils/fonts/weighing.TTF');
// }
</style>