123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439 |
- <template>
- <view class="my-box">
- <my-nav @navHeight="setNavHeight"></my-nav>
- <view class="my-data" :style="{'height':'calc(100vh - '+navHeight+'rpx)'}">
- <scroll-view :scroll-y="true" :style="{'height':'calc(100vh - '+navHeight+'rpx)'}" @scrolltolower="scrolltolower">
- <view class="my-item">
- <view class="my-content">
- <view class="content-basic">
- <view class="basic-left" @click="goToUrl(1)">
- <image class="basic-img" :src="memberInfo.avatar" mode="aspectFill"></image>
- </view>
- <view class="basic-right">
- <view @click="goToUrl(1)" class="basic-name">
- <view class="name-text sys-color-black-0 sys-weight-600">{{memberInfo.nickname}}</view>
- <view class="name-vip" v-show="memberInfo.vipLevel" >
- <image class="name-img" v-if="memberInfo.vipLevel==='VIP1'" src="/static/img/my/vip.png" mode="heightFix"></image>
- <image class="name-img" v-else src="/static/img/my/svip.png" mode="heightFix"></image>
- </view>
- <view class="name-ok " :class="{'name-no':memberInfo.verified===false}">
- <image class="name-img" src="/static/img/my/open.png" mode="heightFix"></image>
- </view>
- </view>
- <view @click="goToUrl(1)" class="basic-signature sys-color-gray-9">
- {{memberInfo.slogan}}
- </view>
- <view class="basic-wallet">
- <view class="wallet-item" @click="goToUrl(2)">
- <image class="wallet-img" src="/static/img/my/wallet.png" mode="aspectFill"></image>
- <view class="wallet-text sys-color-gray-6">钱包</view>
- </view>
- <view class="wallet-item" @click="goToUrl(3)">
- <view class="wallet-text sys-color-gray-6">波点兑换</view>
- <image class="exchange-img" src="/static/img/my/right.png" mode="aspectFill"></image>
- </view>
- </view>
- </view>
- </view>
- <view class="content-statistics">
- <view class="statistics-item" @click="goToUrl(4)" v-if="false">
- <view class="statistics-num sys-color-black sys-weight-600">{{memberInfo.mylikeCount}}
- <view class="statistics-dot sys-color-white" v-show="memberInfo.newMylikeCount>0">{{memberInfo.newMylikeCount>99?'..':memberInfo.newMylikeCount}}</view>
- </view>
- <view class="statistics-text sys-color-gray-9 sys-weight-400">礼物墙</view>
- </view>
- <view class="statistics-item" @click="goToUrl(5)">
- <view class="statistics-num sys-color-black sys-weight-600">{{memberInfo.mylikeCount}}
- <view class="statistics-dot sys-color-white" v-show="memberInfo.newMylikeCount>0">{{memberInfo.newMylikeCount>99?'..':memberInfo.newMylikeCount}}</view>
- </view>
- <view class="statistics-text sys-color-gray-9 sys-weight-400">心动足迹</view>
- </view>
- <view class="statistics-item" @click="goToUrl(6)">
- <view class="statistics-num sys-color-black sys-weight-600">{{memberInfo.guestCount}}
- <view class="statistics-dot sys-color-white" v-show="memberInfo.newGuestCount>0">{{memberInfo.newGuestCount>99?'..':memberInfo.newGuestCount}}</view>
- </view>
- <view class="statistics-text sys-color-gray-9 sys-weight-400">访客</view>
- </view>
- <view class="statistics-item" @click="goToUrl(7)">
- <view class="statistics-num sys-color-black sys-weight-600">
- {{memberInfo.admireCount}}
- <view class="statistics-dot sys-color-white" v-show="memberInfo.newAdmireCount>0">{{memberInfo.newAdmireCount>99?'..':memberInfo.newAdmireCount}}</view>
- </view>
- <view class="statistics-text sys-color-gray-9 sys-weight-400">谁喜欢我</view>
- </view>
- </view>
- </view>
- <view class="vip-content">
- <view class="vip-data">
- <view class="vip-left">
- <view class="vip-left-one">
- <image class="vip-left-img" src="/static/img/my/crown.png" mode="aspectFill"></image>
- <view class="vip-left-vip sys-weight-600">VIP</view>
- <view class="vip-left-text sys-weight-500">首季195元</view>
- </view>
- <view class="vip-left-two">
- 22.7元/月解锁9项高级特权
- </view>
- </view>
- <view class="vip-right">
- 立即开通
- </view>
- </view>
- <view class="vip-discounts sys-color-white sys-weight-600">
- 立减99元
- </view>
- </view>
- <view class="subscription sys-color-gray-9">
- 自动订阅,随时取消;付款费用将记入itunes账户;到期前24小时会自动扣费并续订
- 服务,购买后可随时前往iTunse商店设置页面取消订 阅。点击购买即表示同意《用
- 户服务协议》《连续包月协议》 《用户隐私政策》
- </view>
- <view class="my-tag">
- <view class="tag-item" @click="setTagNum(0)" :class="{'tag-pitch':tagNum===0}">动态</view>
- <view class="tag-item" @click="setTagNum(1)" :class="{'tag-pitch':tagNum===1}">赞过</view>
- <!-- <view class="tag-item" @click="setTagNum(2)" :class="{'tag-pitch':tagNum===2}">活动</view>-->
- </view>
- </view>
- <view class="halving-line"></view>
- <view class="my-item">
- <view class="my-dynamic" v-if="tagNum===0">
- <dynamic-items :type="2" text-color="#141414" operate-color="#999999" tag-color="#999999" tag-bg="#F2F2F2" division-color="#F2F2F2" :show-add="true" ref="dynamicObj"></dynamic-items>
- </view>
- <view class="my-praise" v-else>
- <my-praise ref="praiseObj"></my-praise>
- </view>
- </view>
- </scroll-view>
- </view>
- </view>
- </template>
- <script>
- import MyNav from "@/pages/my/model/my-nav";
- import DynamicItems from "@/pages/common/dynamic/dynamic-items";
- import MyPraise from "@/pages/my/model/my-praise";
- import {getMemberInfo} from "@/api/my";
- export default {
- components: {MyPraise, DynamicItems, MyNav},
- data() {
- return {
- navHeight:0,
- tagNum:0,
- memberInfo:{
- admireCount:'',
- nickname:'',
- }
- }
- },
- onLoad(query) {
- this.getMemberInfo()
- },
- methods: {
- scrolltolower(){
- if(this.tagNum===0){
- this.$refs.dynamicObj.getMyMoments()
- }else {
- this.$refs.praiseObj.getMyLikeMoments()
- }
- },
- getMemberInfo(){
- getMemberInfo().then((res)=>{
- console.log(res)
- if(res.code===0){
- this.memberInfo=res.data
- }else {
- uni.reLaunch({
- 'url':'/pages/login/index'
- })
- }
- })
- },
- setNavHeight(navHeight){
- this.navHeight=navHeight
- },
- setTagNum(tagNum){
- if(this.tagNum!==tagNum){
- this.tagNum=tagNum
- }
- },
- goToUrl(type){
- if(type===1){
- uni.navigateTo({
- 'url':'./editInformation'
- })
- }else if(type === 2){
- // 钱包
- uni.navigateTo({
- 'url':'/pages/wallet/wallet'
- })
- }else if(type === 3){
- // 波点兑换
- uni.navigateTo({
- 'url':'/pages/wallet/wave-point'
- })
- }else if(type === 4){
- // 礼物墙
- uni.navigateTo({
- 'url':'/pages/wallet/gift-wall'
- })
- }else if(type === 5){
- // 喜欢的人
- uni.navigateTo({
- 'url':'/pages/wallet/like-user?isUrlType=1'
- })
- }else if(type === 6){
- // 喜欢的人
- uni.navigateTo({
- 'url':'/pages/wallet/visitor'
- })
- }else if(type === 7){
- // 喜欢我的人
- uni.navigateTo({
- 'url':'/pages/wallet/like-me'
- })
- }
- }
- }
- }
- </script>
- <style scoped lang="scss">
- .my-box{
- background-image: url("/static/img/my/bg.png");
- background-repeat: no-repeat;//不平铺
- background-position: top center;//居中
- background-size: contain;//随容器大小
- height: calc(100vh - 50px - env(safe-area-inset-bottom));
- .my-data{
- background-color: #fff;
- border-radius: 30rpx 30rpx 0 0;
- padding: 40rpx 0 10rpx 0;
- .my-item{
- padding: 0 32rpx ;
- }
- .halving-line{
- background-color: #F2F2F2;
- height: 1rpx;
- }
- .my-content{
- .content-basic{
- display: flex;
- justify-content: space-between;
- height: 168rpx;
- .basic-left{
- .basic-img{
- border-radius: 50%;
- width: 168rpx;
- height: 168rpx;
- }
- }
- .basic-right{
- width: calc(100% - 168rpx);
- padding-left: 24rpx;
- .basic-name{
- display: flex;
- justify-content: flex-start;
- height: 56rpx;
- align-items: center;
- .name-text{
- font-size: 40rpx;
- line-height: 56rpx;
- }
- .name-img{
- height: 28rpx;
- }
- .name-vip{
- margin-left: 8rpx;
- }
- .name-ok{
- margin-left: 8rpx;
- }
- .name-no{
- filter: grayscale(100%);
- }
- }
- .basic-signature{
- width: 100%;
- display: -webkit-box;
- -webkit-line-clamp: 1;
- -webkit-box-orient: vertical;
- overflow: hidden;
- font-size: 28rpx;
- height: 40rpx;
- line-height: 40rpx;
- }
- .basic-wallet{
- display: flex;
- justify-content: flex-start;
- margin-top: 24rpx;
- .wallet-item{
- padding: 0 16rpx;
- height: 40rpx;
- background: #F2F2F2;
- border-radius: 200rpx;
- display: flex;
- justify-content: center;
- align-items: center;
- margin-right: 20rpx;
- .wallet-text{
- height: 40rpx;
- line-height: 40rpx;
- font-size: 26rpx;
- }
- .wallet-img{
- width: 40rpx;
- height: 40rpx;
- margin-right: 4rpx;
- }
- .exchange-img{
- width: 24rpx;
- height: 24rpx;
- margin-left: 4rpx;
- }
- }
- }
- }
- }
- .content-statistics{
- margin-top: 24rpx;
- padding: 16rpx 40rpx 0 40rpx;
- display: flex;
- justify-content: space-between;
- .statistics-item{
- .statistics-num{
- position: relative;
- display: flex;
- justify-content: center;
- font-size: 40rpx;
- .statistics-dot{
- position: absolute;
- top: -16rpx;
- right: -12rpx;
- border-radius: 200rpx;
- width: 24rpx;
- height: 24rpx;
- line-height: 24rpx;
- text-align: center;
- font-size: 18rpx;
- background-color: #ED301D;
- }
- }
- .statistics-text{
- margin-top: 8rpx;
- font-size: 26rpx;
- }
- }
- }
- }
- .vip-content{
- margin-top: 66rpx;
- border-radius: 20rpx;
- background: linear-gradient(137deg, #FED18E 0%, #FFDFA4 100%);
- //height: 118rpx;
- padding: 34rpx 30rpx 40rpx 28rpx;
- position: relative;
- .vip-data{
- display: flex;
- justify-content: space-between;
- align-items: center;
- .vip-left{
- .vip-left-one{
- display: flex;
- justify-content: flex-start;
- align-items: center;
- height: 64rpx;
- .vip-left-img{
- width: 64rpx;
- height: 64rpx;
- margin-right: 10rpx;
- }
- .vip-left-vip{
- font-size: 44rpx;
- background: linear-gradient(355deg, #6A4420 0%, #94673D 100%);
- -webkit-text-fill-color: transparent;
- -webkit-background-clip: text;
- margin-right: 12rpx;
- height: 64rpx;
- line-height: 64rpx;
- }
- .vip-left-text{
- font-size: 36rpx;
- height: 64rpx;
- line-height: 64rpx;
- color: #6A4420;
- }
- }
- .vip-left-two{
- margin-top: 10rpx;
- height: 44rpx;
- line-height: 44rpx;
- font-size: 28rpx;
- color: #925C29;
- font-weight: 400;
- }
- }
- .vip-right{
- border-radius: 200rpx;
- padding: 10rpx 24rpx;
- background: #6A4420;
- height: 40rpx;
- line-height: 40rpx;
- font-size: 28rpx;
- font-weight: 600;
- color: #FFDDA1;
- }
- }
- .vip-discounts{
- background: linear-gradient(270deg, #FE2315 0%, #FE6915 100%);
- border-radius: 0 20rpx 0 20rpx;
- height: 40rpx;
- line-height: 40rpx;
- padding: 0 16rpx;
- font-size: 24rpx;
- position:absolute;
- top: 0;
- right: 0;
- }
- }
- .subscription{
- margin-top: 36rpx;
- font-size: 18rpx;
- }
- .my-tag{
- margin-top: 36rpx;
- padding-bottom: 30rpx;
- display: flex;
- justify-content: space-around;
- .tag-item{
- height: 44rpx;
- line-height: 44rpx;
- font-size: 32rpx;
- color: #999;
- font-weight: 500;
- transition: .5s ease;
- }
- .tag-pitch{
- color: #141414;
- font-weight: 600;
- transition: .5s ease;
- }
- }
- }
- }
- </style>
|