detail.vue 13 KB

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