detail.vue 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <template>
  2. <view class="content">
  3. <view class="box">
  4. <view class="hflex acenter jbetween box_top">
  5. <view class="title">反馈内容</view>
  6. <view class="text_style1">{{detail.create_at}}</view>
  7. </view>
  8. <view class="text">{{detail.content}}</view>
  9. <view class="hflex acenter">
  10. <block v-for="(item,index) in detail.imgs" :key="index">
  11. <image mode="aspectFill" :src="item" class="img"></image>
  12. </block>
  13. </view>
  14. </view>
  15. <view class="box" v-if="detail.reply.length !== 0">
  16. <view class="hflex acenter jbetween box_top">
  17. <view class="title">回复</view>
  18. <view class="text_style1">{{detail.reply}}</view>
  19. </view>
  20. <view class="text">{{detail.repaly}}</view>
  21. </view>
  22. </view>
  23. </template>
  24. <script>
  25. import $api from '@/static/js/api.js'
  26. var that = ''
  27. export default {
  28. data() {
  29. return {
  30. id: '',
  31. detail: {}
  32. }
  33. },
  34. onLoad(options) {
  35. that = this
  36. if(options.id) {
  37. that.id = options.id
  38. that.getData(options.id)
  39. }
  40. },
  41. methods: {
  42. getData(id) {
  43. var pages = getCurrentPages()
  44. var prePage = pages[pages.length - 2]
  45. var list = prePage.$vm.pageList
  46. for(var i=0;i<list.length;i++) {
  47. if(list[i].id == id) {
  48. that.detail = list[i]
  49. }
  50. }
  51. },
  52. },
  53. }
  54. </script>
  55. <style lang="scss" scoped>
  56. .content {
  57. background: #F5F5F5;
  58. padding: 0 30rpx;
  59. .box {
  60. margin-top: 20rpx;
  61. width: 100%;
  62. background: #FFFFFF;
  63. border-radius: 20rpx;
  64. box-sizing: border-box;
  65. padding: 24rpx 20rpx;
  66. .box_top {
  67. width: 100%;
  68. padding-bottom: 14rpx;
  69. border-bottom: 1rpx solid #F5F5F5;
  70. .title {
  71. font-size: 30rpx;
  72. font-weight: 500;
  73. color: #222222;
  74. }
  75. .text_style1 {
  76. font-size: 26rpx;
  77. font-weight: 400;
  78. color: #666666;
  79. }
  80. }
  81. .text {
  82. font-size: 26rpx;
  83. font-weight: 400;
  84. color: #222222;
  85. line-height: 36rpx;
  86. margin: 24rpx 0 20rpx;
  87. }
  88. .img {
  89. width: 208rpx;
  90. height: 208rpx;
  91. border-radius: 20rpx;
  92. margin: 0 14rpx 20rpx 0;
  93. }
  94. }
  95. }
  96. </style>