visits_details.vue 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <template>
  2. <view class="details">
  3. <view class="visits-time">{{ accessTime }}</view>
  4. <template>
  5. <view class="details-title"><visits-cell @handlerVisits="handlerVisits" :visits-info="visitsInfo" /></view>
  6. </template>
  7. <view class="trajectory">
  8. <Trajectory :trajectory-list="detailList"/>
  9. </view>
  10. </view>
  11. </template>
  12. <script>
  13. import VisitsCell from '../components/visits-cell.vue'
  14. import Trajectory from '../components/trajectory.vue'
  15. export default {
  16. components: {
  17. VisitsCell,
  18. Trajectory
  19. },
  20. data() {
  21. return {
  22. visitsInfo: {},
  23. accessTime: '', // 访问日期
  24. spId: '', // 协销id
  25. clubId: '' ,// 机构id
  26. detailList: []
  27. }
  28. },
  29. async onLoad(options) {
  30. this.accessTime = options.accessTime
  31. this.spId = options.spId
  32. this.clubId = options.clubId
  33. const { data } = await this.SellerService.getVisitesClubInfo({accessTime: options.accessTime, spId: options.spId, clubId: options.clubId})
  34. this.detailList = data
  35. this.visitsInfo = {
  36. image: data[0].image,
  37. linkMan: data[0].linkMan,
  38. contractMobile: data[0].contractMobile,
  39. pageLabel: data[0].pageLabel,
  40. name: data[0].name
  41. }
  42. console.log('options', options, 'visitsInfo', data, '详情', this.visitsInfo)
  43. },
  44. mounted() {
  45. this.getVisitesClubDetail()
  46. },
  47. methods: {
  48. handlerVisits($event) {},
  49. async getVisitesClubDetail() {
  50. const {data} = await this.SellerService.getVisitesClubInfo({accessTime: this.accessTime, spId: this.spId, clubId: this.clubId})
  51. this.detailList = data
  52. this.visitsInfo = {
  53. image: data[0].image,
  54. linkMan: data[0].linkMan,
  55. contractMobile: data[0].contractMobile,
  56. pageLabel: data[0].pageLabel
  57. }
  58. console.log('visitsInfo', data)
  59. }
  60. }
  61. }
  62. </script>
  63. <style lang="scss">
  64. page {
  65. background-color: #f7f7f7;
  66. }
  67. .details {
  68. .visits-time {
  69. font-size: 32rpx;
  70. font-weight: bold;
  71. color: #333333;
  72. padding: 40rpx 0 24rpx 16rpx;
  73. }
  74. .details-title {
  75. margin-bottom: 24rpx;
  76. }
  77. }
  78. </style>