Institutional_visits.vue 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <template>
  2. <view class="visitor">
  3. <view class="visits-time">{{ accDateTime }}</view>
  4. <template>
  5. <visits-cell
  6. @handlerVisits="handlerVisits"
  7. :visits-info="visitsInfo"
  8. v-for="visitsInfo in visitsList"
  9. :key="visitsInfo.userID"
  10. />
  11. </template>
  12. </view>
  13. </template>
  14. <script>
  15. import VisitsCell from '../components/visits-cell.vue'
  16. export default {
  17. components: {
  18. VisitsCell
  19. },
  20. data() {
  21. return {
  22. visitsList: [],
  23. accDateTime: '',
  24. userInfo: {}
  25. }
  26. },
  27. onLoad(options) {
  28. this.accDateTime = options.accDateTime
  29. },
  30. mounted() {
  31. this.userInfo = uni.getStorageSync('userInfo')
  32. this.getVisitesClubList()
  33. },
  34. onReachBottom() {
  35. },
  36. onPullDownRefresh() {
  37. //下拉刷新
  38. this.getVisitesClubList()
  39. uni.stopPullDownRefresh()
  40. },
  41. methods: {
  42. handlerVisits($event) {
  43. uni.setStorageSync('visitsInfo', JSON.stringify($event))
  44. this.$api.navigateTo(
  45. '/pages/seller/notice/service/visits_details?spId=' +
  46. this.userInfo.serviceProviderId +
  47. '&clubId=' +
  48. $event.clubId +
  49. '&accessTime=' +
  50. $event.accessTime.substr(0, 10)
  51. )
  52. },
  53. async getVisitesClubList() {
  54. const { data } = await this.SellerService.getVisitesClubList({
  55. spId: this.userInfo.serviceProviderId,
  56. accDateTime: this.accDateTime
  57. })
  58. this.visitsList = data
  59. }
  60. }
  61. }
  62. </script>
  63. <style lang="scss">
  64. page {
  65. background-color: #f7f7f7;
  66. }
  67. .visitor {
  68. .visits-time {
  69. font-size: 32rpx;
  70. font-weight: bold;
  71. color: #333333;
  72. padding: 40rpx 0 24rpx 16rpx;
  73. }
  74. }
  75. </style>