You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

352 lines
7.8 KiB

<template>
<view class="main">
<view class="top" :style="{height:iSMT+'px'}"></view>
<!-- 头部导航 -->
<view class="header">
<view class="back-icon">
<image @click="goBack()" src="/static/customer-service-platform/cs-platform-back.png"
class="header-icon-image"></image>
</view>
<view class="title">智能客服中台</view>
<view class="notification-icon">
<image src="/static/customer-service-platform/message.png" class="header-icon-image"></image>
</view>
</view>
<!-- 内容区域 - 使用滚动视图 -->
<scroll-view scroll-y class="content-container">
<view class="list-wrapper" v-if="historyList.length > 0">
<view class="content-header">
<text class="content-title">历史反馈内容</text>
</view>
<view class="card-line"></view>
<view v-for="(item, idx) in historyList" :key="item.id" class="history-item card">
<view class="item-head">
<view class="dot-outer">
<view class="dot-inner"></view>
</view>
<text class="feedback-time">{{ item.createdAt }}</text>
<text class="feedback-status">
{{ statusText }}
<image class="smile-icon" src="/static/customer-service-platform/smile-icon.png"></image>
</text>
</view>
<view class="content-box">
<text class="content-text">{{ item.content }}</text>
<text class="count">{{ item.content.length }}/200</text>
</view>
<view v-if="item.images && item.images.length" class="thumb-row">
<view v-for="(img, i) in item.images" :key="i" class="thumb-slot"
@click="previewImage(item.images, i)">
<image :src="img" mode="scaleToFill" class="thumb-img" />
</view>
</view>
</view>
</view>
<!-- 如果没有历史,显示空态 -->
<view v-if="historyList.length === 0" class="empty">
<image mode="aspectFit" class="empty-img" src="/static/customer-service-platform/empty-content.png">
</image>
<text class="empty-tip">暂无内容~</text>
</view>
</scroll-view>
</view>
</template>
<script>
import {
getFeedbackRecords,
addFeedbackRecord
} from "../../api/customerServicePlatform/customerServicePlatform";
export default {
data() {
return {
iSMT: 0,
// historyList: [],
statusText: '反馈成功',
historyList: [{
id: 1,
createdAt: '2025/10/16 11:46',
content: '你是不是总是看着股票回调时心里发慌,不知道什么时候进场才是最安全的?追高买错被套牢,亏得眼泪直流aaa,回调时又不敢进,错过了反弹的机会?今天,我将带你掌握一套精准确认底部的三步法——通过超卖信号、关键K线和强势启动点,帮助你轻松识别市场底部,稳健进场,避开高位追涨,赚取大波利润!我们今天会结合特斯拉(TSLA)和阿里巴巴(BABA)的经aaa典案例,帮助你更好地理解这些技巧,赶快拿起纸笔,开始学',
images: []
},
{
id: 2,
createdAt: '2025/10/16 11:46',
content: '请描述您想反馈的内容\n第二条示例文本,长度可以不一样,测试多行显示和字数统计功能。这里补充一些文字以便测试外观和换行效果。',
images: []
}
]
};
},
mounted() {
this.iSMT = uni.getSystemInfoSync().statusBarHeight;
this.loadHistoryList()
},
methods: {
goBack() {
if (typeof uni !== 'undefined' && uni.navigateBack) {
uni.navigateBack();
} else {
window.history.back();
}
},
async loadHistoryList() {
const res = await getFeedbackRecords({
token: 'dccec0b65a94f498b8183a17589ab16e'
})
console.log(res)
if (res.code == 200) {
this.historyList = res.data.map(item => {
const images = [item.image1, item.image2, item.image3].filter(img => !!img)
return {
id: item.id,
createdAt: item.createdAt,
content: item.content,
images,
dccode: item.dccode
}
})
}
},
previewImage(list, index) {
if (typeof uni !== 'undefined' && uni.previewImage) {
uni.previewImage({
current: list[index],
urls: list
});
} else {
// H5 fallback
window.open(list[index], '_blank');
}
}
}
};
</script>
<style scoped>
.main {
display: flex;
flex-direction: column;
height: 100vh;
background-color: #ffffff;
}
.header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20rpx 30rpx;
background-color: #ffffff;
}
.title {
color: #000000;
text-align: center;
font-size: 32rpx;
font-style: normal;
font-weight: 400;
}
.back-icon,
.notification-icon {
width: 40rpx;
display: flex;
align-items: center;
justify-content: center;
}
.header-icon-image {
width: 40rpx;
height: 40rpx;
object-fit: contain;
}
.content-container {
padding: 20rpx;
padding-top: 0;
width: 100%;
box-sizing: border-box;
overflow-x: hidden;
}
/* 列表包装器,居中卡片 */
.list-wrapper {
width: 90%;
margin: 0 auto;
padding: 20rpx 40rpx;
flex-direction: column;
align-items: center;
gap: 20rpx;
box-sizing: border-box;
border-radius: 12rpx;
border: 4rpx solid #FCC8D4;
background: linear-gradient(180deg, #FCC8D3 0%, #FEF0F3 30%, #FFF 100%);
}
.content-header {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
}
.content-title {
color: #000000;
font-size: 32rpx;
font-style: normal;
font-weight: 400;
line-height: normal;
}
.card-line {
margin-top: 20rpx;
width: 100%;
height: 2rpx;
border-radius: 2rpx;
background: #FFF;
}
/* 每一条历史卡片 */
.history-item {
border-radius: 10rpx;
padding: 20rpx;
margin-bottom: 20rpx;
box-sizing: border-box;
box-shadow: 0 4rpx 12rpx rgba(255, 77, 128, 0.06);
}
.item-head {
display: flex;
align-items: center;
gap: 12rpx;
margin-bottom: 12rpx;
}
.dot-outer {
width: 24rpx;
height: 24rpx;
border-radius: 50%;
background: rgba(255, 214, 230, 0.5);
/*粉色外圈*/
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 0 0 4rpx #ffffff;
/* 最外层白色 */
}
.dot-inner {
width: 14rpx;
height: 14rpx;
border-radius: 50%;
background: #ff4150;
/* 中心红色 */
}
.feedback-time {
color: #000000;
flex: 1;
font-size: 22rpx;
font-style: normal;
font-weight: 400;
line-height: normal;
padding-left: 26rpx;
}
.feedback-status {
color: #ff4150;
font-size: 12rpx;
font-style: normal;
font-weight: 400;
line-height: normal;
display: flex;
align-items: center;
}
.smile-icon {
width: 32rpx;
height: 32rpx;
}
/* 内容框 */
.content-box {
border: 2rpx solid #f0e6ea;
background: #fff;
border-radius: 8rpx;
padding: 18rpx;
position: relative;
box-sizing: border-box;
min-height: 160rpx;
}
.content-text {
display: block;
white-space: pre-wrap;
word-break: break-word;
color: #8a8a8a;
font-size: 24rpx;
font-style: normal;
font-weight: 700;
line-height: normal;
padding-bottom: 26rpx;
}
.count {
position: absolute;
right: 14rpx;
bottom: 10rpx;
color: #000000;
font-size: 24rpx;
font-style: normal;
font-weight: 400;
line-height: normal;
}
.thumb-row {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
align-items: flex-start;
align-content: flex-start;
width: 100%;
box-sizing: border-box;
gap: 20rpx;
margin-top: 14rpx;
background: #F9FAFE;
padding: 20rpx;
}
.thumb-slot {
width: calc((100% - 2 * 25rpx) / 3);
aspect-ratio: 1 / 1;
border-radius: 7rpx;
border: 1.2rpx solid #F0F1F1;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
}
.thumb-img {
width: 100%;
height: 100%;
}
.empty {
padding: 50rpx 0;
text-align: center;
color: #afafaf;
font-size: 32rpx;
font-style: normal;
font-weight: 500;
line-height: 48rpx;
}
.empty-img {
width: 100%;
}
</style>