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

186 lines
6.2 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">
  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" :class="item.type=='image' || item.type == 'textarea'?'flex-img':''" v-for="(item,index) of orderDetails.info" :key="index">
  30. <text class="lf-color-555 lf-font-28">{{index}}</text>
  31. <text class="lf-font-28 text-black1" v-if="!item.type">{{item}}</text>
  32. <text class="lf-font-28 text-black1" v-if="item.type=='text'">{{item.value}}</text>
  33. <text class="lf-font-28 text-black1" v-if="item.type=='radio'">{{item.value}}</text>
  34. <text class="lf-font-28 text-black1" v-if="item.type=='checkbox'">{{item.value}}</text>
  35. <view v-if="item.type == 'image'" class="lf-m-t-20 lf-m-b-20">
  36. <view class="grid col-3 grid-square flex-sub lf-m-t-30">
  37. <view style="width: 212rpx;height: 212rpx;border-radius: 10rpx;" class="bg-img" v-for="(item2,index2) in item.value" :key="index2" @tap="showImg1(item.value,index2)" :data-url="item.value[index2]">
  38. <image :src="item.value[index2]" mode="aspectFill"></image>
  39. </view>
  40. </view>
  41. </view>
  42. <view class="cu-self menu lf-w-100" style="margin-top: 30rpx; position: relative;" v-if="item.type == 'textarea'">
  43. <textarea :cursor-spacing="120" disabled maxlength="300" :adjust-position="true" type="text" style="background-color: #F8F8F8;border-radius: 20rpx;" class="text-left lf-font-28 area-self lf-w-100 lf-p-20" :placeholder="item.value" />
  44. </view>
  45. </view>
  46. <view class="cu-bar flex justify-between align-center text-center">
  47. <text class="lf-color-555 lf-font-28">订单编号</text>
  48. <view>
  49. <text class="lf-font-28 text-black1">{{orderDetails.order_no}}</text>
  50. <!-- <text class="text-orange lf-font-28" @click="copy(2368492461046128742764)">复制</text> -->
  51. </view>
  52. </view>
  53. </view>
  54. <self-line/>
  55. <view class="bg-white lf-m-b-6">
  56. <view class="lf-p-t-30 lf-p-l-32 lf-p-r-32 lf-p-b-36">
  57. <view class="lf-font-28 lf-color-black lf-m-b-20 lf-font-bold">退款说明</view>
  58. <view v-if="refund_info != ''">{{orderDetails.refund_info.desc}}</view>
  59. <view v-else>暂无退款说明</view>
  60. </view>
  61. </view>
  62. <view class="cu-form-group solid-bottom" style="padding-bottom: 20rpx;" v-if="img_list.length != 0">
  63. <view class="grid col-4 grid-square flex-sub">
  64. <view style="width: 212rpx;height: 212rpx;border-radius: 10rpx;" class="bg-img" v-for="(item,index) of img_list" :key="index">
  65. <image :src="item" @tap="showImg(index)" style="width: 216rpx;height: 216rpx;" mode="aspectFill"></image>
  66. </view>
  67. </view>
  68. </view>
  69. <!-- 修饰专用 -->
  70. <view style="height: 120rpx; width: 100%;"></view>
  71. <view class="btn-bottom solid-top1">
  72. <view class="padding-lr lf-p-t-10 lf-p-b-10 bg-white flex justify-between align-center shadow">
  73. <view class="flex align-center">
  74. <text class="lf-font-24 lf-font-555">实付款</text>
  75. <lf-price :price="orderDetails.price" />
  76. </view>
  77. <button class="btn" @tap="submit">
  78. <text class="lf-font-32 text-white">等待审核</text>
  79. </button>
  80. </view>
  81. </view>
  82. </view>
  83. </template>
  84. <script>
  85. export default {
  86. data() {
  87. return {
  88. hostImg: '',
  89. orderDetails: {},
  90. img_list: [{path: 'https://t7.baidu.com/it/u=2168645659,3174029352&fm=193&f=GIF'}], // 反馈问题图片
  91. order_id: 1
  92. }
  93. },
  94. computed: {
  95. isRight(){
  96. return function(val){
  97. return this.$shared.isRight(val);
  98. }
  99. }
  100. },
  101. methods: {
  102. // 预览图片
  103. showImg1(url,index) {
  104. this.$u.throttle(() => {
  105. let goods_banner = url || [];
  106. let banners = goods_banner.map(item => item);
  107. uni.previewImage({
  108. urls: banners,
  109. current: index
  110. })
  111. }, 200);
  112. },
  113. getOrderDetails() {
  114. this.$http(this.API.API_ORDER_DETAILS, {
  115. id: this.order_id
  116. }).then(res => {
  117. this.orderDetails = res.data
  118. this.img_list = res.data.refund_info.pictures
  119. console.log(res.data)
  120. }).catch(err => {
  121. setTimeout(() => {
  122. this.$toBack()
  123. }, 1000)
  124. });
  125. },
  126. // 预览图片
  127. showImg(index) {
  128. this.$u.throttle(() => {
  129. let goods_banner = this.img_list || [];
  130. let banners = goods_banner.map(item => item);
  131. uni.previewImage({
  132. urls: banners,
  133. current: index
  134. })
  135. }, 200);
  136. },
  137. // 点击复制
  138. copy(text) {
  139. uni.setClipboardData({
  140. data: text
  141. });
  142. },
  143. },
  144. onLoad(e) {
  145. this.order_id = e.order_id
  146. if (this.order_id) {
  147. this.getOrderDetails()
  148. }
  149. },
  150. }
  151. </script>
  152. <style scoped lang="scss">
  153. .flex-img {
  154. display: flex!important;
  155. align-items: flex-start!important;
  156. flex-direction: column!important;
  157. margin: 30rpx 0;
  158. justify-content: space-between!important;
  159. }
  160. .btn{
  161. margin: 0;
  162. padding: 0;
  163. width: 212rpx;
  164. height: 82rpx;
  165. background-color: #777777;
  166. color: #FFFFFF;
  167. line-height: 80rpx;
  168. font-size: 32rpx;
  169. border-radius: 41rpx;
  170. }
  171. .bref-box {
  172. text-overflow: -o-ellipsis-lastline;
  173. overflow: hidden;
  174. text-overflow: ellipsis;
  175. display: -webkit-box;
  176. -webkit-line-clamp: 2;
  177. -webkit-box-orient: vertical;
  178. }
  179. </style>