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

230 lines
5.1 KiB

  1. <template>
  2. <view>
  3. <!-- 商品信息 -->
  4. <block v-if="isRight(orderDetails)">
  5. <view class="bg-white">
  6. <view class="flex justify-between align-start" style="padding: 32rpx 32rpx 30rpx 32rpx;">
  7. <image :src="orderDetails.picture" mode="aspectFill"
  8. style="width: 240rpx; height: 240rpx;border-radius: 20rpx;"></image>
  9. <view class="flex-sub padding-left-sm">
  10. <view class="bref-box lf-line-2 text-black1 lf-font-28 lf-font-bold"
  11. style="height: 88rpx;line-height: 44rpx;">
  12. {{orderDetails.title}}
  13. </view>
  14. <text class="block lf-color-gray lf-font-28" style="margin-top: 20rpx;line-height: 40rpx;">数量
  15. <text class="margin-left margin-right-xs lf-color-gray">x</text>{{orderDetails.num}}</text>
  16. <view class="flex justify-between" style="margin-top: 28rpx;">
  17. <lf-price :price="orderDetails.price" style="margin-top: 8rpx;" />
  18. <view>
  19. <!-- <button class="cu-btn1 lf-color-gray lf-border-gray">申请退款</button> -->
  20. </view>
  21. </view>
  22. </view>
  23. </view>
  24. </view>
  25. <self-line />
  26. <!-- 表单 -->
  27. <view class="bg-white">
  28. <view class="cu-bar padding-lr solid-bottom flex justify-between align-center text-center">
  29. <text class="lf-color-555 lf-font-28">订单编号</text>
  30. <view>
  31. <text class="margin-right lf-font-28 text-black1">{{orderDetails.order_no}}</text>
  32. <text class="text-orange lf-font-28" @click="copy(orderDetails.order_no)">复制</text>
  33. </view>
  34. </view>
  35. <view class="cu-bar padding-lr solid-bottom">
  36. <text class="lf-color-555 lf-font-28">下单时间</text>
  37. <text class="lf-font-28 text-black1">{{$timer(orderDetails.created_at*1000)}}</text>
  38. </view>
  39. <view class="cu-bar padding-lr">
  40. <text class="lf-color-555 lf-font-28">支付方式</text>
  41. <text class="lf-font-28 text-black1">微信支付</text>
  42. </view>
  43. </view>
  44. <self-line />
  45. <view class="bg-white">
  46. <view class="cu-bar padding-lr">
  47. <text class="lf-color-555 lf-font-28">优惠</text>
  48. <text class="lf-font-28 lf-color-price">活动优惠-50</text>
  49. </view>
  50. </view>
  51. <view>
  52. <self-line />
  53. <view class="padding-lr padding-tb-sm bg-white flex justify-between align-center solid-top1 btn-bottom">
  54. <view class="flex align-center">
  55. <text class="lf-color-555 lf-font-28" style="margin-right: 20rpx;">待付款</text>
  56. <lf-price :price="orderDetails.price" />
  57. </view>
  58. <button class="btn bg-red" @tap="submit" v-if="orderDetails.status == 1">
  59. <text class="lf-font-32 text-white">支付尾款</text>
  60. </button>
  61. </view>
  62. </view>
  63. </block>
  64. </view>
  65. </template>
  66. <script>
  67. export default {
  68. data() {
  69. return {
  70. base64Img: '', //
  71. skeletonLoading: true,
  72. loading: false,
  73. order_id: 1,
  74. orderDetails: {},
  75. }
  76. },
  77. onLoad(e) {
  78. this.order_id = e.order_id
  79. if (this.order_id) {
  80. this.getOrderDetails()
  81. }
  82. },
  83. computed: {
  84. isRight(){
  85. return function(val){
  86. return this.$shared.isRight(val);
  87. }
  88. }
  89. },
  90. methods: {
  91. getOrderDetails() {
  92. this.$http(this.API.API_ORDER_DETAILS, {
  93. id: this.order_id
  94. }).then(res => {
  95. this.orderDetails = res.data
  96. console.log(this.orderDetails)
  97. }).catch(err => {
  98. setTimeout(() => {
  99. this.$toBack()
  100. }, 1000)
  101. });
  102. },
  103. submit() {
  104. this.$routerGo('/pages/order/order?type=all')
  105. },
  106. },
  107. created() {
  108. }
  109. }
  110. </script>
  111. <style lang="scss" scoped>
  112. .btn{
  113. margin: 0;
  114. padding: 0;
  115. width: 212rpx;
  116. height: 82rpx;
  117. background-color: #FF0000;
  118. color: #FFFFFF;
  119. line-height: 80rpx;
  120. font-size: 32rpx;
  121. border-radius: 41rpx;
  122. }
  123. .tag-self {
  124. position: absolute !important;
  125. top: 0 !important;
  126. border-radius: 20rpx 0 20rpx 0 !important;
  127. width: max-content;
  128. height: 32rpx !important;
  129. }
  130. .title {
  131. font-size: 28rpx;
  132. color: $u-content-color;
  133. height: 90rpx;
  134. }
  135. // tab
  136. .ctab {
  137. width: 100%;
  138. margin: 20rpx 0 0rpx 0rpx;
  139. padding: 0 22rpx;
  140. }
  141. // 商品列表
  142. .com {
  143. width: 100%;
  144. overflow: hidden;
  145. .list {
  146. border-radius: 10rpx;
  147. overflow: hidden;
  148. margin: 20rpx 32rpx;
  149. background-color: #FFFFFF;
  150. // box-shadow: 0 0 10px 5px #e5e5e5;
  151. box-shadow: 0 10rpx 20rpx 0 rgba(0, 0, 0, 0.1);
  152. align-items: flex-start;
  153. .left {
  154. overflow: hidden;
  155. image {
  156. width: 186rpx;
  157. height: 186rpx;
  158. margin: 20rpx;
  159. border-radius: 10rpx;
  160. }
  161. }
  162. .right {
  163. overflow: hidden;
  164. width: 64%;
  165. .title {
  166. margin: 0rpx 20rpx 10rpx 0;
  167. color: #222222;
  168. font-size: 32rpx;
  169. }
  170. .tips {
  171. margin: 16rpx 0;
  172. overflow: hidden;
  173. .u-line-progress {
  174. width: 112rpx;
  175. overflow: hidden;
  176. margin-right: 20rpx;
  177. }
  178. .progress {
  179. color: #777777;
  180. font-size: 24rpx;
  181. }
  182. .bought {
  183. color: #777777;
  184. font-size: 24rpx;
  185. margin-right: 20rpx;
  186. }
  187. }
  188. .price {
  189. overflow: hidden;
  190. color: #FF0000;
  191. margin-top: 10rpx;
  192. button {
  193. width: 176rpx;
  194. height: 60rpx;
  195. background: #FE9903;
  196. border-radius: 15px;
  197. font-size: 24rpx;
  198. color: #FFFFFF;
  199. margin: 0rpx 20rpx 0rpx 20rpx;
  200. border: none;
  201. }
  202. }
  203. }
  204. }
  205. }
  206. </style>