tripHintDetails.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <template>
  2. <view class="tripHintDetails">
  3. <!-- 导航栏 -->
  4. <navigationBar title="出行提示">
  5. </navigationBar>
  6. <view class="main">
  7. <scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-Y" @scrolltolower="lower">
  8. <view class="scroll-view-item">
  9. <view class="list">
  10. <text class="name">线路名称:</text>
  11. <text class="content">{{details.roadName}}</text>
  12. </view>
  13. <view class="list">
  14. <text class="name">详细地点:</text>
  15. <text class="content">{{details.address}}</text>
  16. </view>
  17. <view class="detailsImg" v-if="details.imgUrl">
  18. <image :src="details.imgUrl" mode="aspectFit" class="img"></image>
  19. <!-- <image src="../../static/images/detailsImg.png" mode="" class="img"></image> -->
  20. </view>
  21. <view class="list describe">
  22. <text class="name">预警提示:</text>
  23. </view>
  24. <u--textarea v-model="details.warnHint" height="141.05" :describe="true"></u--textarea>
  25. <view class="list">
  26. <text class="name">发布时间:</text>
  27. <text class="content">{{details.createTime}}</text>
  28. </view>
  29. </view>
  30. </scroll-view>
  31. </view>
  32. </view>
  33. </template>
  34. <script>
  35. import {
  36. getTripDetails
  37. } from "@/api/list.js"
  38. export default {
  39. data() {
  40. return {
  41. // 竖向滚动条位置
  42. scrollTop: 0,
  43. old: {
  44. scrollTop: 0
  45. },
  46. // 详情
  47. details: {}
  48. };
  49. },
  50. onLoad(data) {
  51. this.getData(data.id)
  52. },
  53. methods: {
  54. // 触底事件
  55. lower(e) {
  56. // console.log(e)
  57. },
  58. // 获取数据
  59. async getData(id) {
  60. let res = await getTripDetails(id)
  61. if (res.code == 200) {
  62. this.details = res.data
  63. // console.log(res);
  64. }
  65. }
  66. },
  67. }
  68. </script>
  69. <style lang="scss" scoped>
  70. .tripHintDetails {
  71. height: 100%;
  72. .list {
  73. display: flex;
  74. justify-content: space-between;
  75. align-items: center;
  76. padding: 10.53rpx 0;
  77. border-bottom: 2.11rpx solid #E8E8E8;
  78. margin-bottom: 21.05rpx;
  79. .name {
  80. font-weight: 600;
  81. }
  82. }
  83. .u-textarea {
  84. margin-bottom: 21.05rpx;
  85. }
  86. .describe {
  87. border-bottom: 0;
  88. margin-bottom: 0;
  89. }
  90. .detailsImg {
  91. display: flex;
  92. justify-content: space-between;
  93. align-items: center;
  94. margin-bottom: 21.05rpx;
  95. .img {
  96. width: 303.16rpx;
  97. height: 303.16rpx;
  98. border-radius: 8.42rpx;
  99. }
  100. }
  101. }
  102. </style>