|
|
@@ -0,0 +1,111 @@
|
|
|
+<template>
|
|
|
+ <view class="attachment-box">
|
|
|
+ <view class="attachment-title sys-color-black">附近精选</view>
|
|
|
+ <view class="attachment-text sys-color-gray-9">每日推送附近优质用户来场高质量社交</view>
|
|
|
+ <view class="attachment-list">
|
|
|
+ <view class="attachment-item" :style="{'background-image':'url('+item.img+')'}" v-for="item in list">
|
|
|
+ <view class="attachment-data">
|
|
|
+ <view class="data-name sys-color-white sys-weight-600 sys-webkit-box sys-height-44">{{item.name}}</view>
|
|
|
+ <view class="data-text sys-height-44">
|
|
|
+ <text class="sys-height-44 sys-color-white text-item">{{item.age}}</text>
|
|
|
+ <text class="sys-height-44 sys-color-white text-item">/</text>
|
|
|
+ <text class="sys-height-44 sys-color-white text-item">{{item.sex}}</text>
|
|
|
+ <text class="sys-height-44 sys-color-white text-item">/</text>
|
|
|
+ <text class="sys-height-44 sys-color-white text-item">{{item.constellation}}</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ </view>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+export default {
|
|
|
+ name: "attachment-list",
|
|
|
+ components: {},
|
|
|
+ props: {},
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ list:[]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ watch: {},
|
|
|
+ mounted() {
|
|
|
+ this.getAttachmentList()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ getAttachmentList(){
|
|
|
+ let list=[
|
|
|
+ {'name':'仰看辉煌仰看辉煌仰看辉煌仰看辉煌','age':18,'sex':'女','constellation':'处女座','img':'/static/img/temporary/1.png'},
|
|
|
+ {'name':'Maple','age':18,'sex':'女','constellation':'处女座','img':'/static/img/temporary/2.png'},
|
|
|
+ {'name':'仰看辉煌','age':18,'sex':'女','constellation':'处女座','img':'/static/img/temporary/3.png'},
|
|
|
+ {'name':'Maple','age':18,'sex':'女','constellation':'处女座','img':'/static/img/temporary/1.png'},
|
|
|
+ {'name':'仰看辉煌','age':18,'sex':'女','constellation':'处女座','img':'/static/img/temporary/2.png'},
|
|
|
+ {'name':'Maple','age':18,'sex':'女','constellation':'处女座','img':'/static/img/temporary/3.png'},
|
|
|
+ ];
|
|
|
+ this.list.push(...list)
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped lang="scss">
|
|
|
+.attachment-box{
|
|
|
+ .attachment-title{
|
|
|
+ margin-top: 40rpx;
|
|
|
+ text-align: center;
|
|
|
+ font-size: 44rpx;
|
|
|
+ height: 44rpx;
|
|
|
+ line-height: 44rpx;
|
|
|
+ }
|
|
|
+ .attachment-text{
|
|
|
+ text-align: center;
|
|
|
+ margin-top: 16rpx;
|
|
|
+ font-size: 32rpx;
|
|
|
+ height: 44rpx;
|
|
|
+ line-height: 44rpx;
|
|
|
+ }
|
|
|
+ .attachment-list{
|
|
|
+ padding: 32rpx;
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ }
|
|
|
+ .attachment-item{
|
|
|
+ display: inline-block;
|
|
|
+ margin-right:18rpx;
|
|
|
+ width: calc((100vw - 82rpx)/2);
|
|
|
+ height: 504rpx;
|
|
|
+ background-repeat: no-repeat;//不平铺
|
|
|
+ background-position: center center;//居中
|
|
|
+ background-size: cover;//随容器大小
|
|
|
+ position: relative;
|
|
|
+ .attachment-data{
|
|
|
+ position: absolute;
|
|
|
+ left: 24rpx;
|
|
|
+ bottom: 24rpx;
|
|
|
+ width: calc((100vw - 82rpx)/2 - 48rpx);
|
|
|
+ .data-name{
|
|
|
+ font-size: 36rpx;
|
|
|
+
|
|
|
+ }
|
|
|
+ .data-text{
|
|
|
+ .text-item{
|
|
|
+ margin-right: 6rpx;
|
|
|
+ font-size: 24rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .attachment-item:nth-of-type(2n+0){
|
|
|
+ margin-right:0;
|
|
|
+ }
|
|
|
+ .attachment-item:nth-of-type(n+3){
|
|
|
+ margin-top:18rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+</style>
|