article.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533
  1. <template>
  2. <view class="content">
  3. <view class="status_bar" :style="{height: statusBarHeight}"></view>
  4. <view class="top-block">
  5. <view class="left">
  6. <image class="w64 h64 " src="/static/images/back_black.png"></image>
  7. <image class="head" src="/static/images/img.png"></image>
  8. <text class="name">芳华悦选</text>
  9. </view>
  10. <view class="right">
  11. <view class="icon-bg">
  12. <image class="w40 h40" src="/static/images/share-icon.png"></image>
  13. </view>
  14. <view class="icon-bg">
  15. <image class="w40 h40" src="/static/images/shopping_car.png"></image>
  16. </view>
  17. </view>
  18. </view>
  19. <!-- 文章 -->
  20. <view class="article">
  21. <image class="photo" src="/static/images/img.png"></image>
  22. <view class="article-main">
  23. <view class="title">秋季常见问题儿科专家直播</view>
  24. <view class="txt">
  25. <text>秋意渐浓,凉爽的秋风不仅带来了宜人的景色,也悄然引发了儿童鼻炎的高发期。鼻塞、流涕、打喷嚏……这些看似不起眼的症状,却可能严重影响孩子们的日常生活和学习。#儿童鼻炎的高发期</text>
  26. <text class="lable">#儿童鼻炎的高发期</text>
  27. </view>
  28. <view class="card">
  29. <view class="card-item">
  30. <image class="card-icon" src="/static/images/jinbang_font.png"></image>
  31. <text class="ranking">24小时热门榜</text>
  32. <text class="top">TOP.3</text>
  33. </view>
  34. <image class="go" src="/static/images/jb_arrow_right_icon.png"></image>
  35. </view>
  36. <view class="place">5天前 重庆</view>
  37. </view>
  38. </view>
  39. <view class="line"></view>
  40. <!-- 评论 -->
  41. <view class="comment">
  42. <view class="comment-num">
  43. <text>共 124 条评论</text>
  44. <image class="w24 h24 ml10" src="/static/images/comment-icon.png"></image>
  45. </view>
  46. <!--可评论输入框 -->
  47. <view class="my-input">
  48. <image class="head" src="/static/images/img.png"></image>
  49. <view class="input-item">
  50. <input class="input" placeholder="说点什么..." />
  51. <image class="w40 h40" src="/static/images/emoticon_icon.png"></image>
  52. </view>
  53. </view>
  54. <!-- 消息 -->
  55. <view class="message">
  56. <view class="message-item">
  57. <view class="left">
  58. <image class="head" src="/static/images/img.png"></image>
  59. <view class="column">
  60. <view class="chat">
  61. <view class="name">
  62. <text>爱吃土豆</text>
  63. </view>
  64. <view class="flex-wrap">
  65. <view class="txt">孩子鼻炎很严重,能不能治好呀?</view>
  66. <view class="info">
  67. <text class="time">1小时前 重庆</text>
  68. <view class="reply">回复</view>
  69. </view>
  70. </view>
  71. </view>
  72. <view class="left mt26">
  73. <image class="head-little" src="/static/images/img.png"></image>
  74. <view class="chat">
  75. <view class="name">
  76. <text>爱吃土豆</text>
  77. <view class="author-lable">作者</view>
  78. </view>
  79. <view class="flex-wrap">
  80. <view class="txt">请告诉一下具体症状</view>
  81. <view class="info">
  82. <text class="time">1小时前 重庆</text>
  83. <view class="reply">回复</view>
  84. </view>
  85. </view>
  86. </view>
  87. </view>
  88. <view class="expand">展开 2 条回复</view>
  89. </view>
  90. </view>
  91. <view class="right">
  92. <image v-if="isLike" class="w40 h40" src="/static/images/like_red_icon.png" @click="onLike">
  93. </image>
  94. <image v-else class="w40 h40" src="/static/images/like_icon.png" @click="onLike"></image>
  95. <view class="">20</view>
  96. </view>
  97. </view>
  98. <view class="message-item">
  99. <view class="left">
  100. <image class="head" src="/static/images/img.png"></image>
  101. <view class="column">
  102. <view class="chat">
  103. <view class="name">
  104. <text>爱吃土豆</text>
  105. </view>
  106. <view class="flex-wrap">
  107. <view class="txt">孩子鼻炎很严重,能不能治好呀?</view>
  108. <view class="info">
  109. <text class="time">1小时前 重庆</text>
  110. <view class="reply">回复</view>
  111. </view>
  112. </view>
  113. </view>
  114. <view class="left mt26">
  115. <image class="head-little" src="/static/images/img.png"></image>
  116. <view class="chat">
  117. <view class="name">
  118. <text>爱吃土豆</text>
  119. <view class="author-lable">作者</view>
  120. </view>
  121. <view class="flex-wrap">
  122. <view class="txt">请告诉一下具体症状</view>
  123. <view class="info">
  124. <text class="time">1小时前 重庆</text>
  125. <view class="reply">回复</view>
  126. </view>
  127. </view>
  128. </view>
  129. </view>
  130. <view class="expand">展开 2 条回复</view>
  131. </view>
  132. </view>
  133. <view class="right">
  134. <image v-if="isLike" class="w40 h40" src="/static/images/like_red_icon.png" @click="onLike">
  135. </image>
  136. <image v-else class="w40 h40" src="/static/images/like_icon.png" @click="onLike"></image>
  137. <view class="">20</view>
  138. </view>
  139. </view>
  140. </view>
  141. </view>
  142. <!-- 输入框 -->
  143. <view class="chat-input-container">
  144. <view class=" input-container">
  145. <input id="txgMsg" placeholder="说点什么..." v-model="inputValue" placeholder-style="color:#999999;"
  146. class="ml20 input-native input-field" cursor-spacing="100" :adjust-position="false" />
  147. </view>
  148. <view class="icon-container">
  149. <view class="icon-item">
  150. <image class="icon" src="/static/images/comment.png" />
  151. <text>8</text>
  152. </view>
  153. <view class="icon-item">
  154. <image class="icon" src="/static/images/comment.png" />
  155. <text>10</text>
  156. </view>
  157. <view class="icon-item">
  158. <image class="icon" src="/static/images/comment.png" />
  159. <text>200</text>
  160. </view>
  161. </view>
  162. </view>
  163. </view>
  164. </template>
  165. <script>
  166. import Task from '@/pages_shopping/live/components/task.vue'
  167. import {
  168. liveList
  169. } from '@/api/living.js'
  170. export default {
  171. data() {
  172. return {
  173. // 状态栏的高度
  174. statusBarHeight: uni.getStorageSync('menuInfo').statusBarHeight,
  175. isLike: false
  176. }
  177. },
  178. onLoad() {
  179. },
  180. onUnload() {
  181. },
  182. methods: {
  183. onLike() {
  184. this.isLike = !this.isLike;
  185. }
  186. }
  187. }
  188. </script>
  189. <style lang="scss" scoped>
  190. .content {
  191. min-height: 100vh;
  192. background: #ffffff;
  193. position: relative;
  194. .top-block {
  195. padding-left: 24rpx;
  196. display: flex;
  197. justify-content: space-between;
  198. align-items: center;
  199. .left {
  200. display: flex;
  201. align-items: center;
  202. .head {
  203. width: 68rpx;
  204. height: 68rpx;
  205. border-radius: 34rpx 34rpx 34rpx 34rpx;
  206. margin: 0 16rpx;
  207. }
  208. .name {
  209. font-weight: 500;
  210. font-size: 32rpx;
  211. color: #333333;
  212. }
  213. }
  214. .right {
  215. display: flex;
  216. align-items: center;
  217. margin-right: 210rpx;
  218. .icon-bg {
  219. width: 64rpx;
  220. height: 64rpx;
  221. padding: 12rpx;
  222. border-radius: 32rpx 32rpx 32rpx 32rpx;
  223. border: 1rpx solid #E9E9E9;
  224. box-sizing: border-box;
  225. background: #FFFFFF;
  226. margin-left: 24rpx;
  227. }
  228. }
  229. .title-box {
  230. position: relative;
  231. .title {
  232. font-weight: 600;
  233. font-size: 40rpx;
  234. color: #333333;
  235. }
  236. }
  237. }
  238. // 文章
  239. .article {
  240. display: flex;
  241. flex-direction: column;
  242. margin-top: 30rpx;
  243. .photo {
  244. width: 100%;
  245. height: 416rpx;
  246. }
  247. .article-main {
  248. padding: 0 24rpx;
  249. .title {
  250. margin: 18rpx 0 32rpx;
  251. font-weight: 500;
  252. font-size: 36rpx;
  253. color: #333333;
  254. }
  255. .txt {
  256. font-size: 30rpx;
  257. color: #333333;
  258. .lable {
  259. color: #153868;
  260. margin-left: 8rpx;
  261. }
  262. }
  263. .card {
  264. display: flex;
  265. justify-content: space-between;
  266. align-items: center;
  267. background: #FFF5EB;
  268. width: 100%;
  269. height: 64rpx;
  270. border-radius: 8rpx;
  271. border: 1rpx solid #F3E2D0;
  272. padding: 16rpx;
  273. box-sizing: border-box;
  274. margin: 22rpx 0 32rpx; // 添加边距
  275. .card-item {
  276. display: flex;
  277. align-items: center;
  278. color: #D46C0D;
  279. .card-icon {
  280. width: 60rpx;
  281. height: 32rpx;
  282. margin-right: 24rpx;
  283. }
  284. .ranking {
  285. font-size: 24rpx;
  286. }
  287. .top {
  288. font-family: Roboto Flex, Roboto Flex;
  289. font-weight: normal;
  290. font-size: 24rpx;
  291. transform: skewX(-8deg);
  292. display: inline-block;
  293. margin-left: 8rpx;
  294. }
  295. }
  296. .go {
  297. width: 16rpx;
  298. height: 16rpx;
  299. }
  300. }
  301. .place {
  302. font-size: 24rpx;
  303. color: #999999;
  304. }
  305. }
  306. }
  307. .line {
  308. margin: 32rpx 0;
  309. width: 100%;
  310. height: 0rpx;
  311. border: 1rpx solid #EEEEEE;
  312. }
  313. // 评论
  314. .comment {
  315. display: flex;
  316. flex-direction: column;
  317. padding: 0 24rpx 120rpx;
  318. .comment-num {
  319. display: flex;
  320. align-items: center;
  321. font-weight: 500;
  322. font-size: 28rpx;
  323. color: #333333;
  324. margin-bottom: 30rpx;
  325. }
  326. .my-input {
  327. display: flex;
  328. margin-bottom: 40rpx;
  329. .head {
  330. width: 68rpx;
  331. height: 68rpx;
  332. margin-right: 24rpx;
  333. border-radius: 50%;
  334. flex-shrink: 0;
  335. }
  336. .input-item {
  337. flex: 1;
  338. display: flex;
  339. align-items: center;
  340. background: #F5F7FA;
  341. padding: 0 24rpx;
  342. border-radius: 34rpx;
  343. .input {
  344. flex: 1;
  345. }
  346. }
  347. }
  348. .message {
  349. display: flex;
  350. flex-direction: column;
  351. .message-item {
  352. display: flex;
  353. justify-content: space-between;
  354. .left {
  355. display: flex;
  356. .head {
  357. width: 68rpx;
  358. height: 68rpx;
  359. margin-right: 24rpx;
  360. border-radius: 50%;
  361. flex-shrink: 0;
  362. }
  363. .head-little {
  364. width: 48rpx;
  365. height: 48rpx;
  366. margin-right: 16rpx;
  367. border-radius: 50%;
  368. flex-shrink: 0;
  369. }
  370. .chat {
  371. .name {
  372. font-size: 26rpx;
  373. color: #999999;
  374. display: flex;
  375. .author-lable {
  376. width: 62rpx;
  377. height: 32rpx;
  378. background: #E0FFF4;
  379. border-radius: 16rpx;
  380. text-align: center;
  381. line-height: 32rpx;
  382. font-weight: 500;
  383. font-size: 18rpx;
  384. color: #02B176;
  385. margin-left: 14rpx;
  386. }
  387. }
  388. .flex-wrap {
  389. display: flex;
  390. flex-wrap: wrap;
  391. align-items: center;
  392. .txt {
  393. font-size: 28rpx;
  394. color: #333333;
  395. margin: 12rpx 24rpx 12rpx 0;
  396. }
  397. .info {
  398. font-size: 24rpx;
  399. display: flex;
  400. .time {
  401. color: #999999;
  402. }
  403. .reply {
  404. color: #666666;
  405. margin-left: 22rpx;
  406. }
  407. }
  408. }
  409. }
  410. }
  411. .expand {
  412. font-size: 26rpx;
  413. color: #153868;
  414. padding: 0 64rpx;
  415. }
  416. .right {
  417. display: flex;
  418. flex-direction: column;
  419. align-items: center;
  420. font-size: 24rpx;
  421. color: #666666;
  422. }
  423. }
  424. }
  425. }
  426. // 输入框
  427. .chat-input-container {
  428. display: flex;
  429. justify-content: space-between;
  430. align-items: center;
  431. height: 100rpx;
  432. box-sizing: border-box;
  433. padding: 20rpx 24rpx;
  434. width: 100%;
  435. box-sizing: border-box;
  436. position: fixed;
  437. bottom: 0;
  438. background-color: #ffffff;
  439. border-top: 1rpx solid #EEEEEE;
  440. .input-container {
  441. background: #F5F7FA;
  442. height: 68rpx;
  443. box-sizing: border-box;
  444. border-radius: 36rpx;
  445. display: flex;
  446. align-items: center;
  447. overflow: hidden;
  448. margin-right: 20rpx;
  449. }
  450. .icon-container {
  451. display: flex;
  452. align-items: center;
  453. .icon-item {
  454. display: flex;
  455. align-items: center;
  456. margin-right: 42rpx;
  457. &:last-child {
  458. margin-right: 0rpx;
  459. }
  460. .icon {
  461. width: 48rpx;
  462. height: 48rpx;
  463. margin-right: 8rpx;
  464. }
  465. }
  466. }
  467. }
  468. }
  469. </style>