exhibitor-activity.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <template>
  2. <page-layout>
  3. <nav-bar title="展台活动" @init="onInitNavbar"></nav-bar>
  4. <u-scroll-view>
  5. <view class="main-container">
  6. <view class="title">
  7. {{ info.title }}
  8. </view>
  9. <view class="info_item">
  10. <text class="label">
  11. 活动时间:
  12. </text>
  13. <text>
  14. {{ info.time }}
  15. </text>
  16. </view>
  17. <view class="info_item">
  18. <text class="label">
  19. 活动地点:
  20. </text>
  21. <text>
  22. {{ info.address }}
  23. </text>
  24. </view>
  25. <view class="content">
  26. <u-content :content="info.content"></u-content>
  27. </view>
  28. <exhibitor-card :exhibit="exhibitorsInfo"></exhibitor-card>
  29. <disclaimer-text></disclaimer-text>
  30. </view>
  31. </u-scroll-view>
  32. </page-layout>
  33. </template>
  34. <script>
  35. import exhibitorCard from "@/pages/exhibitor/components/exhibitor-card";
  36. import {exhibitorsBoothActivityInfo, exhibitorsInfo} from "@/api/exhibitor";
  37. import NavBar from '@/components/layout/nav-bar'
  38. import UScrollView from '@/components/common/u-scroll-view'
  39. import UContent from '@/components/common/u-content'
  40. import DisclaimerText from '@/components/disclaimer-text/index.vue'
  41. import {returnTimeFormat} from "@/utils";
  42. import PageLayout from "@/components/layout/page-layout";
  43. export default {
  44. components: {
  45. PageLayout,
  46. exhibitorCard,
  47. NavBar,
  48. UScrollView,
  49. UContent,
  50. DisclaimerText
  51. },
  52. onLoad(options) {
  53. this.id = options.id
  54. this.getInfoEvent()
  55. },
  56. data() {
  57. return {
  58. id: 0,
  59. info: {},
  60. exhibitorsInfo: {
  61. exhibitors_logo: '',
  62. exhibitors_name_zh_cn: '',
  63. exhibitors_name_en_us: '',
  64. exhibitors_hall: '',
  65. exhibitors_booth_no: '',
  66. exhibitors_id: ''
  67. }
  68. };
  69. },
  70. created() {
  71. },
  72. methods: {
  73. getInfoEvent() {
  74. exhibitorsBoothActivityInfo({id: this.id}).then(res => {
  75. this.info = res.data
  76. this.info.time = returnTimeFormat(this.info.start_time, this.info.end_time)
  77. this.getExhibitorsInfo(this.info.exhibitors_id)
  78. })
  79. },
  80. getExhibitorsInfo(id) {
  81. exhibitorsInfo({id: id}).then(res => {
  82. this.exhibitorsInfo.exhibitors_logo = res.data.logo
  83. this.exhibitorsInfo.exhibitors_name_zh_cn = res.data.name_zh_cn
  84. this.exhibitorsInfo.exhibitors_name_en_us = res.data.name_en_us
  85. this.exhibitorsInfo.exhibitors_hall = res.data.hall
  86. this.exhibitorsInfo.exhibitors_booth_no = res.data.booth_no
  87. this.exhibitorsInfo.exhibitors_id = res.data.id
  88. })
  89. }
  90. }
  91. }
  92. </script>
  93. <style lang="scss">
  94. .main-container {
  95. .title {
  96. font-size: $fontSize6;
  97. font-weight: bold;
  98. margin-bottom: 39rpx;
  99. }
  100. .content {
  101. margin-top: 25rpx;
  102. }
  103. .info_item {
  104. margin-top: 15rpx;
  105. font-weight: bold;
  106. font-size: $fontSize2;
  107. .label {
  108. font-weight: 400;
  109. }
  110. }
  111. }
  112. </style>