App.vue 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <script>
  2. export default {
  3. data() {
  4. return {
  5. main: null,
  6. poll: null,
  7. filter:null,
  8. pusher:null,
  9. scanObj:null
  10. }
  11. },
  12. onLaunch: function() {
  13. console.log("onLaunch")
  14. const users = this.$storage.getJson("users")
  15. if(!users){
  16. uni.reLaunch({
  17. url: "/pages/login/index",
  18. success:() => {
  19. plus.navigator.closeSplashscreen()
  20. }
  21. });
  22. }
  23. else{
  24. // this.$msg.getMsg(this.$storage.get('airportName'))
  25. plus.navigator.closeSplashscreen()
  26. }
  27. },
  28. onShow: function() {
  29. this.$devapi.TYPE_DEV_JQHWGEVIQUWVILBE = this.$storage.get("device")?Number(this.$storage.get("device")):0
  30. this.$devapi.RFIDIntervalTime = this.$storage.get("times")?Number(this.$storage.get("times")):0
  31. if(this.$storage.getJson("users")){
  32. // this.$msg.getMsg(this.$storage.get('airportName'))
  33. }
  34. console.log('App Show')
  35. },
  36. onHide: function() {
  37. console.log('App Hide')
  38. this.$msg.stopMsg()
  39. this.$devapi.RFIDStopInventory()
  40. this.$devapi.ISRFIDOPEN = !this.$devapi.ISRFIDOPEN
  41. }
  42. }
  43. </script>
  44. <style>
  45. /*每个页面公共css */
  46. </style>