<template>
|
<view class="index-vip o-h" v-if="!loadding" :data-theme='theme()' :class="theme() || ''">
|
<!-- #ifdef MP-WEIXIN || APP-PLUS -->
|
<view class="ww100" :style="'height:'+topBarTop()+'px;'"></view>
|
<view class="tc head_top" :style="topBarHeight() == 0 ? '': 'height:'+topBarHeight()+'px;'">
|
<view class="reg180" @click="goback"><text class="icon iconfont icon-jiantou"></text></view>
|
<view class="fb">{{titel}}</view>
|
</view>
|
<!-- #endif -->
|
<!--头部图片-->
|
<view class="banner d-c-c d-c">
|
<image :src="top_background" mode="aspectFill"></image>
|
</view>
|
|
<!--是VIP用户-->
|
<template v-if="is_vip && isData">
|
<!--金额信息-->
|
<view class="vip-wrap pr m-0-20" style="margin-top: 300rpx;">
|
<view class="d-b-c border-b pb30 f28 lh150 user-info">
|
<view class="d-b-c" style="max-width: 70%;">
|
<view class="photo">
|
<image :src="user.avatarUrl" mode="aspectFill"></image>
|
</view>
|
<view class="user-name">
|
<view class="gray3 f32">{{ user.nickName }}</view>
|
<view class="mt10">
|
<text class="gray3 f28">{{ info_words.index.words.referee.value }}:</text>
|
<text class="f28 gray3">{{ vip.referee ? vip.referee.nickName : '平台' }}</text>
|
</view>
|
</view>
|
</view>
|
<view>
|
<text class="gray3 f28 grade">{{ vip.grade.name }}</text>
|
</view>
|
</view>
|
<view class="d-s-c p-30-0 top_dash">
|
<view class="flex-1 d-c-c d-c">
|
<view class="redF6">
|
<text class="f24">¥</text>
|
<text class="f40">{{ vip.money }}</text>
|
</view>
|
<view class="pt20 f26 gray3">{{ info_words.index.words.money.value }}</view>
|
</view>
|
<view class="flex-1 d-c-c d-c">
|
<view class="">
|
<text class="f24">¥</text>
|
<text class="f40">{{ vip.freeze_money }}</text>
|
</view>
|
<view class="pt20 f28 gray3">{{ info_words.index.words.freeze_money.value }}</view>
|
</view>
|
<view class="flex-1 d-c-c d-c">
|
<view class="">
|
<text class="f24">¥</text>
|
<text class="f40">{{ vip.total_money }}</text>
|
</view>
|
<view class="pt20 f28 gray3">{{ info_words.index.words.total_money.value }}</view>
|
</view>
|
</view>
|
<view class="d-c-c pt30">
|
<button type="primary" class="btn-gcred theme-btn flex-1" @click="gotoCash">{{ info_words.index.words.cash.value }}</button>
|
</view>
|
</view>
|
<!--图标入口-->
|
<view class="vip-wrap m-0-20 p30 d-s-c f-w mt20 bg-white">
|
<view class="d-c-c d-c flex-1" @click="gotoPage('/pages/plus/vip/cash/list')">
|
<view>
|
<image class="vip_index_img" src="../../../static/icon/icon-zijinmingxi.png" mode=""></image>
|
</view>
|
<text class="pt10 f26 mt20">{{ info_words.cash_list.title.value }}</text>
|
</view>
|
<view class="d-c-c d-c flex-1" @click="gotoPage('/pages/plus/vip/order')">
|
<view>
|
<image class="vip_index_img" src="../../../static/icon/icon-fenxiaodingdan.png" mode=""></image>
|
</view>
|
<text class="pt10 f26 mt20">{{ info_words.order.title.value }}</text>
|
</view>
|
<view class="d-c-c d-c flex-1" @click="gotoPage('/pages/agent/team/team')">
|
<view>
|
<image class="vip_index_img" src="../../../static/icon/icon-tuandui.png" mode=""></image>
|
</view>
|
<text class="pt10 f26 mt20">{{ info_words.team.title.value }}</text>
|
</view>
|
<view class="d-c-c d-c flex-1" @click="gotoPage('/pages/plus/vip/qrcode')">
|
<view>
|
<image class="vip_index_img" src="../../../static/icon/icon-erweima.png" mode=""></image>
|
</view>
|
<text class="pt10 f26 mt20">{{ info_words.qrcode.title.value }}</text>
|
</view>
|
</view>
|
</template>
|
<!--不是VIP用户-->
|
<template v-if="!is_vip && isData">
|
<view class="no-vip">
|
<view class="mt50 p-0-20 pt30 red f34 tc">{{ info_words.index.words.vip_user.value }}</view>
|
<view class="p30 f28">
|
{{ info_words.index.words.not_vip.value }}
|
</view>
|
<view class="p30 mt30">
|
<button type="primary" class="btn-gcred" @click="applyVip">{{ info_words.index.words.apply_now.value }}</button>
|
</view>
|
</view>
|
</template>
|
</view>
|
</template>
|
|
<script>
|
export default {
|
data() {
|
return {
|
/*是否加载完成*/
|
loadding: true,
|
indicatorDots: true,
|
autoplay: true,
|
interval: 2000,
|
duration: 500,
|
/*是否为VIP用户*/
|
is_vip: false,
|
isData: false,
|
vip: {},
|
/*顶部背景*/
|
top_background: '',
|
/*基本信息*/
|
info_words: {},
|
words: {},
|
user: {},
|
titel: '',
|
vip_url:'',
|
has_apply: false // 是否已申请
|
};
|
},
|
onLoad(e) {
|
if (e.is_vip) {
|
this.is_vip = e.is_vip;
|
}
|
},
|
onShow() {
|
uni.showLoading({
|
title: '加载中'
|
});
|
/*获取个人中心数据*/
|
this.getData();
|
},
|
methods: {
|
/*获取数据*/
|
getData() {
|
let self = this;
|
self._get('plus.vip.user/center', {}, function(data) {
|
self.info_words = data.data.words;
|
uni.setNavigationBarTitle({
|
title: self.info_words.index.title.value != '' ? self.info_words.index.title.value : self.info_words.index.title
|
.default
|
});
|
self.titel = data.data.words.index.title.value
|
self.is_vip = data.data.is_vip;
|
self.top_background = data.data.background;
|
self.vip = data.data.vip;
|
self.user = data.data.user;
|
self.vip_url = data.data.vip_url;
|
self.isData = true;
|
self.loadding = false;
|
uni.hideLoading();
|
|
// 检查是否已申请
|
self.checkHasApply();
|
});
|
},
|
|
// 检查是否已申请
|
checkHasApply() {
|
let self = this;
|
self._get('plus.vip.apply/checkApply', {}, function(data) {
|
self.has_apply = data.data.has_apply;
|
});
|
},
|
|
/*申请成为VIP*/
|
applyVip() {
|
let vip_url=this.vip_url?this.vip_url:'/pages/plus/vip/apply'
|
this.gotoPage(vip_url);
|
},
|
|
/*查看申请状态*/
|
checkApplyStatus() {
|
this.gotoPage('/pages/plus/vip/apply-status');
|
},
|
|
/*去商城逛逛*/
|
gotoShop() {
|
this.gotoPage('/pages/index/index')
|
},
|
|
/*去提现*/
|
gotoCash() {
|
this.gotoPage('/pages/plus/vip/cash/apply');
|
},
|
|
goback() {
|
uni.navigateBack();
|
},
|
}
|
};
|
</script>
|
|
<style lang="scss">
|
page {
|
background-color: #f9f9f9;
|
}
|
|
.index-vip .banner {
|
position: absolute;
|
width: 750rpx;
|
height: 348rpx;
|
z-index: 0;
|
min-height: 167rpx;
|
background-repeat: no-repeat;
|
background-size: 100%;
|
}
|
|
.index-vip .banner image {
|
width: 100%;
|
}
|
|
.no-vip {
|
margin-top: 290rpx;
|
position: relative;
|
background: #fff;
|
border-radius: 20rpx;
|
margin-left: 20rpx;
|
margin-right: 20rpx;
|
padding-bottom: 40rpx;
|
}
|
|
.vip-wrap {
|
background: #FFFFFF;
|
background-size: 100% 100%;
|
padding: 31rpx 25rpx 36rpx 25rpx;
|
box-shadow: 0px 8rpx 3rpx 0px rgba(6,0,1,0.03);
|
border-radius: 20rpx;
|
}
|
|
.index-vip .vip-wrap .iconfont {
|
font-size: 60rpx;
|
}
|
|
.index-vip .btn-gcred {
|
height: 88rpx;
|
line-height: 88rpx;
|
border-radius: 44rpx;
|
background: #FF5649;
|
border-color: #FF5649;
|
}
|
|
.index-vip .btn-gray {
|
height: 88rpx;
|
line-height: 88rpx;
|
border-radius: 44rpx;
|
background: #999;
|
border-color: #999;
|
}
|
|
.reg180 {
|
padding-right: 20rpx;
|
text-align: right;
|
transform: rotateY(180deg);
|
position: absolute;
|
bottom: 0;
|
}
|
|
.icon-jiantou {
|
color: #FFFFFF;
|
font-size: 30rpx;
|
}
|
|
.head_top {
|
position: absolute;
|
width: 100%;
|
padding-top: var(--status-bar-height);
|
height: 30px;
|
line-height: 30px;
|
color: #FFFFFF;
|
font-size: 32rpx;
|
z-index: 2;
|
}
|
|
.top_dash {
|
border-bottom: 1rpx dashed #D9D9D9;
|
padding-bottom: 9px;
|
}
|
|
.vip_index_img {
|
width: 78rpx;
|
height: 78rpx;
|
}
|
|
.user-info .photo,
|
.user-info .photo image {
|
width: 100rpx;
|
height: 100rpx;
|
border-radius: 50%;
|
}
|
|
.user-info .photo {
|
padding-right: 20rpx;
|
}
|
|
.grade {
|
background: #FFC519;
|
color: #fff;
|
padding: 5rpx 15rpx;
|
border-radius: 20rpx;
|
}
|
</style>
|