detail.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290
  1. <template>
  2. <view class="container">
  3. <u-navbar :is-fixed="false" :border-bottom="false" :is-back="true" back-icon-name="arrow-leftward" title="新闻详情页"
  4. :background="{ background: '#fff' }" title-color="#000000">
  5. <view class="right-nav" slot="right">
  6. <image src="/static/images/news/search.png" class="icon icon-search" mode="widthFix"></image>
  7. <image src="/static/images/news/menu.png" class="icon icon-menu" mode="widthFix"></image>
  8. </view>
  9. </u-navbar>
  10. <view class="header">
  11. <image src="" class="avatar" mode=""></image>
  12. <view class="info">
  13. <view class="name">
  14. 中国空间站
  15. <text class="tag">专栏作家</text>
  16. </view>
  17. <view class="date">11-12</view>
  18. </view>
  19. <view class="btn">+关注</view>
  20. </view>
  21. <view class="content">
  22. <view class="title">
  23. 天舟五号创造多个航天新纪录
  24. </view>
  25. <view class="static">
  26. <view class="left">
  27. <view class="block">
  28. <image src="/static/images/news/gf.png" class="gf"></image>
  29. 官方
  30. </view>
  31. <view class="block">
  32. <image src="/static/images/news/x.png" class="gf"></image>
  33. 焦点新闻
  34. </view>
  35. </view>
  36. <view class="right">
  37. <image src="/static/images/news/l.png" class="l" mode="widthFix"></image>
  38. 66666
  39. </view>
  40. </view>
  41. <view class="detail">
  42. <u-parse :html="content"></u-parse>
  43. </view>
  44. </view>
  45. <view class="footer">
  46. <input type="text" value="" placeholder="说点什么..." class="ipt" />
  47. <view class="control">
  48. <view class="block">
  49. <image src="/static/images/news/c.png" class="icon c" mode="widthFix"></image>
  50. 458
  51. </view>
  52. <view class="block">
  53. <image src="/static/images/news/s.png" class="icon s" mode="widthFix"></image>
  54. </view>
  55. <view class="block">
  56. <image src="/static/images/news/t.png" class="icon t" mode="widthFix"></image>
  57. </view>
  58. </view>
  59. </view>
  60. </view>
  61. </template>
  62. <script>
  63. export default {
  64. data() {
  65. return {
  66. content: `<p>在北京航天飞行控制中心拍摄的天舟五号货运飞船与空间站组合体完成自主快速交会对接示意图。孙丰晓摄(新华社发)</p>
  67. <p>北京时间2022年11月12日10时03分,在文昌航天发射场,搭载天舟五号货运飞船的长征七号遥六运载火箭点火发射,将天舟五号货运飞船送入预定轨道。随后,天舟五号货运飞船与在轨运行的空间站组合体进行自主快速交会对接,中国航天员首次在空间站迎接货运飞船来访。</p>
  68. <p>朝着在距离地面约400公里轨道上运行的中国空间站组合体,天舟五号首次实现2小时自主快速交会对接,创造世界纪录。这一技术突破对于提升我国空间交会对接水平,提升空间站任务应急物资补给能力具有重要意义。</p>
  69. <p>空间站阶段最快交会对接,让人类航天器交会对接用时进入“2小时”时代。</p>
  70. <p>此次任务是中国空间站“T”字基本构型在轨组装完成后,“太空快递”首次送达,执行运输任务的仍是长七火箭。</p>`
  71. };
  72. }
  73. };
  74. </script>
  75. <style lang="scss">
  76. .container {
  77. padding: 0 0 150rpx;
  78. }
  79. .right-nav {
  80. display: flex;
  81. align-items: center;
  82. margin-right: 40rpx;
  83. .icon {
  84. height: auto;
  85. &-search {
  86. width: 40rpx;
  87. margin-right: 40rpx;
  88. }
  89. &-menu {
  90. width: 40rpx;
  91. }
  92. }
  93. }
  94. .header {
  95. display: flex;
  96. align-items: center;
  97. padding: 44rpx;
  98. .avatar {
  99. flex-shrink: 0;
  100. width: 69rpx;
  101. height: 69rpx;
  102. background: #ffffff;
  103. border: 1px solid #69b0ff;
  104. border-radius: 50%;
  105. }
  106. .info {
  107. flex: 1;
  108. margin-left: 14rpx;
  109. .name {
  110. display: flex;
  111. align-items: center;
  112. font-size: 28rpx;
  113. font-family: PingFang SC;
  114. font-weight: bold;
  115. color: #000000;
  116. line-height: 36rpx;
  117. .tag {
  118. margin-left: 10rpx;
  119. display: inline-block;
  120. padding: 8rpx 10rpx;
  121. font-size: 14rpx;
  122. font-family: PingFang SC;
  123. font-weight: 500;
  124. color: #4cbeca;
  125. line-height: 21rpx;
  126. border: 1px solid #0bb9c8;
  127. border-radius: 6px;
  128. }
  129. }
  130. .date {
  131. font-size: 24rpx;
  132. font-family: PingFang SC;
  133. font-weight: 500;
  134. color: #a3a3a3;
  135. line-height: 36rpx;
  136. }
  137. }
  138. .btn {
  139. padding: 8rpx 19rpx;
  140. background: #e6e6e6;
  141. border-radius: 6rpx;
  142. font-size: 20rpx;
  143. font-family: PingFang SC;
  144. font-weight: bold;
  145. color: #4cbeca;
  146. line-height: 1;
  147. }
  148. }
  149. .content {
  150. padding: 0 44rpx;
  151. .title {
  152. font-size: 40rpx;
  153. font-family: PingFang SC;
  154. font-weight: bold;
  155. color: #000000;
  156. line-height: 47rpx;
  157. }
  158. .static {
  159. margin-top: 34rpx;
  160. display: flex;
  161. justify-content: space-between;
  162. align-items: center;
  163. .left,
  164. .right {
  165. display: flex;
  166. align-items: center;
  167. .block {
  168. display: flex;
  169. align-items: center;
  170. margin-right: 10rpx;
  171. }
  172. }
  173. .left {
  174. font-size: 20rpx;
  175. font-family: PingFang SC;
  176. font-weight: bold;
  177. color: #787878;
  178. line-height: 1;
  179. .gf {
  180. width: 24rpx;
  181. height: 24rpx;
  182. margin-right: 8rpx;
  183. }
  184. }
  185. .right {
  186. font-size: 20rpx;
  187. font-family: PingFang SC;
  188. font-weight: bold;
  189. color: #787878;
  190. line-height: 1;
  191. .l {
  192. width: 25rpx;
  193. height: auto;
  194. margin-right: 6rpx;
  195. }
  196. }
  197. }
  198. .detail {
  199. font-size: 24rpx;
  200. font-family: PingFang SC;
  201. font-weight: 500;
  202. color: #000000;
  203. line-height: 47rpx;
  204. margin-top: 50rpx;
  205. }
  206. }
  207. .footer {
  208. position: fixed;
  209. bottom: 0;
  210. left: 0;
  211. right: 0;
  212. z-index: 999;
  213. height: 100rpx;
  214. padding: 20rpx;
  215. box-sizing: border-box;
  216. display: flex;
  217. align-items: center;
  218. justify-content: center;
  219. background-color: #ffffff;
  220. .ipt {
  221. width: 380rpx;
  222. height: 77rpx;
  223. background: #f7f7f7;
  224. border-radius: 38px;
  225. padding: 0 37rpx;
  226. box-sizing: border-box;
  227. margin-right: 20rpx;
  228. }
  229. .control {
  230. flex: 1;
  231. display: flex;
  232. align-items: center;
  233. justify-content: space-around;
  234. .block {
  235. display: flex;
  236. align-items: center;
  237. justify-content: center;
  238. flex: 1;
  239. }
  240. .icon {
  241. height: auto;
  242. }
  243. .c {
  244. width: 41rpx;
  245. margin-right: 10rpx;
  246. }
  247. .s {
  248. width: 36rpx;
  249. }
  250. .t {
  251. width: 31rpx;
  252. }
  253. }
  254. }
  255. </style>