review-image.vue 5.5 KB

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