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

235 lines
5.4 KiB

4 years ago
  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;" @click="$url('/pages/goodsDetail/index?goods_id='+orderDetails.agent_product_id)"></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">{{orderDetails.created_at}}</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. <view v-if="orderDetails.coupon != ''">
  49. <text class="lf-color-price lf-font-28 lf-m-l-10" v-for="(item,index) of orderDetails.coupon">{{item.tag}}</text>
  50. </view>
  51. <view v-else>
  52. <text class="lf-color-price lf-font-28 lf-m-l-10">暂无优惠</text>
  53. </view>
  54. </view>
  55. </view> -->
  56. <view>
  57. <self-line />
  58. <view class="padding-lr padding-tb-sm bg-white flex justify-between align-center solid-top1 btn-bottom">
  59. <view class="flex align-center">
  60. <text class="lf-color-555 lf-font-28" style="margin-right: 20rpx;">待付款</text>
  61. <lf-price :price="orderDetails.price" />
  62. </view>
  63. <button class="btn bg-red" @tap="submit" v-if="orderDetails.status == 1">
  64. <text class="lf-font-32 text-white">支付尾款</text>
  65. </button>
  66. </view>
  67. </view>
  68. </block>
  69. </view>
  70. </template>
  71. <script>
  72. export default {
  73. data() {
  74. return {
  75. base64Img: '', //
  76. skeletonLoading: true,
  77. loading: false,
  78. order_id: 1,
  79. orderDetails: {},
  80. }
  81. },
  82. onLoad(e) {
  83. this.order_id = e.order_id
  84. if (this.order_id) {
  85. this.getOrderDetails()
  86. }
  87. },
  88. computed: {
  89. isRight(){
  90. return function(val){
  91. return this.$shared.isRight(val);
  92. }
  93. }
  94. },
  95. methods: {
  96. getOrderDetails() {
  97. this.$http(this.API.API_ORDER_DETAILS, {
  98. id: this.order_id
  99. }).then(res => {
  100. this.orderDetails = res.data
  101. console.log(this.orderDetails)
  102. }).catch(err => {
  103. setTimeout(() => {
  104. this.$toBack()
  105. }, 1000)
  106. });
  107. },
  108. submit() {
  109. this.$routerGo('/pages/order/order?type=all')
  110. },
  111. },
  112. created() {
  113. }
  114. }
  115. </script>
  116. <style lang="scss" scoped>
  117. .btn{
  118. margin: 0;
  119. padding: 0;
  120. width: 212rpx;
  121. height: 82rpx;
  122. background-color: #FF0000;
  123. color: #FFFFFF;
  124. line-height: 80rpx;
  125. font-size: 32rpx;
  126. border-radius: 41rpx;
  127. }
  128. .tag-self {
  129. position: absolute !important;
  130. top: 0 !important;
  131. border-radius: 20rpx 0 20rpx 0 !important;
  132. width: max-content;
  133. height: 32rpx !important;
  134. }
  135. .title {
  136. font-size: 28rpx;
  137. color: $u-content-color;
  138. height: 90rpx;
  139. }
  140. // tab
  141. .ctab {
  142. width: 100%;
  143. margin: 20rpx 0 0rpx 0rpx;
  144. padding: 0 22rpx;
  145. }
  146. // 商品列表
  147. .com {
  148. width: 100%;
  149. overflow: hidden;
  150. .list {
  151. border-radius: 10rpx;
  152. overflow: hidden;
  153. margin: 20rpx 32rpx;
  154. background-color: #FFFFFF;
  155. // box-shadow: 0 0 10px 5px #e5e5e5;
  156. box-shadow: 0 10rpx 20rpx 0 rgba(0, 0, 0, 0.1);
  157. align-items: flex-start;
  158. .left {
  159. overflow: hidden;
  160. image {
  161. width: 186rpx;
  162. height: 186rpx;
  163. margin: 20rpx;
  164. border-radius: 10rpx;
  165. }
  166. }
  167. .right {
  168. overflow: hidden;
  169. width: 64%;
  170. .title {
  171. margin: 0rpx 20rpx 10rpx 0;
  172. color: #222222;
  173. font-size: 32rpx;
  174. }
  175. .tips {
  176. margin: 16rpx 0;
  177. overflow: hidden;
  178. .u-line-progress {
  179. width: 112rpx;
  180. overflow: hidden;
  181. margin-right: 20rpx;
  182. }
  183. .progress {
  184. color: #777777;
  185. font-size: 24rpx;
  186. }
  187. .bought {
  188. color: #777777;
  189. font-size: 24rpx;
  190. margin-right: 20rpx;
  191. }
  192. }
  193. .price {
  194. overflow: hidden;
  195. color: #FF0000;
  196. margin-top: 10rpx;
  197. button {
  198. width: 176rpx;
  199. height: 60rpx;
  200. background: #FE9903;
  201. border-radius: 15px;
  202. font-size: 24rpx;
  203. color: #FFFFFF;
  204. margin: 0rpx 20rpx 0rpx 20rpx;
  205. border: none;
  206. }
  207. }
  208. }
  209. }
  210. }
  211. </style>