海南旅游项目 前端仓库
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.

150 lines
4.2 KiB

  1. <template>
  2. <view v-if="isRight(orderDetails)">
  3. <view class="lf-bg-white lf-p-t-30 lf-p-b-30 lf-p-l-32 lf-p-r-32">
  4. <view class="lf-row-between">
  5. <image :src="orderDetails.picture" mode="aspectFill" style="width: 240rpx; height: 240rpx;border-radius: 20rpx;"></image>
  6. <view class="flex-sub padding-left-sm">
  7. <view class="bref-box lf-font-32 lf-color-333 lf-line-2" style="height: 88rpx;line-height: 44rpx;">
  8. {{orderDetails.title}}
  9. </view>
  10. <view class="flex lf-m-t-25 align-center text-center">
  11. <text class="block lf-color-gray lf-font-24" style="line-height: 40rpx;">数量</text>
  12. <text class="lf-m-l-10 lf-color-gray lf-font-24">x {{orderDetails.num}}</text>
  13. </view>
  14. <view class="flex align-center text-center lf-m-t-25">
  15. <lf-price :price="orderDetails.price" />
  16. <!-- <view class="lf-m-l-20 lf-line-through lf-color-gray">
  17. 599.00
  18. </view> -->
  19. </view>
  20. </view>
  21. </view>
  22. </view>
  23. <self-line/>
  24. <view class="bg-white padding-lr">
  25. <view class="cu-bar lf-border-bottom">
  26. <text class="lf-color-555 lf-font-28">可退金额</text>
  27. <text class="text-price lf-font-36 lf-color-price">{{orderDetails.price}}</text>
  28. </view>
  29. <view class="cu-bar flex justify-between align-center text-center">
  30. <text class="lf-color-555 lf-font-28">订单编号</text>
  31. <view>
  32. <text class="lf-font-28 text-black1">{{orderDetails.order_no}}</text>
  33. <!-- <text class="text-orange lf-font-28" @click="copy(2368492461046128742764)">复制</text> -->
  34. </view>
  35. </view>
  36. </view>
  37. <self-line/>
  38. <view class="bg-white lf-m-b-6">
  39. <view class="lf-p-t-30 lf-p-l-32 lf-p-r-32 lf-p-b-36">
  40. <view class="lf-font-28 lf-color-black lf-m-b-20 lf-font-bold">退款说明</view>
  41. <view>{{orderDetails.refund_info.desc}}</view>
  42. </view>
  43. </view>
  44. <view class="cu-form-group solid-bottom" style="padding-bottom: 20rpx;" v-if="img_list.length != 0">
  45. <view class="grid col-4 grid-square flex-sub">
  46. <view style="width: 212rpx;height: 212rpx;border-radius: 10rpx;" class="bg-img" v-for="(item,index) of img_list" :key="index">
  47. <image :src="item" @tap="showImg(index)" style="width: 216rpx;height: 216rpx;" mode="aspectFill"></image>
  48. </view>
  49. </view>
  50. </view>
  51. <!-- 修饰专用 -->
  52. <view style="height: 120rpx; width: 100%;"></view>
  53. <view class="btn-bottom solid-top1">
  54. <view class="padding-lr lf-p-t-10 lf-p-b-10 bg-white flex justify-between align-center shadow">
  55. <view class="flex align-center">
  56. <text class="lf-font-24 lf-font-555">实付款</text>
  57. <lf-price :price="orderDetails.price" />
  58. </view>
  59. <button class="btn" @tap="submit">
  60. <text class="lf-font-32 text-white">等待审核</text>
  61. </button>
  62. </view>
  63. </view>
  64. </view>
  65. </template>
  66. <script>
  67. export default {
  68. data() {
  69. return {
  70. hostImg: '',
  71. orderDetails: {},
  72. img_list: [{path: 'https://t7.baidu.com/it/u=2168645659,3174029352&fm=193&f=GIF'}], // 反馈问题图片
  73. order_id: 1
  74. }
  75. },
  76. computed: {
  77. isRight(){
  78. return function(val){
  79. return this.$shared.isRight(val);
  80. }
  81. }
  82. },
  83. methods: {
  84. getOrderDetails() {
  85. this.$http(this.API.API_ORDER_DETAILS, {
  86. id: this.order_id
  87. }).then(res => {
  88. this.orderDetails = res.data
  89. this.img_list = res.data.refund_info.pictures
  90. console.log(res.data)
  91. }).catch(err => {
  92. setTimeout(() => {
  93. this.$toBack()
  94. }, 1000)
  95. });
  96. },
  97. // 预览图片
  98. showImg(index) {
  99. this.$u.throttle(() => {
  100. let goods_banner = this.img_list || [];
  101. let banners = goods_banner.map(item => item);
  102. uni.previewImage({
  103. urls: banners,
  104. current: index
  105. })
  106. }, 200);
  107. },
  108. // 点击复制
  109. copy(text) {
  110. uni.setClipboardData({
  111. data: text
  112. });
  113. },
  114. },
  115. onLoad(e) {
  116. this.order_id = e.order_id
  117. if (this.order_id) {
  118. this.getOrderDetails()
  119. }
  120. },
  121. }
  122. </script>
  123. <style>
  124. .btn{
  125. margin: 0;
  126. padding: 0;
  127. width: 212rpx;
  128. height: 82rpx;
  129. background-color: #777777;
  130. color: #FFFFFF;
  131. line-height: 80rpx;
  132. font-size: 32rpx;
  133. border-radius: 41rpx;
  134. }
  135. .bref-box {
  136. text-overflow: -o-ellipsis-lastline;
  137. overflow: hidden;
  138. text-overflow: ellipsis;
  139. display: -webkit-box;
  140. -webkit-line-clamp: 2;
  141. -webkit-box-orient: vertical;
  142. }
  143. </style>