log.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <!-- 售后进度 -->
  2. <template>
  3. <s-layout title="售后进度">
  4. <view class="log-box">
  5. <view class="log-content-box ss-flex" v-for="(item, index) in state.info" :key="item.title">
  6. <view class="log-icon ss-flex-col ss-col-center ss-m-r-20">
  7. <text class="cicon-title" :class="index === 0 ? 'activity-color' : ''"></text>
  8. <view v-if="state.info.length - 1 != index" class="line"></view>
  9. </view>
  10. <view>
  11. <view class="text">{{ item.log_type_text }}</view>
  12. <su-parse class="richtext" :content="item.content"></su-parse>
  13. <view class="" v-if="item.images?.length">
  14. <scroll-view class="scroll-box" scroll-x scroll-anchoring>
  15. <view class="ss-flex">
  16. <view v-for="i in item.images" :key="i" class="ss-m-r-20"
  17. ><image class="content-img" :src="sheep.$url.static(i)" />
  18. </view>
  19. </view>
  20. </scroll-view>
  21. </view>
  22. <view class="date">{{ item.create_time }}</view>
  23. </view>
  24. </view>
  25. </view>
  26. </s-layout>
  27. </template>
  28. <script setup>
  29. import sheep from '@/sheep';
  30. import { onLoad } from '@dcloudio/uni-app';
  31. import { computed, reactive } from 'vue';
  32. const state = reactive({
  33. active: 1,
  34. list: [
  35. {
  36. title: '买家下单',
  37. desc: '2018-11-11',
  38. },
  39. {
  40. title: '卖家发货',
  41. desc: '2018-11-12',
  42. },
  43. {
  44. title: '买家签收',
  45. desc: '2018-11-13',
  46. },
  47. {
  48. title: '交易完成',
  49. desc: '2018-11-14',
  50. },
  51. ],
  52. });
  53. async function getDetail(id) {
  54. const { data } = await sheep.$api.order.aftersale.detail(id);
  55. state.info = data.logs;
  56. }
  57. onLoad((options) => {
  58. state.aftersaleId = options.id;
  59. getDetail(options.id);
  60. });
  61. </script>
  62. <style lang="scss" scoped>
  63. .log-box {
  64. padding: 24rpx 24rpx 24rpx 40rpx;
  65. background-color: #fff;
  66. .log-content-box {
  67. align-items: stretch;
  68. }
  69. .log-icon {
  70. height: inherit;
  71. .cicon-title {
  72. font-size: 30rpx;
  73. color: #dfdfdf;
  74. }
  75. .activity-color {
  76. color: #60bd45;
  77. }
  78. .line {
  79. width: 1px;
  80. height: 100%;
  81. background: #dfdfdf;
  82. }
  83. }
  84. .text {
  85. font-size: 28rpx;
  86. font-weight: 500;
  87. color: #333333;
  88. }
  89. .richtext {
  90. font-size: 24rpx;
  91. font-weight: 500;
  92. color: #999999;
  93. margin: 20rpx 0 0 0;
  94. }
  95. .content-img {
  96. margin-top: 20rpx;
  97. width: 200rpx;
  98. height: 200rpx;
  99. }
  100. .date {
  101. margin-top: 20rpx;
  102. font-size: 24rpx;
  103. font-family: OPPOSANS;
  104. font-weight: 400;
  105. color: #999999;
  106. margin-bottom: 40rpx;
  107. }
  108. }
  109. </style>