123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234 |
- <template>
- <view class="user-content-box">
- <view class="content-top">
- <view class="top-left">“</view>
- <view class="top-right">
- <image class="right-img" mode="aspectFill" src="/static/img/index/like.png" ></image>
- <view class="right-text sys-color-white sys-weight-400">{{userItem.likeCount}}喜欢</view>
- </view>
- </view>
- <view class="user-signature sys-color-white sys-weight-400">{{userItem.slogan}}</view>
- <view class="user-tag" v-if="userItem.tagList.length>0">
- <view class="tag-item" v-for="i in userItem.tagList">
- <image class="tag-img" mode="aspectFill" src="/static/img/index/tag-img.png" ></image>
- <view class="tag-text sys-color-gray-3 sys-weight-400">{{i}}</view>
- </view>
- </view>
- <view class="user-wire"></view>
- <view class="gift-box" @touchmove.stop="stopTouche" @touchend.stop="stopTouche" @touchstart.stop="stopTouche">
- <view class="gift-title">
- <view class="gift-title-left sys-weight-600">心动礼物</view>
- <view class="gift-title-right">
- <view class="gift-right-text sys-color-white sys-weight-400">全部</view>
- <image class="gift-right-img" mode="aspectFill" src="/static/img/index/right.png" ></image>
- </view>
- </view>
- <view class="gift-list" id="gift-list" >
- <view class="gift-item" v-for="giftItem in giftList">
- <image class="gift-item-img" :class="{'gift-item-img-gray':giftItem.num<=0}" mode="aspectFill" :src="giftItem.url" ></image>
- <view class="gift-num sys-color-white" v-if="giftItem.num>0">
- <text>X</text>
- <text>{{giftItem.num}}</text>
- </view>
- <view class="gift-but sys-background-yellow sys-color-black sys-weight-500" v-else>点亮</view>
- </view>
- </view>
- </view>
- <view class="dynamic-list">
- <dynamic-item :user-id="userItem.userId"></dynamic-item>
- </view>
- </view>
- </template>
- <script>
- import ImgOne from "@/pages/common/img/img-one";
- import ImgTwo from "@/pages/common/img/img-two";
- import ImgThree from "@/pages/common/img/img-three";
- import DynamicItem from "@/pages/common/dynamic/dynamic-items";
- import {getMoments} from "@/api/discovery";
- export default {
- name: "user-content",
- components: {DynamicItem, ImgThree, ImgTwo, ImgOne},
- props: {
- 'userItem':{
- default:{
- 'userId':0,
- 'likeCount':0,
- 'tagList':[],
- }
- }
- },
- data() {
- return {
- giftList:[
- {'num':1,'url':'/static/img/temporary/gift1.png'},
- {'num':0,'url':'/static/img/temporary/gift2.png'},
- {'num':0,'url':'/static/img/temporary/gift3.png'},
- {'num':1,'url':'/static/img/temporary/gift1.png'},
- {'num':0,'url':'/static/img/temporary/gift2.png'},
- {'num':0,'url':'/static/img/temporary/gift3.png'},
- ],
- }
- },
- watch: {
- 'userId':function () {
- }
- },
- mounted() {
- console.log()
- },
- methods: {
- stopTouche(){
- // console.log('滑动事件阻止触发')
- return false
- },
- }
- }
- </script>
- <style scoped lang="scss">
- .user-content-box{
- background: #333333;
- padding: 40rpx 28rpx;
- .content-top{
- display: flex;
- justify-content: space-between;
- .top-left{
- font-size: 48rpx;
- color: rgba(255,255,255,0.3);
- }
- .top-right{
- display: flex;
- justify-content: center;
- .right-img{
- width: 36rpx;
- height: 36rpx;
- margin-right: 6rpx;
- }
- .right-text{
- font-size:26rpx ;
- }
- }
- }
- .user-signature{
- font-size: 32rpx;
- }
- .user-tag{
- display: flex;
- flex-wrap: wrap;
- margin-bottom: 62rpx;
- .tag-item{
- margin-top: 26rpx;
- margin-right: 20rpx;
- border-radius: 200rpx;
- background: rgba(255,255,255,0.4);
- display: flex;
- justify-content: center;
- padding: 6rpx 12rpx;
- .tag-img{
- width: 32rpx;
- height: 32rpx;
- margin-right: 8rpx;
- }
- .tag-text{
- font-size: 28rpx;
- height: 32rpx;
- line-height: 32rpx;
- }
- }
- }
- .user-wire{
- height: 2rpx;
- border-radius: 200rpx;
- opacity: 0.2;
- background-color: #4D4C4C;
- }
- .gift-box{
- margin-top: 64rpx;
- .gift-title{
- height: 56rpx;
- display: flex;
- justify-content: space-between;
- .gift-title-left{
- font-size: 40rpx;
- line-height: 56rpx;
- height: 56rpx;
- color: rgba(255,255,255,0.4);
- }
- .gift-title-right{
- display: flex;
- justify-content: center;
- .gift-right-text{
- font-size: 24rpx;
- margin-right: 8rpx;
- }
- .gift-right-img{
- margin-top: 4rpx;
- height: 24rpx;
- width: 24rpx;
- }
- }
- }
- .gift-list{
- margin-top: 32rpx;
- display: flex;
- justify-content: flex-start;
- overflow-y: scroll;
- .gift-item{
- border-radius: 16rpx;
- background: #3D3D3D;
- width: 198rpx;
- height: 232rpx;
- margin-right: 14rpx;
- .gift-but{
- margin-left: 43rpx;
- width: 112rpx;
- height: 44rpx;
- line-height: 44rpx;
- font-size:28rpx ;
- border-radius: 200rpx;
- text-align: center;
- }
- .gift-num{
- text-align: center;
- font-size: 20rpx;
- height: 28rpx;
- line-height: 28rpx;
- text:first-child{
- font-size: 16rpx;
- }
- text:last-child{
- font-size: 30rpx;
- }
- }
- .gift-item-img{
- margin: 32rpx 49rpx 28rpx 49rpx;
- width: 100rpx;
- height: 100rpx;
- }
- .gift-item-img-gray{
- filter: grayscale(100%);
- }
- }
- .gift-item:last-child{
- margin-right: 0;
- }
- }
- }
- .dynamic-list{
- margin-top: 44rpx;
- }
- }
- </style>
|