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.

351 lines
7.8 KiB

4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
  1. <template>
  2. <view class="main">
  3. <view class="top" :style="{height:iSMT+'px'}"></view>
  4. <!-- 头部导航 -->
  5. <view class="header">
  6. <view class="back-icon">
  7. <image @click="goBack()" src="/static/customer-service-platform/cs-platform-back.png"
  8. class="header-icon-image"></image>
  9. </view>
  10. <view class="title">智能客服中台</view>
  11. <view class="notification-icon">
  12. <image src="/static/customer-service-platform/message.png" class="header-icon-image"></image>
  13. </view>
  14. </view>
  15. <!-- 内容区域 - 使用滚动视图 -->
  16. <scroll-view scroll-y class="content-container">
  17. <view class="list-wrapper" v-if="historyList.length > 0">
  18. <view class="content-header">
  19. <text class="content-title">历史反馈内容</text>
  20. </view>
  21. <view class="card-line"></view>
  22. <view v-for="(item, idx) in historyList" :key="item.id" class="history-item card">
  23. <view class="item-head">
  24. <view class="dot-outer">
  25. <view class="dot-inner"></view>
  26. </view>
  27. <text class="feedback-time">{{ item.createdAt }}</text>
  28. <text class="feedback-status">
  29. {{ statusText }}
  30. <image class="smile-icon" src="/static/customer-service-platform/smile-icon.png"></image>
  31. </text>
  32. </view>
  33. <view class="content-box">
  34. <text class="content-text">{{ item.content }}</text>
  35. <text class="count">{{ item.content.length }}/200</text>
  36. </view>
  37. <view v-if="item.images && item.images.length" class="thumb-row">
  38. <view v-for="(img, i) in item.images" :key="i" class="thumb-slot"
  39. @click="previewImage(item.images, i)">
  40. <image :src="img" mode="scaleToFill" class="thumb-img" />
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. <!-- 如果没有历史显示空态 -->
  46. <view v-if="historyList.length === 0" class="empty">
  47. <image mode="aspectFit" class="empty-img" src="/static/customer-service-platform/empty-content.png">
  48. </image>
  49. <text class="empty-tip">暂无内容~</text>
  50. </view>
  51. </scroll-view>
  52. </view>
  53. </template>
  54. <script>
  55. import {
  56. getFeedbackRecords,
  57. addFeedbackRecord
  58. } from "../../api/customerServicePlatform/customerServicePlatform";
  59. export default {
  60. data() {
  61. return {
  62. iSMT: 0,
  63. // historyList: [],
  64. statusText: '反馈成功',
  65. historyList: [{
  66. id: 1,
  67. createdAt: '2025/10/16 11:46',
  68. content: '你是不是总是看着股票回调时心里发慌,不知道什么时候进场才是最安全的?追高买错被套牢,亏得眼泪直流aaa,回调时又不敢进,错过了反弹的机会?今天,我将带你掌握一套精准确认底部的三步法——通过超卖信号、关键K线和强势启动点,帮助你轻松识别市场底部,稳健进场,避开高位追涨,赚取大波利润!我们今天会结合特斯拉(TSLA)和阿里巴巴(BABA)的经aaa典案例,帮助你更好地理解这些技巧,赶快拿起纸笔,开始学',
  69. images: []
  70. },
  71. {
  72. id: 2,
  73. createdAt: '2025/10/16 11:46',
  74. content: '请描述您想反馈的内容\n第二条示例文本,长度可以不一样,测试多行显示和字数统计功能。这里补充一些文字以便测试外观和换行效果。',
  75. images: []
  76. }
  77. ]
  78. };
  79. },
  80. mounted() {
  81. this.iSMT = uni.getSystemInfoSync().statusBarHeight;
  82. this.loadHistoryList()
  83. },
  84. methods: {
  85. goBack() {
  86. if (typeof uni !== 'undefined' && uni.navigateBack) {
  87. uni.navigateBack();
  88. } else {
  89. window.history.back();
  90. }
  91. },
  92. async loadHistoryList() {
  93. const res = await getFeedbackRecords({
  94. token: 'dccec0b65a94f498b8183a17589ab16e'
  95. })
  96. console.log(res)
  97. if (res.code == 200) {
  98. this.historyList = res.data.map(item => {
  99. const images = [item.image1, item.image2, item.image3].filter(img => !!img)
  100. return {
  101. id: item.id,
  102. createdAt: item.createdAt,
  103. content: item.content,
  104. images,
  105. dccode: item.dccode
  106. }
  107. })
  108. }
  109. },
  110. previewImage(list, index) {
  111. if (typeof uni !== 'undefined' && uni.previewImage) {
  112. uni.previewImage({
  113. current: list[index],
  114. urls: list
  115. });
  116. } else {
  117. // H5 fallback
  118. window.open(list[index], '_blank');
  119. }
  120. }
  121. }
  122. };
  123. </script>
  124. <style scoped>
  125. .main {
  126. display: flex;
  127. flex-direction: column;
  128. height: 100vh;
  129. background-color: #ffffff;
  130. }
  131. .header {
  132. display: flex;
  133. justify-content: space-between;
  134. align-items: center;
  135. padding: 20rpx 30rpx;
  136. background-color: #ffffff;
  137. }
  138. .title {
  139. color: #000000;
  140. text-align: center;
  141. font-size: 32rpx;
  142. font-style: normal;
  143. font-weight: 400;
  144. }
  145. .back-icon,
  146. .notification-icon {
  147. width: 40rpx;
  148. display: flex;
  149. align-items: center;
  150. justify-content: center;
  151. }
  152. .header-icon-image {
  153. width: 40rpx;
  154. height: 40rpx;
  155. object-fit: contain;
  156. }
  157. .content-container {
  158. padding: 20rpx;
  159. padding-top: 0;
  160. width: 100%;
  161. box-sizing: border-box;
  162. overflow-x: hidden;
  163. }
  164. /* 列表包装器,居中卡片 */
  165. .list-wrapper {
  166. width: 90%;
  167. margin: 0 auto;
  168. padding: 20rpx 40rpx;
  169. flex-direction: column;
  170. align-items: center;
  171. gap: 20rpx;
  172. box-sizing: border-box;
  173. border-radius: 12rpx;
  174. border: 4rpx solid #FCC8D4;
  175. background: linear-gradient(180deg, #FCC8D3 0%, #FEF0F3 30%, #FFF 100%);
  176. }
  177. .content-header {
  178. width: 100%;
  179. display: flex;
  180. align-items: center;
  181. justify-content: space-between;
  182. }
  183. .content-title {
  184. color: #000000;
  185. font-size: 32rpx;
  186. font-style: normal;
  187. font-weight: 400;
  188. line-height: normal;
  189. }
  190. .card-line {
  191. margin-top: 20rpx;
  192. width: 100%;
  193. height: 2rpx;
  194. border-radius: 2rpx;
  195. background: #FFF;
  196. }
  197. /* 每一条历史卡片 */
  198. .history-item {
  199. border-radius: 10rpx;
  200. padding: 20rpx;
  201. margin-bottom: 20rpx;
  202. box-sizing: border-box;
  203. box-shadow: 0 4rpx 12rpx rgba(255, 77, 128, 0.06);
  204. }
  205. .item-head {
  206. display: flex;
  207. align-items: center;
  208. gap: 12rpx;
  209. margin-bottom: 12rpx;
  210. }
  211. .dot-outer {
  212. width: 24rpx;
  213. height: 24rpx;
  214. border-radius: 50%;
  215. background: rgba(255, 214, 230, 0.5);
  216. /*粉色外圈*/
  217. display: flex;
  218. align-items: center;
  219. justify-content: center;
  220. box-shadow: 0 0 0 4rpx #ffffff;
  221. /* 最外层白色 */
  222. }
  223. .dot-inner {
  224. width: 14rpx;
  225. height: 14rpx;
  226. border-radius: 50%;
  227. background: #ff4150;
  228. /* 中心红色 */
  229. }
  230. .feedback-time {
  231. color: #000000;
  232. flex: 1;
  233. font-size: 22rpx;
  234. font-style: normal;
  235. font-weight: 400;
  236. line-height: normal;
  237. padding-left: 26rpx;
  238. }
  239. .feedback-status {
  240. color: #ff4150;
  241. font-size: 12rpx;
  242. font-style: normal;
  243. font-weight: 400;
  244. line-height: normal;
  245. display: flex;
  246. align-items: center;
  247. }
  248. .smile-icon {
  249. width: 32rpx;
  250. height: 32rpx;
  251. }
  252. /* 内容框 */
  253. .content-box {
  254. border: 2rpx solid #f0e6ea;
  255. background: #fff;
  256. border-radius: 8rpx;
  257. padding: 18rpx;
  258. position: relative;
  259. box-sizing: border-box;
  260. min-height: 160rpx;
  261. }
  262. .content-text {
  263. display: block;
  264. white-space: pre-wrap;
  265. word-break: break-word;
  266. color: #8a8a8a;
  267. font-size: 24rpx;
  268. font-style: normal;
  269. font-weight: 700;
  270. line-height: normal;
  271. padding-bottom: 26rpx;
  272. }
  273. .count {
  274. position: absolute;
  275. right: 14rpx;
  276. bottom: 10rpx;
  277. color: #000000;
  278. font-size: 24rpx;
  279. font-style: normal;
  280. font-weight: 400;
  281. line-height: normal;
  282. }
  283. .thumb-row {
  284. display: flex;
  285. flex-wrap: wrap;
  286. justify-content: flex-start;
  287. align-items: flex-start;
  288. align-content: flex-start;
  289. width: 100%;
  290. box-sizing: border-box;
  291. gap: 20rpx;
  292. margin-top: 14rpx;
  293. background: #F9FAFE;
  294. padding: 20rpx;
  295. }
  296. .thumb-slot {
  297. width: calc((100% - 2 * 25rpx) / 3);
  298. aspect-ratio: 1 / 1;
  299. border-radius: 7rpx;
  300. border: 1.2rpx solid #F0F1F1;
  301. display: flex;
  302. align-items: center;
  303. justify-content: center;
  304. overflow: hidden;
  305. }
  306. .thumb-img {
  307. width: 100%;
  308. height: 100%;
  309. }
  310. .empty {
  311. padding: 50rpx 0;
  312. text-align: center;
  313. color: #afafaf;
  314. font-size: 32rpx;
  315. font-style: normal;
  316. font-weight: 500;
  317. line-height: 48rpx;
  318. }
  319. .empty-img {
  320. width: 100%;
  321. }
  322. </style>