lilishop-uniapp/pages/order/complain/complainInfo.vue

130 lines
4.0 KiB
Vue
Raw Normal View History

2021-05-13 11:03:32 +08:00
<template>
<view class="wrapper">
<view class="tips">我的投诉信息</view>
<u-cell-group>
2021-05-14 17:31:40 +08:00
<u-cell-item :arrow="false" :value="complainDetail.goodsName" title="投诉商品"></u-cell-item>
<u-cell-item :arrow="false" :value="statusData[complainDetail.complainStatus]" title="投诉状态"></u-cell-item>
<u-cell-item :arrow="false" :value="complainDetail.createTime" title="投诉时间"></u-cell-item>
<u-cell-item :arrow="false" :value="complainDetail.complainTopic" title="投诉主题"></u-cell-item>
<u-cell-item :arrow="false" :value="complainDetail.content" title="投诉内容"></u-cell-item>
<view class="row" v-if="complainDetail.orderComplaintImages">
<u-image width="100rpx" height="100rpx" border-radius="10" style="margin: 0 10rpx" v-for="(item, index) in complainDetail.orderComplaintImages" :key="index" :src="item"
@click="preview(complainDetail.orderComplaintImages, index)" />
2021-05-13 11:03:32 +08:00
</view>
</u-cell-group>
<view class="tips">商家申诉信息</view>
<u-cell-group>
2021-05-14 17:31:40 +08:00
<u-cell-item :arrow="false" :value="complainDetail.appealTime || '暂无'" title="申诉时间"></u-cell-item>
<u-cell-item :arrow="false" :value="complainDetail.appealContent || '暂无'" title="申诉内容"></u-cell-item>
<view class="row" v-if="complainDetail.appealImagesList">
<u-image width="100rpx" height="100rpx" border-radius="10" style="margin: 0 10rpx" v-for="(item, index) in complainDetail.appealImagesList"
@click="preview(complainDetail.appealImagesList, index)" :key="index" :src="item" />
2021-05-13 11:03:32 +08:00
</view>
</u-cell-group>
<view class="tips">对话详情</view>
2021-05-14 17:31:40 +08:00
<view class="speak-way" v-if="complainDetail.orderComplaintCommunications">
<view class="speak-msg seller" :key="i" v-for="(complaint, i) in complainDetail.orderComplaintCommunications">
2021-05-13 11:03:32 +08:00
{{
complaint.owner == "PLATFORM"
? "平台"
: complaint.owner == "BUYER"
? "买家"
: "卖家"
}}
<span>{{ complaint.content }}</span>
</view>
</view>
<view class="speak-way" v-else></view>
<view class="tips">平台仲裁</view>
<u-cell-group>
2021-05-14 17:31:40 +08:00
<u-cell-item :arrow="false" title="仲裁意见" :value="complainDetail.arbitrationResult || '暂无'"></u-cell-item>
2021-05-13 11:03:32 +08:00
</u-cell-group>
</view>
</template>
<script>
import { getComplainDetail } from "@/api/after-sale";
export default {
data() {
return {
2021-05-14 17:31:40 +08:00
complainDetail: "", //投诉详情
2021-05-13 11:03:32 +08:00
statusData: {
NEW: "新投诉",
2021-05-13 11:03:32 +08:00
NO_APPLY: "未申请",
APPLYING: "申请中",
COMPLETE: "已完成",
EXPIRED: "已失效",
2021-05-13 11:03:32 +08:00
CANCEL: "已取消",
WAIT_ARBITRATION:"等待仲裁"
2021-05-13 11:03:32 +08:00
},
};
},
2021-05-14 17:31:40 +08:00
2021-05-13 11:03:32 +08:00
onLoad(option) {
this.init(option.id);
},
methods: {
2021-05-14 17:31:40 +08:00
/**
* 点击图片放大或保存
*/
2021-05-13 11:03:32 +08:00
preview(urls, index) {
uni.previewImage({
current: index,
urls: urls,
longPressActions: {
itemList: ["保存图片"],
success: function (data) {},
fail: function (err) {},
},
});
},
2021-05-14 17:31:40 +08:00
/**
* 初始化投诉详情
*/
2021-05-13 11:03:32 +08:00
init(id) {
uni.showLoading({
title: "加载中",
});
getComplainDetail(id).then((res) => {
if (res.data.success) {
2021-05-14 17:31:40 +08:00
this.complainDetail = res.data.result;
} else {
uni.showToast({
title: res.data.message,
duration: 2000,
icon: "none",
});
2021-05-13 11:03:32 +08:00
}
uni.hideLoading();
});
},
},
};
</script>
<style lang="scss" scoped>
.row {
display: flex;
flex-wrap: wrap;
padding: 26rpx 32rpx;
2021-05-13 11:03:32 +08:00
}
2021-05-13 11:03:32 +08:00
.speak-msg {
padding: 26rpx 32rpx;
> span {
color: #999 !important;
}
}
.admin {
color: $main-color;
}
.speak-way {
background: #fff;
}
.wrapper {
padding: 16rpx;
}
.tips {
margin: 40rpx 32rpx;
2021-05-13 11:03:32 +08:00
}
</style>