healthPromote.vue 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333
  1. <template>
  2. <view class="content">
  3. <view class="top-content">
  4. <view class="search-box">
  5. <view class="inner">
  6. <image src="../../static/images/icon_search.png" mode=""></image>
  7. <input type="text" placeholder="输入关键字搜索" placeholder-class="placeholder">
  8. </view>
  9. </view>
  10. <view class="tag-box">
  11. <scroll-view scroll-x="true" >
  12. <view class="tag-scroll">
  13. <view v-for="(item,index) in 2" :key="index" class="tag">体重管理</view>
  14. </view>
  15. </scroll-view>
  16. </view>
  17. </view>
  18. <!-- 数据列表 -->
  19. <view class="prom-list">
  20. <view class="item" v-for="(item,index) in 5" :key="index">
  21. <view class="info-box">
  22. <view class="info-text">
  23. <view class="title">维生素B2几块钱一百片,却能调理改善4类健康问题</view>
  24. <view class="time">2022-11-04</view>
  25. </view>
  26. <image class="img" src="../../static/images/detault_head.jpg" mode="aspectFill"></image>
  27. </view>
  28. <view class="hand-box">
  29. <view class="left">
  30. <view class="head-box">
  31. <view v-for="(img,j) in 3" :key="j" class="head-item">
  32. <image class="img" src="../../static/images/detault_head.jpg" mode="aspectFill"></image>
  33. </view>
  34. </view>
  35. <view class="hand-item">
  36. <image class="eyes" src="../../static/images/icon_eyes.png" mode=""></image>
  37. <text class="text">218</text>
  38. </view>
  39. <view class="hand-item">
  40. <image class="share" src="../../static/images/icon_share_gray.png" mode=""></image>
  41. <text class="text">16</text>
  42. </view>
  43. </view>
  44. <view class="share-btn" @click="handShare">立即分享</view>
  45. </view>
  46. </view>
  47. </view>
  48. <!-- 分享弹窗 -->
  49. <uni-popup ref="sharePopup" type="bottom" :mask-click="false">
  50. <view class="share-content">
  51. <view class="share-inner">
  52. <view class="share-item">
  53. <image src="../../static/images/icon_wx.png" mode=""></image>
  54. <text class="text">微信</text>
  55. </view>
  56. <view class="share-item">
  57. <image src="../../static/images/icon_pyq.png" mode=""></image>
  58. <text class="text">朋友圈</text>
  59. </view>
  60. <view class="share-item">
  61. <image src="../../static/images/icon_xcxhb.png" mode=""></image>
  62. <text class="text">小程序海报</text>
  63. </view>
  64. <view class="share-item">
  65. <image src="../../static/images/icon_xccard.png" mode=""></image>
  66. <text class="text">小程序卡片</text>
  67. </view>
  68. <view class="share-item">
  69. <image src="../../static/images/icon_code.png" mode=""></image>
  70. <text class="text">二维码</text>
  71. </view>
  72. <view class="share-item">
  73. <image src="../../static/images/icon_copy_link.png" mode=""></image>
  74. <text class="text">复制链接</text>
  75. </view>
  76. </view>
  77. <view class="cancel-btn" @click="cancelShare">取消</view>
  78. </view>
  79. </uni-popup>
  80. </view>
  81. </template>
  82. <script>
  83. export default {
  84. data() {
  85. return {
  86. }
  87. },
  88. methods: {
  89. // 分享
  90. handShare() {
  91. this.$refs.sharePopup.open('bottom')
  92. },
  93. // 取消分享
  94. cancelShare() {
  95. this.$refs.sharePopup.close()
  96. }
  97. }
  98. }
  99. </script>
  100. <style lang="scss">
  101. page{
  102. background-color: #F7F7F7;
  103. }
  104. </style>
  105. <style scoped lang="scss">
  106. .top-content{
  107. width: 100%;
  108. position: fixed;
  109. top: 0;
  110. left: 0;
  111. z-index: 11;
  112. background: #FFFFFF;
  113. .search-box{
  114. height: 104upx;
  115. padding: 0 30upx;
  116. display: flex;
  117. align-items: center;
  118. .inner{
  119. box-sizing: border-box;
  120. width: 100%;
  121. height: 72upx;
  122. background: #F7F7F7;
  123. border-radius: 36upx;
  124. display: flex;
  125. align-items: center;
  126. padding: 0 30upx;
  127. image{
  128. width: 28upx;
  129. height: 28upx;
  130. margin-right: 20upx;
  131. }
  132. input{
  133. font-size: 28upx;
  134. font-family: PingFang SC;
  135. font-weight: 500;
  136. flex: 1;
  137. }
  138. .placeholder{
  139. font-size: 28upx;
  140. font-family: PingFang SC;
  141. font-weight: 500;
  142. color: #BBBBBB;
  143. }
  144. }
  145. }
  146. .tag-box{
  147. height: 106upx;
  148. padding: 0 30upx;
  149. .tag-scroll{
  150. height: 106upx;
  151. display: flex;
  152. align-items: center;
  153. .tag{
  154. flex-shrink: 0;
  155. height: 58upx;
  156. line-height: 56upx;
  157. padding: 0 24upx;
  158. background: #F5FFFE;
  159. border: 2upx solid #8AD5CE;
  160. border-radius: 14upx;
  161. font-size: 28upx;
  162. font-family: PingFang SC;
  163. font-weight: 500;
  164. color: #FF5C03;
  165. margin-right: 20upx;
  166. &:last-child{
  167. margin-right: 0;
  168. }
  169. }
  170. }
  171. }
  172. }
  173. .prom-list{
  174. padding: 230upx 20upx 20upx;
  175. .item{
  176. background: #FFFFFF;
  177. border-radius: 16upx;
  178. margin-bottom: 20upx;
  179. padding: 40upx 30upx;
  180. &:last-child{
  181. margin-bottom: 0;
  182. }
  183. .info-box{
  184. display: flex;
  185. align-items: center;
  186. justify-content: space-between;
  187. .info-text{
  188. width: calc(100% - 254upx);
  189. height: 170upx;
  190. display: flex;
  191. flex-direction: column;
  192. justify-content: space-between;
  193. .title{
  194. font-size: 32upx;
  195. font-family: PingFang SC;
  196. font-weight: bold;
  197. color: #111111;
  198. line-height: 50upx;
  199. overflow: hidden;
  200. text-overflow: ellipsis;
  201. display: -webkit-box;
  202. -webkit-line-clamp: 2;
  203. -webkit-box-orient: vertical;
  204. }
  205. .time{
  206. font-size: 24upx;
  207. font-family: PingFang SC;
  208. font-weight: 500;
  209. color: #999999;
  210. line-height: 1;
  211. }
  212. }
  213. .img{
  214. width: 224upx;
  215. height: 171upx;
  216. background: #E0E0E0;
  217. border-radius: 16upx;
  218. overflow: hidden;
  219. }
  220. }
  221. .hand-box{
  222. margin-top: 50upx;
  223. display: flex;
  224. align-items: center;
  225. justify-content: space-between;
  226. .left{
  227. display: flex;
  228. align-items: center;
  229. .head-box{
  230. display: flex;
  231. margin-right: 26upx;
  232. .head-item{
  233. width: 48upx;
  234. height: 48upx;
  235. background: #F6F7FB;
  236. border: 2upx solid #FFFFFF;
  237. border-radius: 50%;
  238. overflow: hidden;
  239. margin-left: -10upx;
  240. &:first-child{
  241. margin-left: 0;
  242. }
  243. .img{
  244. width: 100%;
  245. height: 100%;
  246. }
  247. }
  248. }
  249. .hand-item{
  250. display: flex;
  251. align-items: center;
  252. margin-right: 40upx;
  253. &:last-child{
  254. margin-right: 0;
  255. }
  256. .eyes{
  257. width: 27upx;
  258. height: 22upx;
  259. margin-right: 18upx;
  260. }
  261. .share{
  262. width: 24upx;
  263. height: 24upx;
  264. margin-right: 12upx;
  265. }
  266. .text{
  267. font-size: 24upx;
  268. font-family: PingFang SC;
  269. font-weight: 500;
  270. color: #999999;
  271. line-height: 1;
  272. }
  273. }
  274. }
  275. .share-btn{
  276. padding: 0 25upx;
  277. height: 60upx;
  278. line-height: 60upx;
  279. background: #FF5C03;
  280. border-radius: 12upx;
  281. font-size: 26upx;
  282. font-family: PingFang SC;
  283. font-weight: 500;
  284. color: #FFFFFF;
  285. }
  286. }
  287. }
  288. }
  289. .share-content{
  290. background-color: #F2F5F4;
  291. border-radius: 40upx 40upx 0px 0px;
  292. .share-inner{
  293. padding: 70upx 0 0 0;
  294. display: flex;
  295. flex-wrap: wrap;
  296. .share-item{
  297. width: 25%;
  298. display: flex;
  299. flex-direction: column;
  300. align-items: center;
  301. justify-content: center;
  302. margin-bottom: 66upx;
  303. image{
  304. width: 80upx;
  305. height: 80upx;
  306. margin-bottom: 20upx;
  307. }
  308. .text{
  309. font-size: 28upx;
  310. font-family: PingFang SC;
  311. font-weight: 500;
  312. color: #111111;
  313. line-height: 1;
  314. }
  315. }
  316. }
  317. .cancel-btn{
  318. height: 96upx;
  319. line-height: 96upx;
  320. text-align: center;
  321. font-size: 32upx;
  322. font-family: PingFang SC;
  323. font-weight: 500;
  324. color: #111111;
  325. border-top: 2upx solid #E8E8E8;
  326. background: #F2F5F4;
  327. }
  328. }
  329. </style>