express-delivery.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <template>
  2. <!--pages/express-delivery/express-delivery.wxml-->
  3. <!-- 物流信息 -->
  4. <view class="container">
  5. <view class="wrapper">
  6. <view class="deliveryInfo" style="background:url(http://jiales.gz-yami.com/delivery-bg.png) center center no-repeat #fff;">
  7. <view class="icon-express" style="background:url(http://jiales.gz-yami.com/delivery-car.png) no-repeat;background-size:100% 100%;">
  8. </view>
  9. <view class="infoWarp">
  10. <view class="companyname">
  11. <text class="key">物流公司:</text>
  12. <text class="value">{{companyName}}</text>
  13. </view>
  14. <view class="expno">
  15. <text class="key">运单编号:</text>
  16. <text class="value">{{dvyFlowId}}</text>
  17. </view>
  18. </view>
  19. </view>
  20. <view class="deliveryDetail" v-if="dvyData.length">
  21. <block v-for="(item, index) in dvyData" :key="index">
  22. <view :class="'detailItem ' + (index==0?'lastest':'')">
  23. <view class="dot">
  24. <image src="/static/images/icon/delive-dot.png"></image>
  25. <image src="/static/images/icon/dot.png"></image>
  26. </view>
  27. <view class="detail">
  28. <view class="desc">{{item.context}}</view>
  29. <view class="time">{{item.time}}</view>
  30. </view>
  31. </view>
  32. </block>
  33. </view>
  34. <view class="empty-space" v-else>
  35. 暂无配送信息
  36. </view>
  37. </view>
  38. </view>
  39. </template>
  40. <script>
  41. // pages/express-delivery/express-delivery.js
  42. var http = require("../../utils/http.js");
  43. export default {
  44. data() {
  45. return {
  46. companyName: "",
  47. dvyFlowId: "",
  48. dvyData: []
  49. };
  50. },
  51. components: {},
  52. props: {},
  53. /**
  54. * 生命周期函数--监听页面加载
  55. */
  56. onLoad: function (options) {
  57. var ths = this;
  58. uni.showLoading();
  59. var params = {
  60. url: "/delivery/check",
  61. method: "GET",
  62. data: {
  63. orderNumber: options.orderNum
  64. },
  65. callBack: function (res) {
  66. //console.log(res);
  67. ths.setData({
  68. companyName: res.companyName,
  69. dvyFlowId: res.dvyFlowId,
  70. dvyData: res.data
  71. });
  72. uni.hideLoading();
  73. }
  74. };
  75. http.request(params);
  76. },
  77. /**
  78. * 生命周期函数--监听页面初次渲染完成
  79. */
  80. onReady: function () {},
  81. /**
  82. * 生命周期函数--监听页面显示
  83. */
  84. onShow: function () {},
  85. /**
  86. * 生命周期函数--监听页面隐藏
  87. */
  88. onHide: function () {},
  89. /**
  90. * 生命周期函数--监听页面卸载
  91. */
  92. onUnload: function () {},
  93. /**
  94. * 页面相关事件处理函数--监听用户下拉动作
  95. */
  96. onPullDownRefresh: function () {},
  97. /**
  98. * 页面上拉触底事件的处理函数
  99. */
  100. onReachBottom: function () {},
  101. /**
  102. * 用户点击右上角分享
  103. */
  104. onShareAppMessage: function () {},
  105. methods: {}
  106. };
  107. </script>
  108. <style>
  109. @import "./express-delivery.css";
  110. </style>