index.vue 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <template>
  2. <view class="index-box">
  3. <Nav :leftShow='false' :customNav='true' :bgckgroundBox='bgckgroundBox'>
  4. <template>
  5. <view slot="custom" class="align-items-center">
  6. <uni-icons type="location-filled" size="20"></uni-icons>
  7. <view class="fs-32 fw-600 ml-10">重庆邮电大学...</view>
  8. <image class="nav-icon ml-10" src="@/static/img/index/index-right.png" mode=""></image>
  9. </view>
  10. </template>
  11. </Nav>
  12. <image class="bg-img" src="@/static/img/index/index-bg.png" mode="aspectFit"></image>
  13. <view class="index-box-1 box-border-box plr-24">
  14. 11111111111111
  15. </view>
  16. </view>
  17. </template>
  18. <script>
  19. export default {
  20. data() {
  21. return {
  22. bgckgroundBox:'transparent',
  23. }
  24. },
  25. onPageScroll(e) {
  26. if(e.scrollTop>1){
  27. this.bgckgroundBox = '#fff';
  28. }else{
  29. this.bgckgroundBox = 'transparent';
  30. }
  31. },
  32. mounted() {
  33. },
  34. methods: {
  35. },
  36. }
  37. </script>
  38. <style lang="scss" scoped>
  39. .index-box{
  40. position: relative;
  41. .bg-img{
  42. width: 100%;
  43. height: 1220rpx;
  44. position: absolute;
  45. top: 0;
  46. left: 0;
  47. z-index: -1;
  48. }
  49. .nav-icon{
  50. width: 32rpx;
  51. height: 32rpx;
  52. }
  53. .index-box-1{
  54. width: 100%;
  55. height: 3000rpx;
  56. }
  57. }
  58. </style>