detail.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445
  1. <template>
  2. <page-layout class="activity-detail">
  3. <nav-bar title="同期活动详情" @init="onInitNavbar"></nav-bar>
  4. <u-scroll-view>
  5. <view class="main-container">
  6. <view class="activity-head">
  7. <view class="activity-title">{{ meetingInfo.title }}</view>
  8. <view class="activity-props">
  9. <view class="activity-prop">
  10. <view class="activity-prop-label">举办时间:</view>
  11. <view class="activity-prop-text">{{ meetingInfo.time }}</view>
  12. </view>
  13. <view class="activity-prop">
  14. <view class="activity-prop-label">举办地点:</view>
  15. <view class="activity-prop-text">{{ meetingInfo.address }}</view>
  16. </view>
  17. <view class="activity-prop">
  18. <view class="activity-prop-label">主办单位:</view>
  19. <view class="activity-prop-text">{{ meetingInfo.meeting_host }}</view>
  20. </view>
  21. </view>
  22. <view class="activity-action">
  23. <button open-type="share" :plain="true">
  24. <view>
  25. <view class="iconfont icon-zhuanfa"></view>
  26. <view>分享</view>
  27. </view>
  28. </button>
  29. <view @click="onCollect(meetingInfo)">
  30. <view v-if="meetingInfo.is_collect" class="iconfont icon-favourites-filled-star-symbol active"></view>
  31. <view v-else class="iconfont icon-Favourites-Add-Large"></view>
  32. <view>收藏</view>
  33. </view>
  34. </view>
  35. </view>
  36. <view class="activity-image">
  37. <image :src="meetingInfo.image_url" :alt="meetingInfo.image_alt"
  38. mode="aspectFill"/>
  39. </view>
  40. <view class="activity-desc">
  41. <view class="activity-desc-title">{{ expand_content.active_title.value }}</view>
  42. <u-content class="activity-desc-text" :content="meetingInfo.content"></u-content>
  43. </view>
  44. <view class="activity-info-flag">
  45. <view class="iconfont icon-Exclamation-Circle-Large-1"></view>
  46. </view>
  47. <view class="activity-agenda">
  48. <view class="activity-agenda-title">{{ expand_content.topic_title.value }}</view>
  49. <view class="activity-agenda-list">
  50. <view class="activity-agenda-item" v-for="item in expand_content.topic_list.value">
  51. <view class="iconfont icon-Check"></view>
  52. <view class="activity-agenda-item-text">{{ item[0].value }}</view>
  53. </view>
  54. </view>
  55. <view class="activity-agenda-guest-title">{{ expand_content.speaker_title.value }}</view>
  56. <view class="activity-agenda-guest-link">
  57. <van-button type="primary" @click="onClickGuestLink">
  58. <template>
  59. <view>{{ expand_content.speaker_btn.value }}</view>
  60. <view class="arrow iconfont icon-right-s"></view>
  61. </template>
  62. </van-button>
  63. </view>
  64. </view>
  65. <view class="activity-schedule">
  66. <view class="activity-schedule-title">{{ expand_content.schedule_title.value }}</view>
  67. <view class="activity-schedule-desc">
  68. {{ expand_content.schedule_desc.value }}
  69. </view>
  70. <view class="activity-schedule-table table">
  71. <view class="thead">
  72. <view class="tr">
  73. <view></view>
  74. <view>时间</view>
  75. <view>演讲题目</view>
  76. <view>演讲嘉宾</view>
  77. </view>
  78. </view>
  79. <view class="tbody">
  80. <view class="tr" v-for="item in meetingInfo.speech_schedule">
  81. <view>
  82. <view class="iconfont icon-CalendarAdd1"></view>
  83. </view>
  84. <view>{{ returnTimeFormatEvent(item.start_date,item.end_date) }}</view>
  85. <view>{{ item.title }}</view>
  86. <view>{{ item.description }}</view>
  87. </view>
  88. </view>
  89. </view>
  90. <!-- <view class="activity-schedule-image">
  91. <image src="https://www.productronicachina.com.cn/resources/files/0812/66b9c058eb46a/TGV.jpg"
  92. mode="aspectFit"/>
  93. </view>-->
  94. </view>
  95. <view class="activity-operation">
  96. <view class="activity-views">浏览:{{ meetingInfo.total_view }}</view>
  97. <view class="activity-action">
  98. <button open-type="share" :plain="true">
  99. <view>
  100. <view class="iconfont icon-zhuanfa"></view>
  101. <view>分享</view>
  102. </view>
  103. </button>
  104. <view @click="onCollect(meetingInfo)">
  105. <view v-if="meetingInfo.is_collect" class="iconfont icon-favourites-filled-star-symbol active"></view>
  106. <view v-else class="iconfont icon-Favourites-Add-Large"></view>
  107. <view>收藏</view>
  108. </view>
  109. </view>
  110. </view>
  111. <!-- <disclaimer-text></disclaimer-text> -->
  112. </view>
  113. </u-scroll-view>
  114. <contact-us :show.sync="showContactUs" :qrcode_url="q_url" />
  115. <float-button @custom-event="updateContactStatus()"></float-button>
  116. <van-dialog id="van-dialog" />
  117. </page-layout>
  118. </template>
  119. <script>
  120. import NavBar from '@/components/layout/nav-bar'
  121. import UScrollView from '@/components/common/u-scroll-view'
  122. import UContent from '@/components/common/u-content'
  123. import DisclaimerText from '@/components/disclaimer-text/index.vue'
  124. import {getMeetingInfo} from "@/api/meeting";
  125. import {returnTimeFormat} from '@/utils'
  126. import {meetingCancelCollect, meetingCollect} from "@/api/exhibitor"
  127. import floatButton from "@/components/layout/float-button"
  128. import ContactUs from '@/pages/index/components/contact-us.vue'
  129. import PageLayout from "@/components/layout/page-layout";
  130. export default {
  131. options: {
  132. styleIsolation: 'shared'
  133. },
  134. components: {
  135. PageLayout,
  136. NavBar,
  137. UScrollView,
  138. DisclaimerText,
  139. UContent,
  140. floatButton,
  141. ContactUs
  142. },
  143. computed: {},
  144. data() {
  145. return {
  146. id: 0,
  147. favorited: true,
  148. meetingInfo: {},
  149. expand_content: {},
  150. showContactUs: false,
  151. q_url: ''
  152. }
  153. },
  154. onLoad(options) {
  155. this.id = options.id
  156. this.getActiveInfo()
  157. },
  158. created() {
  159. },
  160. methods: {
  161. onCollect(item) { // 收藏
  162. if (!this.checkAuth('pages/activity/detail?id='+ this.id)) {
  163. return
  164. }
  165. if (item.is_collect === 1) {
  166. meetingCancelCollect({ id: item.id }).then(res => {
  167. if (res.code === 0) {
  168. this.meetingInfo.is_collect = 0
  169. }
  170. })
  171. } else {
  172. meetingCollect({ id: item.id }).then(res => {
  173. if (res.code === 0) {
  174. this.meetingInfo.is_collect = 1
  175. }
  176. })
  177. }
  178. },
  179. returnTimeFormatEvent(start_time,end_time) {
  180. return returnTimeFormat(start_time,end_time)
  181. },
  182. getActiveInfo() {
  183. getMeetingInfo({id: this.id}).then(res => {
  184. this.meetingInfo = res.data
  185. this.meetingInfo.time = returnTimeFormat(res.data.start_date,res.data.end_date)
  186. this.expand_content = res.data.expand_content
  187. // this.meetingInfo.content = convertRichTextToWXML(res.data.content)
  188. })
  189. },
  190. onClickGuestLink() {
  191. this.navigateTo('/pages/activity/guest?id=' + this.id)
  192. },
  193. updateContactStatus(data) {
  194. this.showContactUs = data.showContactUs
  195. this.q_url = data.q_url
  196. }
  197. }
  198. }
  199. </script>
  200. <style lang="scss">
  201. .activity-detail {
  202. .activity-head {
  203. position: relative;
  204. font-weight: normal;
  205. font-size: $fontSize6;
  206. color: #333333;
  207. .activity-title {
  208. font-weight: bold;
  209. }
  210. .activity-action {
  211. position: absolute;
  212. bottom: 0;
  213. right: 0;
  214. }
  215. }
  216. .activity-operation {
  217. @include display-flex-between;
  218. margin-top: 32rpx;
  219. }
  220. .activity-views {
  221. font-size: $fontSize2;
  222. color: #555555;
  223. }
  224. .activity-action {
  225. display: grid;
  226. grid-template-columns: 1fr 1fr;
  227. width: 210rpx;
  228. font-size: $fontSize2;
  229. color: #555555;
  230. & > view {
  231. display: flex;
  232. align-items: center;
  233. justify-content: flex-end;
  234. }
  235. .iconfont {
  236. font-size: $fontSize2;
  237. margin-right: 4rpx;
  238. }
  239. .icon-Favourites-Add-Large {
  240. &.active {
  241. &::before {
  242. content: '\e669';
  243. }
  244. color: $textActionColor;
  245. }
  246. }
  247. button {
  248. font-size: $fontSize2;
  249. white-space: nowrap;
  250. line-height: inherit;
  251. background-color: transparent;
  252. border: none;
  253. view {
  254. display: flex;
  255. align-items: center;
  256. font-size: $fontSize2;
  257. }
  258. }
  259. }
  260. .activity-props {
  261. position: relative;
  262. display: grid;
  263. grid-template-columns: 1fr;
  264. grid-row-gap: 12rpx;
  265. margin-top: 32rpx;
  266. padding-right: 210rpx;
  267. font-size: $fontSize2;
  268. .activity-prop {
  269. display: flex;
  270. align-items: center;
  271. }
  272. .activity-prop-label {
  273. padding-right: 4rpx;
  274. }
  275. .activity-prop-text {
  276. font-weight: bold;
  277. }
  278. }
  279. .activity-image {
  280. height: 407rpx;
  281. margin-top: 33rpx;
  282. }
  283. .activity-desc {
  284. margin-top: 47rpx;
  285. .activity-desc-title {
  286. font-size: $fontSize6;
  287. color: #333333;
  288. line-height: 38rpx;
  289. }
  290. .activity-desc-text {
  291. display: block;
  292. margin-top: 31rpx;
  293. }
  294. }
  295. .activity-info-flag {
  296. @include display-flex-center;
  297. height: 48rpx;
  298. margin-top: 37rpx;
  299. margin-bottom: 16rpx;
  300. background: linear-gradient(259deg, #EA7A01 0%, #F5A201 100%);
  301. border-radius: 6rpx;
  302. color: #FFFFFF;
  303. .iconfont {
  304. font-size: 22rpx;
  305. }
  306. }
  307. .activity-agenda {
  308. padding: 20rpx;
  309. background-color: #E8EBF1;
  310. border-radius: 6rpx;
  311. color: #333333;
  312. .activity-agenda-title, .activity-agenda-guest-title {
  313. font-weight: bold;
  314. font-size: $fontSize3;
  315. line-height: 35rpx;
  316. }
  317. .activity-agenda-list {
  318. display: grid;
  319. grid-template-columns: 1fr;
  320. grid-row-gap: 23rpx;
  321. margin-top: 20rpx;
  322. }
  323. .activity-agenda-item {
  324. display: flex;
  325. align-items: flex-start;
  326. font-size: $fontSize2;
  327. }
  328. .activity-agenda-item-text {
  329. margin-left: 4rpx;
  330. }
  331. .activity-agenda-guest-title, .activity-agenda-guest-link {
  332. margin-top: 20rpx;
  333. }
  334. .activity-agenda-guest-link {
  335. .van-button {
  336. font-size: $fontSize0;
  337. font-weight: bold;
  338. }
  339. }
  340. }
  341. .activity-schedule {
  342. margin-top: 49rpx;
  343. color: #333333;
  344. .activity-schedule-title {
  345. font-size: $fontSize6;
  346. line-height: 38rpx;
  347. }
  348. .activity-schedule-desc {
  349. margin-top: 20rpx;
  350. font-size: $fontSize2;
  351. line-height: 40rpx;
  352. }
  353. .activity-schedule-image {
  354. margin-top: 35rpx;
  355. }
  356. }
  357. .table {
  358. margin-top: 30rpx;
  359. .iconfont {
  360. color: #6A91CE;
  361. font-size: $fontSize2;
  362. }
  363. .thead {
  364. .tr {
  365. & > view {
  366. padding: 4rpx 16rpx;
  367. color: #7D7D7D;
  368. }
  369. }
  370. }
  371. .tbody {
  372. .tr {
  373. & > view {
  374. padding: 16rpx;
  375. background-color: #FFFFFF;
  376. }
  377. }
  378. }
  379. .tr {
  380. display: flex;
  381. margin-bottom: 8rpx;
  382. font-size: $fontSize1;
  383. & > view:nth-child(1) {
  384. width: 40rpx;
  385. margin-right: 8rpx;
  386. padding: 16rpx 10rpx;
  387. }
  388. & > view:nth-child(2) {
  389. width: 214rpx;
  390. }
  391. & > view:nth-child(3) {
  392. width: 214rpx;
  393. }
  394. & > view:nth-child(4) {
  395. flex: 1;
  396. }
  397. }
  398. }
  399. }
  400. </style>