review-image.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  1. <template>
  2. <view class="review-detail">
  3. <!-- 复审列表 -->
  4. <view class="review-list">
  5. <view class="review-item" v-for="(item, index) in reviewList" :key="index">
  6. <!-- 标题 -->
  7. <view class="review-title">
  8. <text class="title-text">{{ item.bookName }}</text>
  9. <text class="title-tag" v-if="item.reviewAudit && item.reviewAuditSts == 3">复审结果:{{ item.reviewAudit
  10. }}</text>
  11. <text class="title-tag success-tag" v-if="item.reviewAuditSts == 1">复审结果:良好</text>
  12. </view>
  13. <!-- 文字说明 -->
  14. <view class="review-desc" v-if="item.reviewRemark">
  15. <text class="desc-label">文字说明:{{ item.reviewRemark }}</text>
  16. </view>
  17. <!-- 图片网格 -->
  18. <view class="image-grid">
  19. <view class="image-item" v-for="(img, imgIndex) in item.reviewImg" :key="imgIndex"
  20. @click="previewImage(item.reviewImg, imgIndex)">
  21. <u-image :src="img" width="100%" height="200rpx" border-radius="10rpx"
  22. mode="aspectFill"></u-image>
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. <!-- 订单信息 -->
  28. <view class="info-block">
  29. <view class="info-row">
  30. <text class="info-label">订单编号</text>
  31. <view class="info-value-row">
  32. <text class="info-value">{{ orderInfo.orderId }}</text>
  33. <text class="copy-btn" @click="copyOrderNo">复制</text>
  34. </view>
  35. </view>
  36. <view class="info-row">
  37. <text class="info-label">发货人</text>
  38. <text class="info-value">{{ orderInfo.sendName }} {{ orderInfo.sendMobile }}</text>
  39. </view>
  40. <view class="info-row">
  41. <text class="info-label">取件地址</text>
  42. <text class="info-value">{{ orderInfo.sendAddress }}</text>
  43. </view>
  44. </view>
  45. </view>
  46. </template>
  47. <script>
  48. export default {
  49. data() {
  50. return {
  51. orderId: "",
  52. // 复审列表数据(假数据)
  53. reviewList: [],
  54. // 订单信息(假数据)
  55. orderInfo: {
  56. orderId: "",
  57. senderName: "",
  58. senderPhone: "",
  59. address:"",
  60. },
  61. };
  62. },
  63. onLoad(options) {
  64. if (options.orderId) {
  65. this.orderId = options.orderId;
  66. this.getReviewDetail();
  67. }
  68. },
  69. methods: {
  70. // 预览图片
  71. previewImage(images, current) {
  72. uni.previewImage({
  73. urls: images,
  74. current: current,
  75. });
  76. },
  77. // 复制订单号
  78. copyOrderNo() {
  79. uni.setClipboardData({
  80. data: this.orderInfo.orderId.toString(),
  81. success: () => {
  82. uni.$u.toast("复制成功");
  83. },
  84. fail: () => {
  85. uni.$u.toast("复制失败");
  86. },
  87. });
  88. },
  89. // 获取复审详情(接口调用)
  90. getReviewDetail() {
  91. uni.$u.http
  92. .post("/token/order/reviewDetail?orderId=" + this.orderId)
  93. .then((res) => {
  94. if (res.code === 200) {
  95. // 处理返回的数据
  96. this.reviewList = res.data.reviewDetailList;
  97. this.orderInfo = res.data;
  98. }
  99. });
  100. },
  101. },
  102. };
  103. </script>
  104. <style lang="scss" scoped>
  105. .review-detail {
  106. min-height: 100vh;
  107. background: #f8f8f8;
  108. padding-bottom: 30rpx;
  109. }
  110. .review-item {
  111. background: #ffffff;
  112. padding: 30rpx;
  113. }
  114. .review-title {
  115. // display: flex;
  116. flex-direction: row;
  117. align-items: center;
  118. margin-bottom: 20rpx;
  119. line-height: 50rpx;
  120. .title-text {
  121. font-size: 32rpx;
  122. font-weight: bold;
  123. color: #101010;
  124. margin-right: 20rpx;
  125. }
  126. .title-tag {
  127. font-size: 24rpx;
  128. color: #666666;
  129. background-color: #f2f2f2;
  130. padding: 8rpx 16rpx;
  131. border-radius: 6rpx;
  132. width: fit-content;
  133. }
  134. .success-tag {
  135. color: #38c148;
  136. background-color: #e8f5e9;
  137. }
  138. }
  139. .review-desc {
  140. margin-bottom: 20rpx;
  141. .desc-label {
  142. font-size: 26rpx;
  143. color: #333333;
  144. }
  145. }
  146. .image-grid {
  147. display: grid;
  148. grid-template-columns: repeat(3, 1fr);
  149. gap: 20rpx;
  150. }
  151. .image-item {
  152. border-radius: 10rpx;
  153. overflow: hidden;
  154. }
  155. .show-all-btn {
  156. display: flex;
  157. align-items: center;
  158. justify-content: center;
  159. padding: 20rpx 0;
  160. .show-all-text {
  161. font-size: 28rpx;
  162. color: #38c148;
  163. margin-right: 10rpx;
  164. }
  165. }
  166. .info-block {
  167. background: #ffffff;
  168. padding: 30rpx;
  169. margin-top: 20rpx;
  170. }
  171. .info-row {
  172. display: flex;
  173. align-items: flex-start;
  174. margin-bottom: 24rpx;
  175. &:last-child {
  176. margin-bottom: 0;
  177. }
  178. .info-label {
  179. font-size: 28rpx;
  180. color: #666666;
  181. width: 140rpx;
  182. flex-shrink: 0;
  183. }
  184. .info-value {
  185. font-size: 28rpx;
  186. color: #333333;
  187. flex: 1;
  188. word-break: break-all;
  189. }
  190. .info-value-row {
  191. display: flex;
  192. align-items: center;
  193. flex: 1;
  194. }
  195. .copy-btn {
  196. font-size: 28rpx;
  197. color: #38c148;
  198. margin-left: 20rpx;
  199. flex-shrink: 0;
  200. }
  201. }
  202. </style>