detail.vue 14 KB

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