information.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <template>
  2. <view>
  3. <scroll-view style="height: 100vh;" class="floor-list"
  4. :scroll-top="scrollTop" scroll-y="true" v-if="list.length > 0" @scroll="scroll" @scrolltoupper="upper" @scrolltolower="lower"
  5. :refresher-enabled="false">
  6. <view class="hotelcontent" v-for="(item,index) in list" :key="index" @click="goinformstion(item)">
  7. <view class="contentleft">
  8. <image
  9. mode="widthFix"
  10. :src="pictureUrl+'/uploads/home/store/goods/'+item.goods_image.substr(0, item.goods_image.indexOf('\_')) + '/' + item.goods_image"
  11. style="width: 100%;height: 100%;"></image>
  12. </view>
  13. <view class="contentitle">
  14. <!-- <view v-if="item.types == 0">催单信息</view>
  15. <view v-if="item.types == 1">联系酒店</view>
  16. <view v-if="item.types == 2">客户退货</view> -->
  17. <view>{{item.status}}</view>
  18. <view>{{item.content}}</view>
  19. <view>订单号:{{item.order_sn}}</view>
  20. <view style="text-align: right;">{{item.add_time}}</view>
  21. </view>
  22. </view>
  23. </scroll-view>
  24. <view v-if="list.length == 0" style="text-align: center;margin-top: 300upx;">
  25. 暂无消息通知哦
  26. </view>
  27. </view>
  28. </template>
  29. <script>
  30. export default {
  31. data() {
  32. return{
  33. pictureUrl: this.pictureUrl,
  34. list:[],
  35. page: 1,
  36. scrollTop: 0,
  37. old: {
  38. scrollTop: 0
  39. }
  40. }
  41. },
  42. onLoad() {
  43. this.getlist();
  44. },
  45. methods: {
  46. goinformstion(e) {
  47. let id = e.order_id;
  48. uni.navigateTo({
  49. url: `/pages/myOrder/order?id=${id}`
  50. })
  51. },
  52. // 滚动到顶部
  53. upper(e) {
  54. console.log("顶部")
  55. },
  56. // 滚到底部
  57. lower(e) {
  58. this.page = this.page + 1;
  59. if(this.ispull) {
  60. this.getlist();
  61. }
  62. },
  63. // 滚动时触发
  64. scroll(e) {
  65. this.old.scrollTop = e.detail.scrollTop
  66. },
  67. getlist() {
  68. this.request({
  69. url: '/v2/shop/msg_list',
  70. method: 'POST',
  71. data: {
  72. page: this.page,
  73. page_size: 10
  74. },
  75. success: (res) => {
  76. this.list = this.list.concat(res.data.data.msg_list);
  77. }
  78. })
  79. }
  80. }
  81. }
  82. </script>
  83. <style lang="scss">
  84. .hotelcontent {
  85. display: flex;
  86. flex-direction: row;
  87. padding: 18upx 32upx;
  88. border-bottom: 10upx solid #F5F5F5;
  89. .contentleft {
  90. width: 220upx;
  91. }
  92. .contentitle {
  93. width: 100%;
  94. padding-left: 35upx;
  95. color: #909399;
  96. view {
  97. padding-bottom: 12upx;
  98. }
  99. .contentip {
  100. float: left;
  101. color: #909399;
  102. padding-top: 15upx;
  103. font-size: 24upx;
  104. }
  105. }
  106. }
  107. </style>