details.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. <template>
  2. <view class="details">
  3. <view class="navbar">
  4. <view class="back">
  5. <text class="iconfont icon-fanhui " @click="backLast()"></text>
  6. </view>
  7. <text>活动详情</text>
  8. </view>
  9. <!-- <view class="top">
  10. <u-navbar title="活动详情" :background="background" :border-bottom='false' title-color='#fff'></u-navbar>
  11. </view> -->
  12. <view class="content">
  13. <view class="title">
  14. <image :src="notice.cover ? notice.cover : '../../static/images/active.png'" mode=""></image>
  15. <view class="right">
  16. <view class="h1">
  17. {{notice.title}}
  18. </view>
  19. <view class="name">
  20. 主持人:{{notice.compere}}
  21. </view>
  22. <view class="time">
  23. {{notice.day}}
  24. </view>
  25. <!-- <view class="text">
  26. <text>主持人:{{notice.compere}}</text>
  27. <text>参与者:{{notice.participant}}</text>
  28. </view>
  29. <view class="address">
  30. 活动地址:{{notice.address}}
  31. </view>
  32. <view class="time">
  33. 活动日期:{{notice.day}}
  34. </view> -->
  35. </view>
  36. </view>
  37. <view class="desc">
  38. <view v-html="containt">{{containt}}</view>
  39. </view>
  40. </view>
  41. </view>
  42. </template>
  43. <script>
  44. import navBar from '../../components/navBar/navbar.vue';
  45. var app = getApp()
  46. export default {
  47. data() {
  48. return {
  49. background: 'rgba(255,255,255,0)',
  50. notice: {},
  51. containt:''
  52. }
  53. },
  54. onLoad(options) {
  55. if (this.is_weixin()) {
  56. this.navTitle()
  57. }
  58. app.request('/organization-activity/' + options.id , 'get').then(res => {
  59. console.log(res, 'course1')
  60. this.notice = res.data.data
  61. this.containt = res.data.data.body
  62. })
  63. },
  64. methods:{
  65. //判断是否是微信
  66. is_weixin() {
  67. let ua = navigator.userAgent.toLowerCase();
  68. return ua.indexOf('micromessenger') != -1;
  69. },
  70. navTitle() {
  71. let navTitle = document.getElementsByTagName('uni-page-head');
  72. navTitle[0].style.display = 'none'
  73. },
  74. backLast:function(){
  75. console.log(this.url)
  76. uni.reLaunch({
  77. url:'./active'
  78. })
  79. },
  80. }
  81. }
  82. </script>
  83. <style lang="scss" scoped>
  84. .navbar {
  85. font-size: 32upx;
  86. height: 100upx;
  87. line-height: 100upx;
  88. color: #888888;
  89. position: relative;
  90. position: fixed;
  91. top: 0;
  92. z-index: 9999999;
  93. width: 100%;
  94. background-color: #FFFFFF;
  95. text-align: center;
  96. border-bottom: solid 2upx #EFF1F6;
  97. .back {
  98. height: 100upx;
  99. width: 100upx;
  100. text-align: center;
  101. // background-color: #007AFF;
  102. position: absolute;
  103. float: left;
  104. left: 0upx;
  105. font-size: 32upx;
  106. }
  107. }
  108. .content {
  109. margin-top: 100upx;
  110. .title {
  111. padding: 20px;
  112. display: flex;
  113. align-items: center;
  114. justify-content: center;
  115. image {
  116. flex: 0 0 85px;
  117. height: 85px;
  118. border-radius: 9px;
  119. margin-right: 10px;
  120. background-color: #FFFFFF;
  121. }
  122. .right {
  123. flex: 1;
  124. .h1 {
  125. font-size: 16px;
  126. font-family: PingFang SC;
  127. font-weight: bold;
  128. // line-height: 20px;
  129. margin-top: 5px;
  130. // color: #FFFFFF;
  131. width: 211px;
  132. white-space: nowrap;
  133. /*设置不换行*/
  134. overflow: hidden;
  135. /*设置隐藏*/
  136. text-overflow: ellipsis;
  137. /*设置隐藏部分为省略号*/
  138. }
  139. // .text {
  140. // font-size: 13px;
  141. // font-family: PingFang SC;
  142. // font-weight: 400;
  143. // line-height: 20px;
  144. // color: rgba(40, 40, 40, .47);
  145. // margin-top: 3px;
  146. // width: 230px;
  147. // display: flex;
  148. // text{
  149. // display: block;
  150. // width: 115px;
  151. // white-space: nowrap;
  152. // /*设置不换行*/
  153. // overflow: hidden;
  154. // /*设置隐藏*/
  155. // text-overflow: ellipsis;
  156. // /*设置隐藏部分为省略号*/
  157. // }
  158. // }
  159. // .address{
  160. // font-size: 13px;
  161. // font-family: PingFang SC;
  162. // font-weight: 400;
  163. // line-height: 20px;
  164. // color: rgba(40, 40, 40, .47);
  165. // margin-top: 3px;
  166. // width: 230px;
  167. // }
  168. // .time {
  169. // font-size: 10px;
  170. // font-family: PingFang SC;
  171. // font-weight: 400;
  172. // line-height: 20px;
  173. // color: rgba(40, 40, 40, .47);
  174. // width: 230px;
  175. // white-space: nowrap;
  176. // /*设置不换行*/
  177. // overflow: hidden;
  178. // /*设置隐藏*/
  179. // text-overflow: ellipsis;
  180. // /*设置隐藏部分为省略号*/
  181. // }
  182. .name {
  183. font-size: 13px;
  184. font-family: PingFang SC;
  185. font-weight: 400;
  186. line-height: 20px;
  187. color: #282828;
  188. margin-top: 5px;
  189. opacity: 1;
  190. }
  191. .time {
  192. font-size: 10px;
  193. font-family: PingFang SC;
  194. font-weight: 400;
  195. line-height: 20px;
  196. color: #282828;
  197. opacity: 1;
  198. }
  199. }
  200. }
  201. .desc {
  202. padding: 20px;
  203. font-size: 13px;
  204. font-family: PingFang SC;
  205. font-weight: 400;
  206. line-height: 23px;
  207. color: #282828;
  208. opacity: 0.69;
  209. }
  210. }
  211. </style>