App.vue 841 B

123456789101112131415161718192021222324252627282930313233343536
  1. <script>
  2. import { watch } from 'vue';
  3. import store from '@/store'
  4. import { onLaunch, onShow, onHide } from "@dcloudio/uni-app";
  5. import soketMixin from '@/utils/soketMixin'
  6. export default {
  7. data: {
  8. userId: uni.getStorageSync('userId') //读取本地存储
  9. },
  10. mixins: [soketMixin],
  11. onLaunch: function () {
  12. //develop:开发版 trial:体验版 release:正式版
  13. },
  14. // onShow: function () {
  15. // //设置默认角色
  16. // // uni.setStorageSync('userType', 1);
  17. // console.log('App Show')
  18. // },
  19. // onHide: function () {
  20. // console.log('App Hide')
  21. // },
  22. // onMounted() {
  23. // console.log("TCL: onMounted -> onMounted", onMounted)
  24. // },
  25. }
  26. </script>
  27. <style lang="scss">
  28. /* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
  29. @import "uview-plus/index.scss";
  30. @import '@/static/scss/index.scss';
  31. </style>