|
@@ -1,57 +1,35 @@
|
|
|
+<!-- 售后日志的每一项展示 -->
|
|
|
<template>
|
|
|
<view class="log-item ss-flex">
|
|
|
<view class="log-icon ss-flex-col ss-col-center ss-m-r-20">
|
|
|
- <text class="cicon-title" :class="index === 0 ? 'activity-color' : ''"></text>
|
|
|
- <view v-if="data.length - 1 != index" class="line"></view>
|
|
|
+ <text class="cicon-title" :class="index === 0 ? 'activity-color' : ''" />
|
|
|
+ <view v-if="data.length - 1 !== index" class="line" />
|
|
|
</view>
|
|
|
<view>
|
|
|
- <view class="text">{{ item.log_type_text }}</view>
|
|
|
- <mp-html class="richtext" :content="item.content"></mp-html>
|
|
|
- <view class="" v-if="item.images?.length">
|
|
|
- <scroll-view class="scroll-box" scroll-x scroll-anchoring>
|
|
|
- <view class="ss-flex">
|
|
|
- <view v-for="i in item.images" :key="i" class="ss-m-r-20">
|
|
|
- <su-image
|
|
|
- class="content-img"
|
|
|
- isPreview
|
|
|
- :previewList="state.commentImages"
|
|
|
- :current="index"
|
|
|
- :src="i"
|
|
|
- :height="120"
|
|
|
- :width="120"
|
|
|
- mode="aspectFit"
|
|
|
- ></su-image>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </scroll-view>
|
|
|
+ <view class="text">{{ item.content }}</view>
|
|
|
+ <view class="date">
|
|
|
+ {{ sheep.$helper.timeFormat(item.createTime, 'yyyy-mm-dd hh:MM:ss') }}
|
|
|
</view>
|
|
|
- <view class="date">{{ item.create_time }}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
<script setup>
|
|
|
import sheep from '@/sheep';
|
|
|
- import { reactive } from 'vue';
|
|
|
+
|
|
|
const props = defineProps({
|
|
|
item: {
|
|
|
- type: Object,
|
|
|
+ type: Object, // 当前日志
|
|
|
default() {},
|
|
|
},
|
|
|
index: {
|
|
|
- type: Number,
|
|
|
+ type: Number, // item 在 data 的下标
|
|
|
default: 0,
|
|
|
},
|
|
|
data: {
|
|
|
- type: Object,
|
|
|
+ type: Object, // 日志列表
|
|
|
default() {},
|
|
|
},
|
|
|
});
|
|
|
- const state = reactive({
|
|
|
- commentImages: [],
|
|
|
- });
|
|
|
- props.item.images?.forEach((i) => {
|
|
|
- state.commentImages.push(sheep.$url.cdn(i));
|
|
|
- });
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
.log-item {
|