详情小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

254 lines
6.0 KiB

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. <template>
  2. <view>
  3. <swiper class="cover_swiper" :current="current">
  4. <swiper-item v-for="(item, index) in cover_images" :key="index">
  5. <lf-image :src="item"></lf-image>
  6. </swiper-item>
  7. </swiper>
  8. <view class="content">
  9. <view class="card" v-for="item in 2" :key="item">
  10. <view class="avatar" @click="$url('/pages/my/index',{type: 'switch'})">
  11. <lf-image src="../../static/logo.png" ></lf-image>
  12. </view>
  13. <view class="info">
  14. <!-- 昵称和说说文字 -->
  15. <view class="lf-font-28 lf-color-777">编号 73949</view>
  16. <view class="lf-font-32 lf-color-222 lf-m-t-10">我更新了相册</view>
  17. <!-- 图片显示区 -->
  18. <view class="images-box">
  19. <view class="img2" v-for="(item,index) in img_list" :key="index">
  20. <lf-image :src="item.url" @tap="showImg(index)" />
  21. </view>
  22. </view>
  23. <!-- 赞过的用户头像 -->
  24. <!-- <lf-nolan-photo></lf-nolan-photo> -->
  25. <!-- 时间和更多按钮 -->
  26. <view class="lf-row-between lf-m-t-23">
  27. <view class="lf-font-28 lf-color-777">08:38</view>
  28. <view class="more lf-font-28" style="width: 100rpx;height: 50rpx;">
  29. <text class="lf-iconfont icon-fenxiang lf-font-24 lf-m-r-10"></text>
  30. 分享
  31. </view>
  32. <!-- 功能隐藏部分 -->
  33. <!-- <view class="more" @click="show_more = !show_more">
  34. <text class="lf-iconfont icon-more"></text>
  35. <view class="more-modal" v-if="show_more">
  36. <view class="more-item">
  37. <text class="lf-iconfont icon-zan"></text>
  38. <text class="lf-m-l-14"></text>
  39. </view>
  40. <view class="more-item">
  41. <text class="lf-iconfont icon-pinglun"></text>
  42. <text class="lf-m-l-14">评论</text>
  43. </view>
  44. <view class="more-item">
  45. <text class="lf-iconfont icon-fenxiang"></text>
  46. <text class="lf-m-l-14">分享</text>
  47. </view>
  48. </view>
  49. </view> -->
  50. </view>
  51. <!-- 评论 -->
  52. <!-- <view class="comment">
  53. <view>评论</view>
  54. <view class="lf-m-t-20">
  55. <text>等呵呵</text>
  56. <text class="lf-color-333">哈哈哈哈哈哈</text>
  57. </view>
  58. <view class="lf-m-t-20">
  59. <text>编号37894</text>
  60. <text class="lf-color-333 lf-m-l-10 lf-m-r-10">回复</text>
  61. <text>等呵呵</text>
  62. <text class="lf-color-333">俺是头大本驴</text>
  63. </view>
  64. </view> -->
  65. </view>
  66. </view>
  67. </view>
  68. <!-- 悬浮发布按钮 -->
  69. <view class="fixed-bottom" hover-class="lf-opacity" @click="$url('/pages/saySomething/saySomething')">
  70. <text class="lf-iconfont icon-jia lf-font-50"></text>
  71. </view>
  72. </view>
  73. </template>
  74. <script>
  75. import lfNolanPhoto from '@/components/lf-nolanPhoto/lf-nolanPhoto.vue';
  76. export default {
  77. components: { lfNolanPhoto },
  78. data(){
  79. return {
  80. current: 0,
  81. cover_images: ['https://picsum.photos/seed/picsum/200/300'],
  82. show_more: false,
  83. img_list: [
  84. {url: 'https://picsum.photos/seed/picsum/200/300'},
  85. {url: 'https://picsum.photos/seed/picsum/200/300'},
  86. {url: 'https://picsum.photos/200'}
  87. ]
  88. }
  89. },
  90. onLoad(){
  91. },
  92. methods: {
  93. showImg(index) {
  94. this.$u.throttle(() => {
  95. let goods_banner = this.img_list || [];
  96. let banners = goods_banner.map(item => item.url);
  97. uni.previewImage({
  98. urls: banners,
  99. current: index
  100. })
  101. }, 200);
  102. },
  103. }
  104. }
  105. </script>
  106. <style lang="scss" scoped="scoped">
  107. .cover_swiper{
  108. width: 750rpx;
  109. height: 375rpx;
  110. }
  111. .content{
  112. width: 750rpx;
  113. height: max-content;
  114. padding: 40rpx 32rpx;
  115. box-sizing: border-box;
  116. .card{
  117. width: 100%;
  118. height: max-content;
  119. padding-bottom: 30rpx;
  120. border-bottom: 1rpx solid #e5e5e5;
  121. display: flex;
  122. align-items: flex-start;
  123. justify-content: space-between;
  124. &:nth-child(n+2){
  125. margin-top: 30rpx;
  126. }
  127. &:last-child{
  128. border-bottom: none;
  129. }
  130. .avatar{
  131. width: 110rpx;
  132. height: 110rpx;
  133. border-radius: 50%;
  134. }
  135. .info{
  136. width: 560rpx;
  137. height: max-content;
  138. }
  139. .images-box{
  140. margin-top: 28rpx;
  141. display: flex;
  142. flex-wrap: wrap;
  143. //一张图
  144. .img{
  145. width: 460rpx;
  146. height: 460rpx;
  147. background-color: #0BCE5F;
  148. margin-right: 10rpx;
  149. &:nth-child(2n){
  150. margin-right: 0rpx;
  151. }
  152. &:nth-child(n+3){
  153. margin-top: 10rpx;
  154. }
  155. }
  156. //2张图
  157. .img1{
  158. width: 275rpx;
  159. height: 275rpx;
  160. background-color: #0BCE5F;
  161. margin-right: 10rpx;
  162. &:nth-child(2n){
  163. margin-right: 0rpx;
  164. }
  165. &:nth-child(n+3){
  166. margin-top: 10rpx;
  167. }
  168. }
  169. //三长以上
  170. .img2{
  171. width: 180rpx;
  172. height: 180rpx;
  173. background-color: #0BCE5F;
  174. margin-right: 10rpx;
  175. &:nth-child(3n){
  176. margin-right: 0rpx;
  177. }
  178. &:nth-child(n+4){
  179. margin-top: 10rpx;
  180. }
  181. }
  182. }
  183. .more{
  184. width: 66rpx;
  185. height: 40rpx;
  186. background-color: #F5F5F5;
  187. border-radius: 5rpx;
  188. color: #333333;
  189. display: flex;
  190. justify-content: center;
  191. align-items: center;
  192. font-size: 42rpx;
  193. position: relative;
  194. .more-modal{
  195. position: absolute;
  196. left: -472rpx;
  197. top: -14rpx;
  198. width: 467rpx;
  199. height: 68rpx;
  200. background: #555555;
  201. border-radius: 5rpx;
  202. display: flex;
  203. align-items: center;
  204. .more-item{
  205. width: 156rpx;
  206. height: 48rpx;
  207. border-right: 1rpx solid #777777;
  208. font-size: 24rpx;
  209. color: #FFFFFF;
  210. display: flex;
  211. justify-content: center;
  212. align-items: center;
  213. &:last-child{
  214. border-right: none;
  215. }
  216. }
  217. }
  218. }
  219. .comment{
  220. margin-top: 20rpx;
  221. width: 100%;
  222. height: max-content;
  223. background-color: #F5F5F5;
  224. border-radius: 5rpx;
  225. box-sizing: border-box;
  226. padding: 20rpx;
  227. font-size: 28rpx;
  228. color: #777777;
  229. }
  230. }
  231. }
  232. .fixed-bottom{
  233. position: fixed;
  234. right: 32rpx;
  235. bottom: 40rpx;
  236. /* #ifdef H5 */
  237. bottom: 140rpx;
  238. /* #endif */
  239. width: 100rpx;
  240. height: 100rpx;
  241. background-color: #E21196;
  242. border-radius: 50%;
  243. color: #FFFFFF;
  244. display: flex;
  245. justify-content: center;
  246. align-items: center;
  247. }
  248. </style>