exhibitor-activity.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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. shareInfo: {}
  69. };
  70. },
  71. created() {
  72. },
  73. methods: {
  74. onShareAppMessage() {
  75. return this.shareInfo
  76. },
  77. onShareTimeline() {
  78. return this.shareInfo
  79. },
  80. getInfoEvent() {
  81. exhibitorsBoothActivityInfo({id: this.id}).then(res => {
  82. this.info = res.data
  83. this.info.time = returnTimeFormat(this.info.start_time, this.info.end_time)
  84. this.getExhibitorsInfo(this.info.exhibitors_id)
  85. this.shareInfo = {
  86. title: this.info.title,
  87. path: `/pages/exhibitor/exhibitor-activity?id=` + this.id,
  88. imageUrl: 'https://oss.productronicachina.com.cn/resources/common/up/0000001002/20250221/67b829f60c212.png'
  89. }
  90. })
  91. },
  92. getExhibitorsInfo(id) {
  93. exhibitorsInfo({id: id}).then(res => {
  94. this.exhibitorsInfo.exhibitors_logo = res.data.logo ? res.data.logo : 'https://onlinecatelogue.productronicachina.com.cn/assets/image/normal-logo.jpg'
  95. this.exhibitorsInfo.exhibitors_name_zh_cn = res.data.name_zh_cn
  96. this.exhibitorsInfo.exhibitors_name_en_us = res.data.name_en_us
  97. this.exhibitorsInfo.exhibitors_hall = res.data.hall
  98. this.exhibitorsInfo.exhibitors_booth_no = res.data.booth_no
  99. this.exhibitorsInfo.exhibitors_id = res.data.id
  100. })
  101. }
  102. }
  103. }
  104. </script>
  105. <style lang="scss">
  106. .main-container {
  107. .title {
  108. font-size: $fontSize7;
  109. font-weight: bold;
  110. margin-bottom: 39rpx;
  111. }
  112. .content {
  113. margin-top: 25rpx;
  114. }
  115. .info_item {
  116. margin-top: 15rpx;
  117. font-weight: bold;
  118. font-size: $fontSize2;
  119. .label {
  120. font-weight: 400;
  121. }
  122. }
  123. }
  124. </style>