exhibitor-news.vue 3.2 KB

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