爱简收旧衣按件回收前端代码仓库
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.

419 lines
9.8 KiB

1 week ago
5 days ago
1 week ago
1 week ago
1 week ago
  1. <template>
  2. <view class="container">
  3. <!-- 顶部导航 -->
  4. <view class="nav-bar">
  5. <view class="back" @tap="goBack">
  6. <text class="iconfont"></text>
  7. </view>
  8. <text class="title">质检报告</text>
  9. </view>
  10. <view class="subtitle">该报告由潮海回收质检查验出具</view>
  11. <!-- 检测类型标签 -->
  12. <view class="check-types">
  13. <view class="type-tag">
  14. <text class="check-icon"></text>
  15. <text>透明检</text>
  16. </view>
  17. <view class="type-tag">
  18. <text class="check-icon"></text>
  19. <text>专业验</text>
  20. </view>
  21. <view class="type-tag">
  22. <text class="check-icon"></text>
  23. <text>公正评</text>
  24. </view>
  25. <view class="type-tag">
  26. <text class="check-icon"></text>
  27. <text>逐件验</text>
  28. </view>
  29. </view>
  30. <!-- 详细内容 -->
  31. <view class="content">
  32. <view class="detail-section">
  33. <text class="section-title">详细内容</text>
  34. <!-- 检测结果 -->
  35. <view class="result-section">
  36. <text class="label">检测结果</text>
  37. <view :class="['result-tag', isQualified ? 'qualified' : 'unqualified']">
  38. {{ isQualified ? '合格' : '不合格' }}
  39. </view>
  40. </view>
  41. <!-- 结果说明 -->
  42. <view class="result-desc">
  43. <text>{{ resultDescription }}</text>
  44. </view>
  45. <!-- 回收信息 -->
  46. <view class="info-item">
  47. <text class="label">回收编号</text>
  48. <text class="value">{{ orderNo }}</text>
  49. </view>
  50. <view class="info-item">
  51. <text class="label">回收时间</text>
  52. <text class="value">{{ pickupTime }}</text>
  53. </view>
  54. <!-- 不合格原因列表 -->
  55. <block v-if="!isQualified">
  56. <text class="section-subtitle">不合格原因</text>
  57. <view class="reason-grid">
  58. <view class="reason-item" v-for="(reason, index) in reasons" :key="index">
  59. <text class="close-icon">×</text>
  60. <text class="reason-title">{{ reason.title }}</text>
  61. <text class="detail-link" @tap="viewDetail(reason)">查看详情 ></text>
  62. </view>
  63. </view>
  64. <view class="bottom-note">
  65. 感谢您的理解与支持期待您再次参与我们的旧衣回收活动共同为环保贡献力量
  66. </view>
  67. </block>
  68. <!-- 合格说明 -->
  69. <block v-else>
  70. <text class="section-subtitle">回收去向</text>
  71. <view class="qualified-desc">
  72. <view class="desc-item">
  73. <text class="dot"></text>
  74. <text>可捐赠衣物部分品相较好的衣物将捐赠给有需要的群体为他们送去温暖与关怀</text>
  75. </view>
  76. <view class="desc-item">
  77. <text class="dot"></text>
  78. <text>可再生利用衣物部分衣物将进入再生利用流程转化为其他有用的产品如清洁用品保温材料等</text>
  79. </view>
  80. </view>
  81. <view class="bottom-note success">
  82. 再次感谢您的环保行动您的小小举动为地球环保做出了大大的贡献
  83. </view>
  84. </block>
  85. </view>
  86. </view>
  87. <!-- 底部按钮 -->
  88. <view class="bottom-btn" v-if="!isQualified">
  89. <button class="reorder-btn" @tap="reorder">再次预约下单</button>
  90. </view>
  91. </view>
  92. </template>
  93. <script>
  94. import pullRefreshMixin from '@/pages/mixins/pullRefreshMixin.js'
  95. export default {
  96. mixins: [pullRefreshMixin],
  97. data() {
  98. return {
  99. isQualified: false, // 是否合格
  100. orderNo: 'RE82738127861525', // 回收编号
  101. pickupTime: '2025-04-20 11:00', // 回收时间
  102. resultDescription: '感谢您参与旧衣回收活动,支持环保事业。', // 结果说明
  103. reasons: [
  104. {
  105. title: '大面积破损',
  106. detail: '破损无法修复'
  107. },
  108. {
  109. title: '污渍无法清除',
  110. detail: '严重污渍'
  111. },
  112. {
  113. title: '附件缺失',
  114. detail: '重要配件缺失'
  115. },
  116. {
  117. title: '带有危险物品',
  118. detail: '不符合安全标准'
  119. },
  120. {
  121. title: '尺寸过小',
  122. detail: '不符合回收标准'
  123. },
  124. {
  125. title: '尺寸过大',
  126. detail: '超出处理范围'
  127. }
  128. ]
  129. }
  130. },
  131. onLoad(options) {
  132. // 根据传入参数设置检测结果
  133. if (options.status) {
  134. this.isQualified = options.status === 'qualified'
  135. this.resultDescription = this.isQualified
  136. ? '我们已收到您的旧衣,并完成质检。很高兴地通知您,此次回收的旧衣全部符合回收标准。'
  137. : '感谢您参与旧衣回收活动,支持环保事业。我们已收到您的旧衣,并完成质检。遗憾地通知您,此次回收的部分旧衣不符合回收标准。'
  138. }
  139. },
  140. methods: {
  141. async onRefresh() {
  142. // 模拟刷新数据
  143. await new Promise(resolve => setTimeout(resolve, 1000))
  144. this.stopPullRefresh()
  145. },
  146. goBack() {
  147. uni.navigateBack()
  148. },
  149. viewDetail(reason) {
  150. // 查看详情逻辑
  151. uni.showModal({
  152. title: reason.title,
  153. content: reason.detail,
  154. showCancel: false
  155. })
  156. },
  157. reorder() {
  158. // 跳转到预约页面
  159. uni.navigateTo({
  160. url: '/pages/pickup/index'
  161. })
  162. }
  163. }
  164. }
  165. </script>
  166. <style lang="scss" scoped>
  167. .container {
  168. min-height: 100vh;
  169. background: #4A332D;
  170. padding-bottom: v-bind('isQualified ? "0" : "calc(120rpx + env(safe-area-inset-bottom))"');
  171. }
  172. .nav-bar {
  173. display: flex;
  174. align-items: center;
  175. height: 88rpx;
  176. padding: 0 30rpx;
  177. .back {
  178. padding: 20rpx;
  179. margin-left: -20rpx;
  180. color: #fff;
  181. }
  182. .title {
  183. flex: 1;
  184. text-align: center;
  185. font-size: 34rpx;
  186. font-weight: 500;
  187. color: #fff;
  188. }
  189. .right-btns {
  190. display: flex;
  191. gap: 30rpx;
  192. .more, .share {
  193. font-size: 40rpx;
  194. color: #fff;
  195. }
  196. }
  197. }
  198. .subtitle {
  199. text-align: center;
  200. font-size: 24rpx;
  201. color: rgba(255, 255, 255, 0.8);
  202. margin-bottom: 30rpx;
  203. }
  204. .check-types {
  205. display: flex;
  206. justify-content: space-between;
  207. padding: 0 30rpx;
  208. margin-bottom: 30rpx;
  209. .type-tag {
  210. background: rgba(255, 255, 255, 0.2);
  211. border-radius: 30rpx;
  212. padding: 10rpx 20rpx;
  213. display: flex;
  214. align-items: center;
  215. gap: 8rpx;
  216. color: #fff;
  217. font-size: 24rpx;
  218. .check-icon {
  219. font-size: 24rpx;
  220. }
  221. }
  222. }
  223. .content {
  224. background: linear-gradient(to bottom, #fef2da,3%,#fffefb);
  225. border-radius: 30rpx 30rpx 0 0;
  226. min-height: calc(100vh - 200rpx);
  227. padding: 30rpx;
  228. .detail-section {
  229. .section-title {
  230. font-size: 32rpx;
  231. font-weight: bold;
  232. color: #333;
  233. margin-bottom: 30rpx;
  234. }
  235. .result-section {
  236. margin-bottom: 20rpx;
  237. .label {
  238. font-size: 28rpx;
  239. color: #666;
  240. margin-bottom: 10rpx;
  241. display: block;
  242. }
  243. .result-tag {
  244. display: inline-block;
  245. padding: 4rpx 20rpx;
  246. border-radius: 8rpx;
  247. font-size: 26rpx;
  248. &.qualified {
  249. background: #4CAF50;
  250. color: #fff;
  251. }
  252. &.unqualified {
  253. background: #FF5252;
  254. color: #fff;
  255. }
  256. }
  257. }
  258. .result-desc {
  259. font-size: 28rpx;
  260. color: #666;
  261. line-height: 1.6;
  262. margin-bottom: 30rpx;
  263. }
  264. .info-item {
  265. margin-bottom: 20rpx;
  266. .label {
  267. font-size: 28rpx;
  268. color: #666;
  269. margin-bottom: 8rpx;
  270. display: block;
  271. }
  272. .value {
  273. font-size: 28rpx;
  274. color: #333;
  275. }
  276. }
  277. .section-subtitle {
  278. font-size: 30rpx;
  279. font-weight: bold;
  280. color: #333;
  281. margin: 30rpx 0 20rpx;
  282. }
  283. .reason-grid {
  284. display: grid;
  285. grid-template-columns: repeat(3, 1fr);
  286. gap: 20rpx;
  287. padding: 20rpx 0;
  288. .reason-item {
  289. background: #fff;
  290. border-radius: 12rpx;
  291. padding: 20rpx;
  292. display: flex;
  293. flex-direction: column;
  294. align-items: center;
  295. text-align: center;
  296. box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
  297. position: relative;
  298. .close-icon {
  299. position: absolute;
  300. top: 70rpx;
  301. right: 10rpx;
  302. color: #FF5252;
  303. font-size: 32rpx;
  304. line-height: 1;
  305. font-weight: bold;
  306. }
  307. .reason-title {
  308. font-size: 26rpx;
  309. color: #333;
  310. margin-bottom: 10rpx;
  311. font-weight: 500;
  312. margin-top: 10rpx;
  313. }
  314. .detail-link {
  315. font-size: 24rpx;
  316. color: #999;
  317. display: flex;
  318. align-items: center;
  319. gap: 4rpx;
  320. }
  321. }
  322. }
  323. .qualified-desc {
  324. .desc-item {
  325. display: flex;
  326. margin-bottom: 20rpx;
  327. .dot {
  328. margin-right: 10rpx;
  329. color: #666;
  330. }
  331. text {
  332. font-size: 28rpx;
  333. color: #666;
  334. line-height: 1.6;
  335. }
  336. }
  337. }
  338. .bottom-note {
  339. font-size: 28rpx;
  340. color: #666;
  341. line-height: 1.6;
  342. margin-top: 40rpx;
  343. text-align: center;
  344. &.success {
  345. color: #4CAF50;
  346. }
  347. }
  348. }
  349. }
  350. .bottom-btn {
  351. position: fixed;
  352. left: 0;
  353. right: 0;
  354. bottom: 0;
  355. padding: 20rpx 30rpx calc(20rpx + env(safe-area-inset-bottom));
  356. background: #fff;
  357. box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.05);
  358. .reorder-btn {
  359. width: 100%;
  360. height: 80rpx;
  361. background: #FFB74D;
  362. color: #fff;
  363. font-size: 30rpx;
  364. border-radius: 40rpx;
  365. display: flex;
  366. align-items: center;
  367. justify-content: center;
  368. border: none;
  369. &::after {
  370. border: none;
  371. }
  372. }
  373. }
  374. </style>