人民医院前端

App.vue 704B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <script>
  2. import { getCode } from '@/utils/dd'
  3. export default {
  4. onLaunch: function() {
  5. console.log('App Launch')
  6. },
  7. onShow: function() {
  8. console.log('App Show')
  9. // this.init()//判断是不是钉钉环境
  10. },
  11. onHide: function() {
  12. console.log('App Hide')
  13. },
  14. methods: {
  15. init() {
  16. getCode((type,code) => {
  17. console.log(type,code)
  18. if(type == 'H5') {
  19. if(code == 'fail'){
  20. uni.navigateTo({
  21. url: '/pages/noDing/noDing'
  22. });
  23. }
  24. }
  25. })
  26. },
  27. }
  28. }
  29. </script>
  30. <style>
  31. /*每个页面公共css */
  32. page{
  33. background: #f0eff4;
  34. }
  35. /* uni-page-head .uni-page-head__title{
  36. font-size: 28rpx !important;
  37. } */
  38. </style>