exhibitor-news.vue 3.1 KB

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