index.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <template>
  2. <view class="container " style="font-size: 13px;">
  3. <block v-for="(row, index) in messageList" :key="index">
  4. <view class="msgItem">
  5. <div class="msgMsg">
  6. <div class="bagbar">{{$u.timeFormat(row.send_time, 'yyyy-mm-dd')}}</div>
  7. </div>
  8. <u-card @click="goDetail(row.sn,row.logi_id,row.ship_no)" :title="title" title-color="#666666" title-size="24" sub-title-color="#666666" sub-title-size="24" :border="false" :sub-title=row.status>
  9. <view class="msg-body" slot="body">
  10. <image class="msgImg" :src="row.goods_img" mode=""></image>
  11. <view class="msgView">
  12. <view>{{row.goodsName}}</view>
  13. <view class="msgNum">订单号:{{row.sn}}</view>
  14. </view>
  15. </view>
  16. </u-card>
  17. </view>
  18. </block>
  19. <uni-load-more :status="loadStatus"></uni-load-more>
  20. </view>
  21. </template>
  22. <script>
  23. import * as API_Message from "@/api/message.js";
  24. export default {
  25. data() {
  26. return {
  27. messageList: [],
  28. title: "物流更新通知",
  29. subTitle: "运输中",
  30. loadStatus:'more',
  31. params: {
  32. pageNumber: 1,
  33. pageSize: 10,
  34. },
  35. loadStatus:'more'
  36. };
  37. },
  38. onLoad(){
  39. this.GET_LogisticsList(true);
  40. },
  41. onReachBottom() {
  42. this.params.pageNumber++
  43. this.GET_LogisticsList(false)
  44. },
  45. methods: {
  46. goDetail(sn,logi_id,ship_no){
  47. uni.navigateTo({
  48. url:'/pages/msgTips/packagemsg/logisticsDetail?order_sn=' + sn +'&logi_id='+logi_id+'&ship_no='+ship_no,
  49. })
  50. },
  51. //获取物流消息
  52. GET_LogisticsList(reset){
  53. if (reset) {
  54. this.params.pageNumber = 1
  55. }
  56. uni.showLoading({
  57. title:"加载中"
  58. })
  59. API_Message.getLogisticsMessages(this.params).then(async response => {
  60. uni.hideLoading()
  61. const { data } = response
  62. if (!data || !data.length) {
  63. this.messageList.push(...data.data)
  64. }
  65. })
  66. }
  67. }
  68. };
  69. </script>
  70. <style scoped lang='scss'>
  71. .ddnumber {
  72. color: $u-tips-color;
  73. font-size: 24rpx;
  74. }
  75. .msg-body{
  76. display: flex;
  77. background-color: rgba(102, 110, 232, 0.0470588235294118);
  78. .msgImg{
  79. width: 160rpx;
  80. height: 160rpx;
  81. }
  82. .msgView{
  83. margin-left: 20rpx;
  84. .msgNum:last-child{
  85. margin-top: 60rpx;
  86. }
  87. }
  88. }
  89. .bagbar {
  90. display: inline;
  91. border-radius: 500px;
  92. color: #fff;
  93. font-size: 24rpx;
  94. padding: 10rpx 20rpx;
  95. background: $u-type-info-disabled;
  96. }
  97. .storeImg {
  98. width: 100%;
  99. height: 100rpx;
  100. margin-right: 20rpx;
  101. }
  102. .container {
  103. background: #F9F9F9;
  104. min-height: 100vh;
  105. }
  106. .msgMsg {
  107. text-align: center;
  108. color: $u-tips-color;
  109. }
  110. .msgItem {
  111. padding: 1em 0;
  112. }
  113. view{
  114. font-size: 13px;
  115. color: #666666;
  116. }
  117. u-card{
  118. font-size: 13px;
  119. color: #666666;
  120. }
  121. </style>