visits_details.vue 2.5 KB

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