flow.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. <template>
  2. <view>
  3. <page-head title="查看物流" :isBack="true"></page-head>
  4. <view id="box">
  5. <view class="teack-top">
  6. <view class="tt-left">
  7. <image :src="path_img"></image>
  8. </view>
  9. <view class="tt-right">
  10. <view>物流状态:{{data.expName}}</view>
  11. <view>更新时间:{{data.updatTime}}</view>
  12. <view>运单编号:{{data.num}}</view>
  13. </view>
  14. </view>
  15. <view class="traces">
  16. <view v-for="(item,index) of data.data" :key="index" v-if="data.data.length != 0" >
  17. <view class="cu-line ">
  18. <view :class="[index == 0 ? 'cul-item-select' : 'cul-item']">
  19. <view class="content">
  20. <view>{{item.context}}</view>
  21. <view class="time">{{item.time}}</view>
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. <view v-if="data.data.length == 0" class="no_time">
  27. 暂无物流信息
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. </template>
  33. <script>
  34. export default {
  35. data() {
  36. return {
  37. id:0,
  38. path_img:"",
  39. data : {
  40. expName : "",
  41. updateTime : "",
  42. data : [],
  43. num : ""
  44. }
  45. }
  46. },
  47. onLoad(options) {
  48. this.id = options.id;
  49. this.orderId = options.orderId;
  50. this.path_img = options.path_img;
  51. this.fetch_logistics();
  52. },
  53. methods: {
  54. fetch_logistics(){
  55. this
  56. .request
  57. .post("orderLogistics",{id:this.id})
  58. .then(res=>{
  59. if(res.code == 200) {
  60. this.data = res.data;
  61. }
  62. })
  63. .catch(err=>{
  64. uni.hideLoading();
  65. uni.showModal({title: '系统提示',content: '加载失败,返回在尝试',showCancel: false});
  66. });
  67. }
  68. }
  69. }
  70. </script>
  71. <style>
  72. page {
  73. }
  74. #box {
  75. padding-top: 90px;
  76. z-index: -1;
  77. }
  78. .teack-top{
  79. padding: 20px 15px;
  80. display: flex;
  81. background: #fff;
  82. }
  83. .tt-left{
  84. width: 90px;
  85. height: 90px;
  86. margin-right: 10px;
  87. }
  88. .tt-left image{
  89. width: 100%;
  90. height: 100%;
  91. border-radius: 10px;
  92. }
  93. .tt-right{
  94. width: 70%;
  95. color: #4A4A4A;
  96. font-size: 13px;
  97. }
  98. .tt-right view{
  99. margin-bottom: 5px;
  100. }
  101. /* ==================
  102. 物流信息
  103. ==================== */
  104. .traces {
  105. border-top: 10px #f5f5f5 solid;
  106. padding: 30px 10px 20px 10px;
  107. }
  108. .cul-item,.cul-item-select {
  109. padding: 0 0 30px 30px;
  110. position: relative;
  111. display: block;
  112. z-index: 0;
  113. }
  114. .cul-item::after {
  115. content: "";
  116. display: block;
  117. position: absolute;
  118. width: 1px;
  119. background-color: #E2E2E2;
  120. left: 12px;
  121. height: calc(100% - 20px);
  122. margin: 15px auto 0;
  123. top: 0;
  124. z-index: 8;
  125. }
  126. .cul-item-select::after {
  127. content: "";
  128. display: block;
  129. position: absolute;
  130. width: 1rpx;
  131. background-color: #E2E2E2;
  132. left: 25rpx;
  133. height: calc(100% - 50rpx);
  134. margin: 40rpx auto 0;
  135. top: 0;
  136. z-index: 8;
  137. }
  138. .cul-item::before {
  139. display: block;
  140. position: absolute;
  141. top: 0rpx;
  142. z-index: 9;
  143. width: 10px;
  144. height: 10px;
  145. text-align: center;
  146. border: none;
  147. line-height: 12rpx;
  148. left: 16rpx;
  149. background: #E2E2E2;
  150. content: "";
  151. border-radius: 100%;
  152. }
  153. .cul-item-select::before {
  154. display: block;
  155. position: absolute;
  156. top: 0rpx;
  157. z-index: 9;
  158. width: 14rpx;
  159. height: 14rpx;
  160. text-align: center;
  161. border: none;
  162. line-height: 14rpx;
  163. left: 10rpx;
  164. background: #F3D9C3;
  165. content: "";
  166. border: 8rpx #EF4034 solid;
  167. border-radius: 100%;
  168. }
  169. .content {
  170. display: block;
  171. font-size: 28rpx;
  172. padding-left: 15rpx;
  173. color: #999;
  174. position: relative;
  175. top: -10rpx;
  176. }
  177. .cul-item-select>.content {
  178. color: #EF4034;
  179. }
  180. .cul-item-select>.content>.time {
  181. color: #EF4034;
  182. }
  183. .time {
  184. margin-top: 10rpx;
  185. color: #999;
  186. font-size: 24rpx;
  187. }
  188. .no_time {
  189. width: 100%;
  190. text-align: center;
  191. font-size: 26rpx;
  192. color: #999;
  193. }
  194. </style>