index.vue 933 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <template>
  2. <view class="page">
  3. <web-view src="http://192.168.4.181:86/index#/index?tab=0"></web-view>
  4. </view>
  5. </template>
  6. <script>
  7. export default {
  8. data() {
  9. return {
  10. dateTime: new Date().getTime(),
  11. statusBarHeight: 0,
  12. windowHeight: 0,
  13. sysinfo: {},
  14. }
  15. },
  16. onShow() {
  17. uni.getSystemInfo({ // 获取当前设备的具体信息
  18. success: (sysinfo) => {
  19. this.dateTime = new Date().getTime();
  20. this.sysinfo = sysinfo;
  21. this.statusBarHeight = sysinfo.statusBarHeight == 0 ? 0 : sysinfo.statusBarHeight;
  22. this.windowHeight = sysinfo.windowHeight;
  23. }
  24. });
  25. },
  26. onBackPress(event) {
  27. this.dateTime = new Date().getTime()
  28. return false
  29. },
  30. methods: {
  31. }
  32. }
  33. </script>
  34. <style>
  35. .page {
  36. background-color: #F1F1F1;
  37. height: 100vh;
  38. }
  39. .webview {
  40. /* // height: 90vh; */
  41. top: 27px;
  42. position: fixed;
  43. left: 0;
  44. right: 0;
  45. /* height: calc(100vh - 27px); */
  46. }
  47. </style>