时空网前端
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.

165 lines
4.6 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. <template>
  2. <view>
  3. <!-- 商品信息 -->
  4. <self-line/>
  5. <view class="bg-white padding-tb-sm">
  6. <skeleton :loading="skeletonLoading" :row="2" :showAvatar="false" :showTitle="true">
  7. <view class="flex justify-between align-start padding-top-sm padding-lr">
  8. <image :src="orderDetails.order.goods.cover" mode="aspectFill" style="width: 150rpx; height: 150rpx;"></image>
  9. <view class="flex-sub padding-left-sm">
  10. <view class="bref-box margin-top-xs">
  11. {{orderDetails.order.goods.name}}
  12. </view>
  13. <text class="block margin-top-sm text-gray text-sm">数量 <text class="margin-left text-gray">x {{orderDetails.order.number}}</text></text>
  14. <view class="flex justify-between margin-top-sm">
  15. <view class="text-red text-price text-lg">
  16. {{orderDetails.order.selling_price}}
  17. </view>
  18. <view>
  19. <button class="cu-btn line-gray bg-white border round margin-left-sm text-sm">等待审核</button>
  20. </view>
  21. </view>
  22. </view>
  23. </view>
  24. </skeleton>
  25. </view>
  26. <self-line/>
  27. <skeleton :loading="skeletonLoading" :row="3" :showAvatar="false" :showTitle="true">
  28. <view class="bg-white">
  29. <view class="cu-bar padding-lr solid-bottom flex justify-between align-center text-center">
  30. <text class="text-gray">订单金额</text>
  31. <view class="text-price">
  32. {{orderDetails.order.amount}}
  33. </view>
  34. </view>
  35. <view class="cu-bar padding-lr solid-bottom flex justify-between align-center text-center">
  36. <text class="text-gray">扣费率</text>
  37. <view>
  38. <text>{{orderDetails.refund_rate}}%</text>
  39. </view>
  40. </view>
  41. <view class="cu-bar padding-lr solid-bottom flex justify-between align-center text-center">
  42. <text class="text-gray">扣费金额</text>
  43. <view class="text-price">
  44. {{orderDetails.refund_rate_amount}}
  45. </view>
  46. </view>
  47. </view>
  48. </skeleton>
  49. <self-line/>
  50. <!-- 表单 -->
  51. <skeleton :loading="skeletonLoading" :row="2" :showAvatar="false" :showTitle="true">
  52. <view class="bg-white">
  53. <view class="cu-bar padding-lr solid-bottom flex justify-between align-center text-center">
  54. <text class="text-gray">可退金额</text>
  55. <view class="text-price">
  56. {{orderDetails.refund_amount}}
  57. </view>
  58. </view>
  59. <view class="cu-bar padding-lr solid-bottom flex justify-between align-center text-center">
  60. <text class="text-gray">订单编号</text>
  61. <view>
  62. <text class="margin-right">{{orderDetails.order_sn}}</text>
  63. <text class="text-orange text-sm" @tap="copy(orderDetails.order_sn)">复制</text>
  64. </view>
  65. </view>
  66. </view>
  67. </skeleton>
  68. <self-line/>
  69. <skeleton :loading="skeletonLoading" :row="6" :showAvatar="false" :showTitle="true">
  70. <view class="padding-top padding-lr bg-white">
  71. <view class="cu-self menu">
  72. <view class="text-gray">
  73. {{checkArea}}
  74. </view>
  75. </view>
  76. </view>
  77. <view class="padding bg-white">
  78. <view class="cu-self menu">
  79. <view class="text-df text-bold">退款说明</view>
  80. </view>
  81. <view class="cu-self menu margin-top">
  82. <view class="text-gray">{{orderDetails.comment}}</view>
  83. </view>
  84. </view>
  85. <view class="cu-form-group solid-bottom">
  86. <view class="grid col-4 grid-square flex-sub">
  87. <view class="bg-img" v-for="(item,index) of images" :key="index">
  88. <image :src="item.path" @tap="showImg" mode="aspectFill"></image>
  89. </view>
  90. </view>
  91. </view>
  92. </skeleton>
  93. </view>
  94. </template>
  95. <script>
  96. export default {
  97. data() {
  98. return {
  99. skeletonLoading: true,
  100. loading: false,
  101. // 选择的本地图片路径
  102. hostImg: '',
  103. // 已上传服务器的图片名称
  104. serverImg:'',
  105. orderId:1,
  106. orderDetails: {},
  107. checkArea: '',
  108. images: []
  109. }
  110. },
  111. computed: {
  112. },
  113. onLoad(e) {
  114. this.orderId = e.orderid
  115. if(this.orderId) {
  116. this.getOrderDetails()
  117. }
  118. },
  119. methods: {
  120. getOrderDetails() {
  121. this.$http(this.API.API_APPLYPAGE_DETAILS, {order_id: this.orderId}).then(res => {
  122. if(res.code == 0) {
  123. this.orderDetails = res.data.refund
  124. this.checkArea = res.data.agreement.tips
  125. this.images = res.data.refund.images
  126. this.skeletonLoading = false
  127. }
  128. }).catch(err => {
  129. });
  130. },
  131. // 预览图片
  132. showImg() {
  133. uni.previewImage({
  134. urls: ['../../static/tu.png']
  135. });
  136. },
  137. // 点击复制
  138. copy(text) {
  139. uni.setClipboardData({
  140. data: text
  141. });
  142. },
  143. }
  144. }
  145. </script>
  146. <style lang="scss" scoped>
  147. .bref-box {
  148. text-overflow: -o-ellipsis-lastline;
  149. overflow: hidden;
  150. text-overflow: ellipsis;
  151. display: -webkit-box;
  152. -webkit-line-clamp: 2;
  153. -webkit-box-orient: vertical;
  154. }
  155. </style>