| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369 |
- <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">108喜欢</view>
- </view>
- </view>
- <view class="user-signature sys-color-white sys-weight-400">崇尚自由,热爱生活,足以!</view>
- <view class="user-tag">
- <view class="tag-item" v-for="i in 5">
- <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">认识朋友</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">
- <view class="dynamic-item" v-for="(item,itemIndex) in list">
- <view class="dynamic-title">
- <view class="dynamic-title-left">
- <text class="dynamic-title-text sys-color-white sys-weight-400">12</text>
- <text class="dynamic-title-text sys-color-white sys-weight-400">04月</text>
- <text class="dynamic-title-text sys-color-white sys-weight-400">2020年</text>
- </view>
- <view class="dynamic-title-right">
- <image class="dynamic-right-img" mode="aspectFill" src="/static/img/index/dynamic-all.png" ></image>
- </view>
- </view>
- <view class="dynamic-data">
- <view class="data-text">
- <text class="text-item sys-color-white ">{{item.text}}</text>
- </view>
- <view class="data-img" v-if="item.img.length>0">
- <view class="one-img" v-if="item.img.length===1">
- <img-one :file-list="item.img"></img-one>
- </view>
- <view class="two-img" v-else-if="item.img.length===2 || item.img.length===4">
- <img-two :file-list="item.img"></img-two>
- </view>
- <view class="three-img" v-else>
- <img-three :file-list="item.img"></img-three>
- </view>
- </view>
- <view class="data-tag-list" >
- <view class="data-tag" v-for="tag in item.tag">
- <image class="data-tag-img" mode="aspectFill" :src="tag.icon" ></image>
- <view class="data-tag-text sys-color-black-2 sys-weight-400">{{tag.text}}</view>
- </view>
- </view>
- <view class="data-operation">
- <view class="operation-item" @click="setLike(itemIndex)">
- <image class="operation-img" mode="aspectFill" :src="'/static/img/index/like-'+(item.isLike?'ok':'no')+'.png'" ></image>
- <view class="operation-text sys-color-white sys-weight-400">{{item.likeNum>0?item.likeNum:'点赞'}}</view>
- </view>
- <view class="operation-item">
- <image class="operation-img" mode="aspectFill" src="/static/img/index/evaluate.png" ></image>
- <view class="operation-text sys-color-white sys-weight-400">{{item.evaluateNum>0?item.evaluateNum:'评论'}}</view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import ImgOne from "@/pages/index/model/img-one";
- import ImgTwo from "@/pages/index/model/img-two";
- import ImgThree from "@/pages/index/model/img-three";
- export default {
- name: "user-content",
- components: {ImgThree, ImgTwo, ImgOne},
- props: {},
- 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'},
- ],
- list:[
- {'text':'我是阳光大男孩我','img':['/static/img/temporary/1.png'],'tag':[{'text':'南亭新都会商场','icon':'/static/img/index/address.png'},{'text':'你好认识一哈','icon':'/static/img/index/know.png'}],'likeNum':1,'evaluateNum':0,'isLike':true},
- {'text':'我是阳光大男孩我','img':['/static/img/temporary/1.png','/static/img/temporary/2.png','/static/img/temporary/3.png','/static/img/temporary/2.png'],'tag':[{'text':'南亭新都会商场','icon':'/static/img/index/address.png'},{'text':'你好认识一哈','icon':'/static/img/index/know.png'}],'likeNum':0,'evaluateNum':20,'isLike':false},
- {'text':'我是阳光大男孩我','img':[
- '/static/img/temporary/1.png',
- '/static/img/temporary/3.png',
- '/static/img/temporary/2.png',
- '/static/img/temporary/1.png',
- '/static/img/temporary/3.png',
- '/static/img/temporary/2.png',
- ],'tag':[{'text':'南亭新都会商场','icon':'/static/img/index/address.png'},{'text':'你好认识一哈','icon':'/static/img/index/know.png'}],'likeNum':10,'evaluateNum':20,'isLike':true},
- ]
- }
- },
- watch: {},
- mounted() {
- },
- methods: {
- stopTouche(){
- // console.log('滑动事件阻止触发')
- return false
- },
- setLike(index){
- this.list[index].isLike=!this.list[index].isLike
- if(this.list[index].isLike){
- ++this.list[index].likeNum
- }else {
- --this.list[index].likeNum
- }
- }
- }
- }
- </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;
- .dynamic-item{
- margin-top: 16rpx;
- .dynamic-title{
- display: flex;
- justify-content: space-between;
- .dynamic-title-left{
- display:table-cell;
- vertical-align:bottom;
- .dynamic-title-text{
- font-size: 28rpx;
- }
- .dynamic-title-text:first-child{
- font-size: 48rpx;
- margin-right: 12rpx;
- }
- }
- .dynamic-title-right{
- .dynamic-right-img{
- width: 6rpx;
- height: 26rpx;
- }
- }
- }
- .dynamic-data{
- margin-left: 26rpx;
- border-left: 1rpx solid rgba(255,255,255,0.2);
- padding: 4rpx 0 44rpx 40rpx;
- .data-text{
- .text-item{
- font-size: 28rpx;
- }
- }
- .data-img{
- margin-top: 30rpx;
- }
- .data-tag-list{
- margin-top: 28rpx;
- display: flex;
- flex-wrap: wrap;
- .data-tag{
- margin-top: 26rpx;
- margin-right: 20rpx;
- border-radius: 200rpx;
- background: rgba(255,255,255,0.4);
- display: flex;
- justify-content: center;
- padding: 4rpx 12rpx;
- .data-tag-img{
- width: 32rpx;
- height: 32rpx;
- margin-right: 8rpx;
- }
- .data-tag-text{
- font-size: 24rpx;
- height: 32rpx;
- line-height: 32rpx;
- }
- }
- }
- .data-operation{
- margin-top: 40rpx;
- display: flex;
- justify-content: flex-start;
- .operation-item{
- width: 200rpx;
- display: flex;
- justify-content: flex-start;
- .operation-img{
- width: 40rpx;
- height: 40rpx;
- margin-right: 8rpx;
- }
- .operation-text{
- height: 40rpx;
- line-height: 41rpx;
- font-size: 26rpx;
- }
- }
- }
- }
- }
- }
- }
- </style>
|