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

151 lines
4.4 KiB

4 years ago
  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;" @click="$url('/pages/goodsDetail/index?goods_id='+orderDetails.agent_product_id)"></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 v-if="refund_info != ''">{{orderDetails.refund_info.desc}}</view>
  42. <view v-else>暂无退款说明</view>
  43. </view>
  44. </view>
  45. <view class="cu-form-group solid-bottom" style="padding-bottom: 20rpx;" v-if="img_list.length != 0">
  46. <view class="grid col-4 grid-square flex-sub">
  47. <view style="width: 212rpx;height: 212rpx;border-radius: 10rpx;" class="bg-img" v-for="(item,index) of img_list" :key="index">
  48. <image :src="item" @tap="showImg(index)" style="width: 216rpx;height: 216rpx;" mode="aspectFill"></image>
  49. </view>
  50. </view>
  51. </view>
  52. <!-- 修饰专用 -->
  53. <view style="height: 120rpx; width: 100%;"></view>
  54. <view class="btn-bottom solid-top1">
  55. <view class="padding-lr lf-p-t-10 lf-p-b-10 bg-white flex justify-between align-center shadow">
  56. <view class="flex align-center">
  57. <text class="lf-font-24 lf-font-555">实付款</text>
  58. <lf-price :price="orderDetails.price" />
  59. </view>
  60. <button class="btn" @tap="submit">
  61. <text class="lf-font-32 text-white">等待审核</text>
  62. </button>
  63. </view>
  64. </view>
  65. </view>
  66. </template>
  67. <script>
  68. export default {
  69. data() {
  70. return {
  71. hostImg: '',
  72. orderDetails: {},
  73. img_list: [{path: 'https://t7.baidu.com/it/u=2168645659,3174029352&fm=193&f=GIF'}], // 反馈问题图片
  74. order_id: 1
  75. }
  76. },
  77. computed: {
  78. isRight(){
  79. return function(val){
  80. return this.$shared.isRight(val);
  81. }
  82. }
  83. },
  84. methods: {
  85. getOrderDetails() {
  86. this.$http(this.API.API_ORDER_DETAILS, {
  87. id: this.order_id
  88. }).then(res => {
  89. this.orderDetails = res.data
  90. this.img_list = res.data.refund_info.pictures
  91. console.log(res.data)
  92. }).catch(err => {
  93. setTimeout(() => {
  94. this.$toBack()
  95. }, 1000)
  96. });
  97. },
  98. // 预览图片
  99. showImg(index) {
  100. this.$u.throttle(() => {
  101. let goods_banner = this.img_list || [];
  102. let banners = goods_banner.map(item => item);
  103. uni.previewImage({
  104. urls: banners,
  105. current: index
  106. })
  107. }, 200);
  108. },
  109. // 点击复制
  110. copy(text) {
  111. uni.setClipboardData({
  112. data: text
  113. });
  114. },
  115. },
  116. onLoad(e) {
  117. this.order_id = e.order_id
  118. if (this.order_id) {
  119. this.getOrderDetails()
  120. }
  121. },
  122. }
  123. </script>
  124. <style>
  125. .btn{
  126. margin: 0;
  127. padding: 0;
  128. width: 212rpx;
  129. height: 82rpx;
  130. background-color: #777777;
  131. color: #FFFFFF;
  132. line-height: 80rpx;
  133. font-size: 32rpx;
  134. border-radius: 41rpx;
  135. }
  136. .bref-box {
  137. text-overflow: -o-ellipsis-lastline;
  138. overflow: hidden;
  139. text-overflow: ellipsis;
  140. display: -webkit-box;
  141. -webkit-line-clamp: 2;
  142. -webkit-box-orient: vertical;
  143. }
  144. </style>