连云港陪玩陪聊
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
chunwan/pages/users/center/index.vue

479 lines
12 KiB

3 months ago
<template>
<view class="task">
<view class="task-navbar">
2 months ago
<u-navbar title="会员中心" back-icon-color="#333333" title-color="#333333" :background="background"></u-navbar>
3 months ago
</view>
<view class="task-content">
<view class="info">
<view class="a">
<view class="fl">
<view class="pic">
2 months ago
<image :src="userInfo.faceImage?userInfo.faceImage:userInfo.img"></image>
3 months ago
</view>
<view class="xinxi">
2 months ago
<view class="name">{{userInfo.realname}}<text v-if="userInfo.memberflag >=1">LV.{{userInfo.memberflag}}</text></view>
<view class="status" v-if="userInfo.memberflag==0">您还不是会员</view>
<view class="status" v-else>{{userInfo.memberEndTime}}到期</view>
3 months ago
</view>
</view>
<image class="king" src="@/static/user-king.png"></image>
</view>
2 months ago
<view class="b" v-if="userInfo.memberflag==0">开通会员尊享酷炫好玩会员特权</view>
3 months ago
</view>
2 months ago
<view class="title" v-if="userInfo.memberflag>=1">您的特权</view>
<view class="content" v-if="userInfo.memberflag>=1">
3 months ago
<view class="item">
<view class="a"><view class="btn">特权1</view><view class="txt">会员专属标识</view></view>
<view class="b">
<image src="@/static/icon-svip.png"></image>
</view>
</view>
<view class="item">
<view class="a"><view class="btn">特权2</view><view class="txt">支持查看访客信息</view></view>
<view class="b">
<image src="@/static/icon-svip.png"></image>
</view>
</view>
<view class="item">
<view class="a"><view class="btn">特权3</view><view class="txt">文字语音视频聊天8折</view></view>
<view class="b">
<image src="@/static/icon-svip.png"></image>
</view>
</view>
<view class="item">
<view class="a"><view class="btn">特权4</view><view class="txt">每天可领10金币可累计领取1000金币</view></view>
<view class="b">
<image src="@/static/icon-svip.png"></image>
</view>
</view>
<view class="item">
<view class="a"><view class="btn">特权5</view><view class="txt">每天免费10条信息2分钟语音2分钟视频聊天</view></view>
<view class="b">
<image src="@/static/icon-svip.png"></image>
</view>
</view>
</view>
2 months ago
<view class="title">{{userInfo.memberflag==0?'开通会员':'续费会员'}}</view>
3 months ago
<scroll-view scroll-x class="kaitong">
2 months ago
<view class="item" v-for="(a,i) in list" :class="tabIndex == i?'item-on':''" @click="tabItem(i)">
<view class="a">{{a.cycle}}{{a.danwei}}</view>
<view class="b"><text>{{a.presentPrice}}</text></view>
<view class="c">{{a.discount}}</view>
<view class="d">原价{{a.presentPrice}}</view>
<view class="e">{{a.name}}</view>
3 months ago
</view>
</scroll-view>
<view class="title">会员特权</view>
<view class="content">
<view class="item">
2 months ago
<view class="a"><view class="btn">特权1</view><view class="txt">文字语音视频聊天折扣{{list[tabIndex].wordVoiceDiscount}}</view></view>
3 months ago
<view class="b">
<image src="@/static/icon-svip.png"></image>
</view>
</view>
<view class="item">
2 months ago
<view class="a"><view class="btn">特权2</view><view class="txt">每天可领金币{{list[tabIndex].receiveCoins}}</view></view>
3 months ago
<view class="b">
<image src="@/static/icon-svip.png"></image>
</view>
</view>
<view class="item">
2 months ago
<view class="a"><view class="btn">特权3</view><view class="txt">可累积领取金币{{list[tabIndex].totalReceiveCoins}}</view></view>
3 months ago
<view class="b">
<image src="@/static/icon-svip.png"></image>
</view>
</view>
<view class="item">
2 months ago
<view class="a"><view class="btn">特权3</view><view class="txt">每天免费信息数量{{list[tabIndex].freeMsg}}</view></view>
3 months ago
<view class="b">
<image src="@/static/icon-svip.png"></image>
</view>
</view>
<view class="item">
2 months ago
<view class="a"><view class="btn">特权4</view><view class="txt">每天免费信息数量{{list[tabIndex].freeVoice}}分钟</view></view>
3 months ago
<view class="b">
<image src="@/static/icon-svip.png"></image>
</view>
</view>
</view>
<view class="title">支付方式</view>
<view class="pay">
2 months ago
<view class="item" :class="payIndex == 1?'item-on':''" @click="tabPay(1)">
3 months ago
<view class="a"><image src="@/static/wxpay.png"></image>微信支付</view>
<view class="b">
<image class="img1" src="@/static/icon-check.png"></image>
<image class="img2" src="@/static/icon-check-on.png"></image>
</view>
</view>
2 months ago
<view class="item" :class="payIndex == 2?'item-on':''" @click="tabPay(2)">
3 months ago
<view class="a"><image src="@/static/zfb.png"></image>支付宝支付</view>
<view class="b">
<image class="img1" src="@/static/icon-check.png"></image>
<image class="img2" src="@/static/icon-check-on.png"></image>
</view>
</view>
</view>
<view class="agreement">
<image class="img1" @click="toggleImg()" v-if="isToggle" src="@/static/icon-check-on.png"></image>
<image class="img2" @click="toggleImg()" v-else src="@/static/icon-check.png"></image>
2 months ago
请阅读并同意<text @click="openPPage()">会员协议</text>
3 months ago
</view>
</view>
<view class="task-fd">
<view class="btn">立即支付18</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
2 months ago
list: [],
userInfo: {},
3 months ago
isToggle: false,
2 months ago
tabIndex: 0,
payIndex: 1,
3 months ago
background: {
// 导航栏背景图
background: 'url(@/static/task-bg.png) center top no-repeat',
// 还可以设置背景图size属性
backgroundSize: '100 auto',
},
};
},
2 months ago
onReady() {
this.getUserInfo();
this.getList();
},
3 months ago
methods: {
2 months ago
openPPage() {
uni.navigateTo({
url: "/pages/users/about/index?type=CONFIG_MEMBERSHIP_AGREEMENT"
})
},
3 months ago
tabItem(i){
this.tabIndex = i;
},
2 months ago
tabPay(i){
this.payIndex = i;
},
3 months ago
toggleImg() {
this.isToggle = !this.isToggle;
2 months ago
},
//查询个人信息
async getUserInfo() {
const { code, data , msg } = await this.$api.findUserInfo({userId: uni.getStorageSync("userInfo").id});
if(code == 200){
this.userInfo = data;
}else{
uni.showToast({
title: mgs,
position: "bottom",
icon: "none",
})
}
},
//会员列表
async getList() {
const {code, data } = await this.$api.memberList({});
if(code == 200){
this.list = data
}
},
3 months ago
}
}
</script>
<style scoped lang="scss">
.task{
background: url(@/static/task-bg.png) center top no-repeat;
background-size: 100% auto;
overflow: hidden;
min-height: 100vh;
3 months ago
padding-bottom: 180rpx;
3 months ago
&-fd{
background-color: #F3F4F5;
width: 100%;
padding: 30rpx 25rpx;
box-sizing: border-box;
position: fixed;
left: 0;
bottom: 0;
z-index: 22;
.btn{
width: 100%;
line-height: 98rpx;
background: linear-gradient(0deg, #000000, #3D3B38);
box-shadow: 0px 4rpx 18rpx 0px rgba(42,41,39,0.34);
border-radius: 98rpx;
text-align: center;
font-weight: 400;
font-size: 30rpx;
color: #FFFFFF;
letter-spacing: 5rpx;
}
}
&-content{
padding: 0 25rpx;
overflow: hidden;
2 months ago
margin-top: 20rpx;
3 months ago
.info{
width: 100%;
background: linear-gradient(90deg, #17150E, #373632);
border-radius: 20rpx;
padding: 40rpx 50rpx;
box-sizing: border-box;
.a{
width: 100%;
display: flex;
align-items: center;
margin-top: 10rpx;
.fl{
flex: 1;
display: flex;
align-items: center;
}
.king{
width: 135rpx;
height: 82rpx;
}
.pic{
width: 100rpx;
height: 100rpx;
margin-right: 20rpx;
image{
width: 100%;
height: 100%;
border-radius: 50%;
}
}
.xinxi{
flex: 1;
.name{
font-weight: 500;
font-size: 30rpx;
color: #E7D4B8;
3 months ago
display: flex;
align-items: center;
text{
margin-left: 20rpx;
display: block;
width: 88rpx;
height: 44rpx;
line-height: 44rpx;
background: #FED0A7;
border-radius: 20rpx 0px 20rpx 0px;
font-weight: 500;
font-size: 24rpx;
color: #693A16;
text-align: center;
}
3 months ago
}
.status{
font-weight: 500;
font-size: 24rpx;
color: #E7D4B8;
margin-top: 10rpx;
}
}
}
.b{
font-weight: 500;
font-size: 24rpx;
color: #E7D4B8;
margin-top: 30rpx;
}
}
.title{
font-weight: 500;
font-size: 32rpx;
color: #222222;
2 months ago
margin-top: 30rpx;
3 months ago
}
.agreement{
display: flex;
align-items: center;
justify-content: flex-start;
font-weight: 400;
font-size: 28rpx;
color: #999999;
margin-top: 30rpx;
image{
width: 32rpx;
height: 32rpx;
margin-right: 10rpx;
}
text{
color: #000000;
}
}
.pay{
padding: 0 30rpx;
background: #FFFFFF;
border-radius: 20rpx;
margin-top: 20rpx;
.item{
padding: 30rpx 0;
3 months ago
border-top: 1px solid #EAEAEA;
3 months ago
display: flex;
align-items: center;
justify-content: space-between;
font-weight: 400;
font-size: 28rpx;
color: #333333;
3 months ago
&:first-child{
border-top-color: #FFFFFF;
}
3 months ago
.a{
flex: 1;
display: flex;
align-items: center;
image{
width: 60rpx;
height: 60rpx;
margin-right: 10rpx;
}
}
.b{
image{
width: 32rpx;
height: 32rpx;
margin-left: 20rpx;
}
.img1{
display: block;
}
.img2{
display: none;
}
}
&-on{
.b{
.img1{
display: none;
}
.img2{
display: block;
}
}
}
}
}
.kaitong{
white-space: nowrap;
2 months ago
margin-top: 40rpx;
3 months ago
.item{
display: inline-block;
width: 220rpx;
height: 280rpx;
background: #FFFFFF;
2 months ago
border: 1px solid #FFFFFF;
3 months ago
border-radius: 20rpx;
text-align: center;
position: relative;
margin-left: 20rpx;
&:first-child{
margin-left: 0;
}
.a{
font-weight: 500;
font-size: 30rpx;
color: #666666;
margin-top: 60rpx;
}
.b{
font-weight: 500;
font-size: 24rpx;
color: #222222;
margin-top: 10rpx;
text{
font-size: 36rpx;
}
}
.c{
font-weight: 500;
font-size: 30rpx;
color: #666666;
margin-top: 10rpx;
}
.d{
font-weight: 400;
font-size: 24rpx;
color: #999999;
text-decoration-line: line-through;
margin-top: 10rpx;
}
.e{
width: 98rpx;
line-height: 50rpx;
background: linear-gradient(0deg, #000000, #3D3B38);
box-shadow: 0px 4rpx 18rpx 0px rgba(42,41,39,0.34);
border-radius: 20rpx 0px 20rpx 0px;
position: absolute;
left: 0;
top: 0;
z-index: 2;
text-align: center;
font-weight: 500;
font-size: 24rpx;
color: #F3F4F5;
}
2 months ago
&-on{
background: #EDEDED;
border: 1px solid #000000;
}
3 months ago
}
}
.content{
2 months ago
margin-top: 10rpx;
3 months ago
overflow: hidden;
.item{
width: 100%;
height: 100rpx;
background: #FFFFFF;
border-radius: 20rpx;
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 20rpx;
padding: 0 20rpx;
box-sizing: border-box;
.a{
flex: 1;
font-weight: 500;
font-size: 24rpx;
color: #222222;
display: flex;
align-items: center;
.btn{
width: 130rpx;
line-height: 50rpx;
border-radius: 50rpx;
text-align: center;
font-weight: 500;
font-size: 24rpx;
background: linear-gradient(0deg, #000000, #3D3B38);
box-shadow: 0px 4rpx 18rpx 0px rgba(42,41,39,0.34);
color: #FFFFFF;
margin-right: 20rpx;
}
.txt{
width: 420rpx;
}
}
.b{
margin-left: 40rpx;
image{
width: 64rpx;
height: 69rpx;
}
}
}
}
}
}
</style>