App.vue 836 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <script>
  2. export default {
  3. onLaunch: function() {
  4. console.log('App Launch')
  5. },
  6. onShow: function() {
  7. console.log('show')
  8. this.getAuth();
  9. },
  10. onHide: function() {
  11. console.log('App Hide')
  12. },
  13. methods:{
  14. getAuth(){
  15. this.$api.getCurrentAuthCode().then(resp=>{
  16. uni.setStorageSync('perList',resp.data);
  17. })
  18. }
  19. }
  20. }
  21. </script>
  22. <style lang="scss">
  23. /*每个页面公共css */
  24. /* uView基础样式 */
  25. @import "uview-ui/index.scss";
  26. //全局页面背景色
  27. page{
  28. background-color: #f7f7f7;
  29. }
  30. // 点击时背景灰色
  31. .hover-class{
  32. background-color: #f7f7f7!important;
  33. }
  34. //底部安全距离
  35. .bottom-safety{
  36. padding-bottom: constant(safe-area-inset-bottom);
  37. padding-bottom: env(safe-area-inset-bottom);
  38. }
  39. //全局白色背景
  40. .bgc-f{
  41. background-color: #ffffff;
  42. }
  43. </style>