information.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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">
  7. <view class="contentleft">
  8. <!-- :src="pictureUrl+'/uploads/home/store/goods/'+item.goodsimage_url.substr(0, item.goodsimage_url.indexOf('\_')) + '/' + item.goodsimage_url" -->
  9. <image
  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. // 滚动到顶部
  47. upper(e) {
  48. console.log("顶部")
  49. },
  50. // 滚到底部
  51. lower(e) {
  52. this.page = this.page + 1;
  53. if(this.ispull) {
  54. this.getlist();
  55. }
  56. },
  57. // 滚动时触发
  58. scroll(e) {
  59. this.old.scrollTop = e.detail.scrollTop
  60. },
  61. getlist() {
  62. this.request({
  63. url: '/v2/shop/msg_list',
  64. method: 'POST',
  65. data: {
  66. page: this.page,
  67. page_size: 10
  68. },
  69. success: (res) => {
  70. this.list = this.list.concat(res.data.data.msg_list);
  71. }
  72. })
  73. }
  74. }
  75. }
  76. </script>
  77. <style lang="scss">
  78. .hotelcontent {
  79. display: flex;
  80. flex-direction: row;
  81. padding: 18upx 32upx;
  82. border-bottom: 10upx solid #F5F5F5;
  83. .contentleft {
  84. width: 200upx;
  85. height: 180upx;
  86. background-color: red;
  87. }
  88. .contentitle {
  89. width: 100%;
  90. padding-left: 35upx;
  91. color: #909399;
  92. view {
  93. padding-bottom: 12upx;
  94. }
  95. .contentip {
  96. float: left;
  97. color: #909399;
  98. padding-top: 15upx;
  99. font-size: 24upx;
  100. }
  101. }
  102. }
  103. </style>