details.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. <template>
  2. <view>
  3. <view class="view">
  4. <!-- <view v-if="type === 0" class="listItemStyle">
  5. <u-text text="查看订单进度" color="rgb(0, 170, 255)" size="20"></u-text>
  6. </view> -->
  7. <u-list @scrolltolower="scrolltolower">
  8. <view v-if="dataList.length === 0" style="padding: 0 50px;">
  9. <image style="margin: 0 auto; width: 100%;" src="../../../static/img/page/empty_view.png"></image>
  10. </view>
  11. <view class="listItemStyle">
  12. <view style="padding: 10rpx;color: #848484;font-size: 30rpx;">
  13. 联系方式
  14. </view>
  15. <view style="padding: 5rpx 30rpx;color: #848484;">
  16. <view v-if="order.userName && order.phone">
  17. {{order.userName +" "+ order.phone}}
  18. </view>
  19. </view>
  20. <view style="padding: 10rpx;color: #848484;font-size: 30rpx;">
  21. 领取地点
  22. </view>
  23. <view style="padding: 5rpx 30rpx;color: #848484;">
  24. <view v-if="order.placeNumber">
  25. {{order.placeNumber}}
  26. </view>
  27. </view>
  28. </view>
  29. <u-list-item v-for="(item, index) in dataList" :key="index">
  30. <view v-if="item.amount !== 0 && item.amount" class="listItemStyle">
  31. <u-row>
  32. <u-col span="3">
  33. <u--image :showLoading="true" shape="circle" :src="baseURL+item.pictrue" width="70px"
  34. height="70px" style="margin: 10px;"></u--image>
  35. </u-col>
  36. <u-col span="7" style="margin-left: 5px;">
  37. <view>
  38. <u--text :text="item.name" size="20"></u--text>
  39. </view>
  40. <view v-if="item.eventTime"
  41. style="text-align: left;color: #ffaf25;font-size: 22rpx;margin-top: 10rpx;">
  42. {{"预计 "+item.eventTime+" 可领取"}}
  43. </view>
  44. <view style="margin-top: 10px;">
  45. <u-icon name="integral" :label="item.price"></u-icon>
  46. </view>
  47. </u-col>
  48. <u-col span="2">
  49. <view>
  50. <u--text :text="'x'+item.amount" size="25"></u--text>
  51. </view>
  52. </u-col>
  53. </u-row>
  54. </view>
  55. </u-list-item>
  56. </u-list>
  57. </view>
  58. </view>
  59. </template>
  60. <script>
  61. export default {
  62. data() {
  63. return {
  64. baseURL: this.$BASE_URL,
  65. priceSum: 0.0,
  66. dateShow: false,
  67. data: {
  68. organizationName: "",
  69. },
  70. order: uni.getStorageSync('order'),
  71. from: {
  72. orderNumber: '',
  73. organizationCode: ''
  74. },
  75. dataList: [],
  76. dataListNow: [],
  77. type: uni.getStorageSync("tabType")
  78. }
  79. },
  80. onLoad() {
  81. this.submitOrder()
  82. },
  83. methods: {
  84. toJDPage() {
  85. this.$goto('../../../pageA/card/orderProcess')
  86. },
  87. async submitOrder() {
  88. this.from.orderNumber = this.order.orderNumber
  89. this.from.organizationCode = this.order.jgid
  90. // 发送请求
  91. const {
  92. data: res
  93. } = await this.$httpRequest({
  94. url: '/app/getGiftOrderDetail',
  95. method: 'post',
  96. data: this.from,
  97. urlType: this.$getUrlType()
  98. });
  99. if (res.code === 200) {
  100. this.dataList = res.rows
  101. }
  102. },
  103. loadmore(data) {
  104. for (var i = 0; i < data.length; i++) {
  105. this.dataList.push(data[i])
  106. }
  107. },
  108. result(time, mode) {
  109. const timeFormat = uni.$u.timeFormat
  110. switch (mode) {
  111. case 'datetime':
  112. return timeFormat(time, 'yyyy-mm-dd hh:MM')
  113. case 'date':
  114. return timeFormat(time, 'yyyy-mm-dd')
  115. case 'year-month':
  116. return timeFormat(time, 'yyyy-mm')
  117. case 'time':
  118. return time
  119. default:
  120. return ''
  121. }
  122. }
  123. }
  124. }
  125. </script>
  126. <style>
  127. .view {
  128. background-color: #ebebeb;
  129. padding-top: 10px;
  130. }
  131. .listTermDate {
  132. padding: 10px 0;
  133. }
  134. .listItemStyle {
  135. margin: 5px 12px;
  136. padding: 10px;
  137. border-radius: 15px;
  138. background-color: #fafafa;
  139. }
  140. </style>