index.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <template>
  2. <view>
  3. <view class="work" :style="{height: `${windowHeight}px`}">
  4. <uni-nav-bar title="路况" :background-color="backgroundColor" :border="navborder" statusBar='true' fixed="true" >
  5. </uni-nav-bar>
  6. <!-- 主体 -->
  7. <!-- 家长 -->
  8. <view class="tab flex0">
  9. <view class="tit" :class="tabidx==idx?'act':''" @click="getTab(idx)" v-for="(ite,idx) in tablist" :key="idx">
  10. <view class="f15 tits" >{{ite.tit}}</view>
  11. <image :src="tapline" class="line"></image>
  12. </view>
  13. </view>
  14. <view class="flex1 road">
  15. <!-- 路况 公共的-->
  16. <lu-swiper></lu-swiper>
  17. <view class=" road_big">
  18. <video id="myVideo" src="https://img.cdn.aliyun.dcloud.net.cn/guide/uniapp/%E7%AC%AC1%E8%AE%B2%EF%BC%88uni-app%E4%BA%A7%E5%93%81%E4%BB%8B%E7%BB%8D%EF%BC%89-%20DCloud%E5%AE%98%E6%96%B9%E8%A7%86%E9%A2%91%E6%95%99%E7%A8%8B@20200317.mp4"
  19. @error="videoErrorCallback" :danmu-list="danmuList" enable-danmu danmu-btn controls></video>
  20. <view class="flexc road_fot">
  21. <view class="flex1">
  22. <view class="flext">
  23. <view class="f15 mb6 fw co16 flex01">黄山路与潜山路交口路况</view>
  24. <view class="road_t">畅通</view>
  25. </view>
  26. <view class="f13 coa">2023-05-18 11:15:48</view>
  27. </view>
  28. <view class="flex0 road_r">
  29. <image :src="rcheck" ></image>
  30. </view>
  31. </view>
  32. </view>
  33. <!-- 视频 -->
  34. <view class="mt20">
  35. <view class="hsta_t flexcj mb20">
  36. <view class="hsta_tl f17 ">
  37. 其他路况
  38. <image :src="tapline" class="hline"></image>
  39. </view>
  40. </view>
  41. <luVideo></luVideo>
  42. </view>
  43. </view>
  44. </view>
  45. </view>
  46. </template>
  47. <script>
  48. import tabList from "@/components/toptab/tab.vue"
  49. import shList from "@/components/shlist/list.vue"
  50. import luSwiper from "@/components/home/luswiper.vue"
  51. import luVideo from "@/components/home/luvideo.vue"
  52. export default {
  53. components:{tabList,shList,luSwiper,luVideo},
  54. data(){
  55. return{
  56. windowHeight: 0,
  57. wtopimg:require("@/static/images/wtop.png"),
  58. tapline:require("@/static/images/hline.png"),
  59. rcheck:require("@/static/images/rcheck.png"),
  60. backgroundColor:'transparent',
  61. navborder:false,
  62. tabidx:0,
  63. tablist:[{tit:'黄铺中心小学'},{tit:'杜埠中心小学'}],
  64. }
  65. },
  66. methods:{
  67. getTab(idx){
  68. this.tabidx=idx;
  69. },
  70. },
  71. mounted() {
  72. var systemInfo=uni.getSystemInfoSync();
  73. this.windowHeight=Number(systemInfo.windowHeight);
  74. },
  75. onReady: function(res) {
  76. // #ifndef MP-ALIPAY
  77. this.videoContext = uni.createVideoContext('myVideo')
  78. // #endif
  79. },
  80. onLoad: function() {
  81. }
  82. }
  83. </script>
  84. <style lang="scss" scoped>
  85. .work{display: flex;flex-direction: column;overflow: hidden;background: linear-gradient(180deg, rgba(222,230,255,0.72) 28.000000000000004%, rgba(232,236,198,0) 100%);background-size: 100% 450rpx;background-repeat: no-repeat;
  86. .tab{
  87. display: flex;overflow-y: auto;align-items: center;
  88. .tit{position: relative;padding:32rpx 36rpx;color: #666666 ;
  89. &.act{
  90. .tits{font-size: 32rpx;font-weight: bold;}
  91. .line{display: block;}
  92. }
  93. }
  94. .line{width: 40rpx;height: 12rpx;position: absolute;left: 50%;margin-left: -20rpx;bottom: 16rpx;display: none;}
  95. }
  96. .road{overflow: auto;padding: 24rpx 0;}
  97. .road_big{background: #FFFFFF;border-radius: 14rpx;margin: 30rpx 36rpx 0;overflow: hidden;
  98. video{width: 100%;height: 376rpx;}
  99. .road_fot{
  100. padding:20rpx 24rpx 28rpx;
  101. .road_t{min-width: 70rpx;height: 30rpx;background: #5CC37D;border-radius: 16rpx;padding: 0 8rpx;line-height: 30rpx;font-size: 24rpx;color: #FFFFFF;margin-left: 16rpx;margin-top: 6rpx;}
  102. .road_r{width: 80rpx;height: 80rpx;margin-left: 16rpx;display: flex;align-items: center;justify-content: center;
  103. image{width: 50rpx;height: 50rpx;}
  104. }
  105. }
  106. }
  107. .hsta_t{padding: 0 36rpx;
  108. .hsta_tl{font-weight: bold;color: #161616;position: relative;
  109. .hline{position: absolute;bottom: -20rpx;width: 40rpx;height: 11rpx;left: 50%;margin-left: -20rpx;}
  110. }
  111. }
  112. }
  113. </style>