express.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. <template>
  2. <view>
  3. <navbar :iSimmersive="false" title-color="#ffffff" background="#1b43c4" :placeholder="true" title="物流信息"></navbar>
  4. <info v-if="isError"></info>
  5. <view v-if="!isError">
  6. <view class="top">
  7. <view class="address">
  8. <view class="info">
  9. <text>收件人:{{order.accept_name}}</text>
  10. <text>手机号:{{order.mobile}}</text>
  11. </view>
  12. <view class="address-info">
  13. {{order.region}} {{order.address}}
  14. </view>
  15. </view>
  16. </view>
  17. <view class="order">
  18. <view class="title">
  19. <text>订单信息</text>
  20. </view>
  21. <view class="list clear">
  22. <view class="list-box clear">
  23. <view>订单编号:</view>
  24. <view class="money">{{order.order_no}}</view>
  25. </view>
  26. <view class="list-box clear" v-if="order.express.expName">
  27. <view>快递名称:</view>
  28. <view>{{order.express.expName||''}}</view>
  29. </view>
  30. <view class="list-box clear">
  31. <view>快递单号:</view>
  32. <view>{{order.express.number||''}}</view>
  33. </view>
  34. <view class="list-box clear">
  35. <view>物流耗时:</view>
  36. <view class="money">{{order.express.takeTime||''}}</view>
  37. </view>
  38. <view class="list-box clear">
  39. <view>更新时间:</view>
  40. <view class="money">{{order.express.updateTime||''}}</view>
  41. </view>
  42. </view>
  43. <uni-steps
  44. :options="stepsOptions"
  45. direction="column"
  46. active-color="#07c160"
  47. :active="active"
  48. />
  49. </view>
  50. </view>
  51. </view>
  52. </template>
  53. <script>
  54. import info from '@/components/tool/info.vue'
  55. import uniSteps from '@/components/uni-steps/uni-steps.vue'
  56. export default {
  57. components:{
  58. info,uniSteps
  59. },
  60. data(){
  61. return {
  62. isError: false,
  63. active: 0,
  64. orderId: 0,
  65. order:{
  66. express:{
  67. expName: "",
  68. number: "",
  69. takeTime: "",
  70. updateTime: ""
  71. },
  72. accept_name: "",
  73. address: "",
  74. create_time: "",
  75. mobile: "",
  76. order_no: "",
  77. region: ""
  78. },
  79. stepsOptions:[]
  80. };
  81. },
  82. onLoad(options) {
  83. this.isError = false;
  84. this.orderId = options.id;
  85. this.$http.getOrderExpress({ id: this.orderId }).then((res)=>{
  86. if(res.status){
  87. this.order = res.data;
  88. res.data.express.list.forEach((item,index)=>{
  89. this.stepsOptions.push({
  90. title: item.time,
  91. desc: item.status
  92. });
  93. });
  94. }else{
  95. this.$utils.msg(res.info);
  96. }
  97. }).catch((err)=>{
  98. this.isError = true;
  99. this.$utils.msg("网络出错,请检查网络是否连接");
  100. });
  101. },
  102. methods: {
  103. }
  104. }
  105. </script>
  106. <style lang="scss" scoped>
  107. .money{ color: #fc4141; }
  108. .top{
  109. background-color: #fff;
  110. position: relative;
  111. &:before{
  112. position: absolute;
  113. right: 0;
  114. bottom: 0;
  115. left: 0;
  116. height: 4rpx;
  117. background: -webkit-repeating-linear-gradient(135deg,#ff6c6c 0,#ff6c6c 20%,transparent 0,transparent 25%,#1989fa 0,#1989fa 45%,transparent 0,transparent 50%);
  118. background: repeating-linear-gradient(-45deg,#ff6c6c 0,#ff6c6c 20%,transparent 0,transparent 25%,#1989fa 0,#1989fa 45%,transparent 0,transparent 50%);
  119. background-size: 160rpx;
  120. content: '';
  121. }
  122. .status{
  123. width: 95%;
  124. margin: 0 auto;
  125. }
  126. .address{
  127. font-size: 28rpx;
  128. width: 92%;
  129. margin: 0 auto;
  130. .info{
  131. height: 60rpx;
  132. line-height: 60rpx;
  133. text:first-child{
  134. padding-right: 20rpx;
  135. }
  136. text:last-child{
  137. }
  138. }
  139. .address-info{
  140. height: 60rpx;
  141. line-height: 40rpx;
  142. }
  143. }
  144. }
  145. .order{
  146. background-color: #fff;
  147. margin-top: 30rpx;
  148. padding-bottom: 20rpx;
  149. .title{
  150. width: 100%;
  151. margin: 0 auto;
  152. color: #666;
  153. font-size: 30rpx;
  154. height: 80rpx;
  155. line-height: 80rpx;
  156. border-bottom: 2rpx solid #eee;
  157. text {
  158. padding-left: 30rpx;
  159. }
  160. }
  161. .list {
  162. width: 100%;
  163. .list-box{
  164. width: 92%;
  165. height: auto !important;
  166. height: 80rpx;
  167. min-height: 80rpx;
  168. line-height: 80rpx;
  169. margin: 0 auto;
  170. font-size: 26rpx; color: #333;
  171. border-bottom: 2rpx solid #ebedf0;
  172. view{ display: inline-block; }
  173. view:first-child { float: left; }
  174. view:last-child { float: right; }
  175. textarea { height: 150rpx; }
  176. }
  177. }
  178. }
  179. </style>