cyywl_server/yudao-ui-app/pages/member_equity/index.vue

421 lines
11 KiB
Vue
Raw Normal View History

2023-05-16 18:22:32 +08:00
<template>
<view class="box">
<view class="box-member">
<view class="member-left">
2023-05-22 13:29:42 +08:00
<text class="left-title">{{memberDetail.grade}}</text>
2023-05-17 15:25:16 +08:00
<view class="left-info">
2023-05-22 13:29:42 +08:00
<text>{{userInfo.mobile}}</text>
<text>会员积分{{memberDetail.integral}}</text>
2023-05-16 18:22:32 +08:00
</view>
<text>再升1级即可获得XX等6项权益</text>
2023-05-24 16:59:54 +08:00
<view class="left-button">
<view class="left-shopping" @click="handleRouter('购买记录')">
<text>购买记录</text>
<image src="../../static/images/shopping-right.png" ></image>
</view>
<view class="left-others" @click="handleRouter('为他人充值')">
为他人充值
<image src="../../static/images/others-right.png" ></image>
</view>
</view>
2023-05-16 18:22:32 +08:00
</view>
2023-05-24 16:59:54 +08:00
<view class="member-right">
2023-05-19 16:09:25 +08:00
<image src='../../static/images/vipStar.png'></image>
2023-05-22 14:29:04 +08:00
<text>会员等级{{vipData.findIndex((item) => item == memberDetail.grade) +1}}</text>
<button @click="handleRenew"></button>
2023-05-16 18:22:32 +08:00
</view>
</view>
<view class="box-equity">
2023-05-19 16:09:25 +08:00
<view class="equity-text">
2023-05-23 12:03:27 +08:00
<view >
<image src='../../static/images/memberLogo.png'></image>
<text class="equity-member">我的会员权益</text>
</view>
2023-05-16 18:22:32 +08:00
<text class="equity-look">查看权益></text>
</view>
2023-05-24 16:59:54 +08:00
<view class="equity-item" v-for="(item,index) in equityData" :key="index">
2023-05-16 18:22:32 +08:00
<view class="equity-grade">
2023-05-24 16:59:54 +08:00
<image :src='list[list.findIndex((i) => item.gear == i.name)].img'></image>
<text>办理日期{{item.startTime}}</text>
2023-05-16 18:22:32 +08:00
</view>
<view class="equity-money">
2023-05-18 18:03:06 +08:00
<view class="money-box money-completed">
2023-05-16 18:22:32 +08:00
<text>已返回金额</text>
<view>
2023-05-24 16:59:54 +08:00
<text class="money-text">{{item.totalMoney}}</text>
<text class="money-detailed" @click="handleDetailed(item.reportId)">></text>
2023-05-16 18:22:32 +08:00
</view>
</view>
2023-05-18 18:03:06 +08:00
<view class="money-box money-treat">
2023-05-24 16:59:54 +08:00
<text>带返还金额 () </text>
<text class="money-text">{{list[list.findIndex((i) => item.gear == i.name)].name-item.totalMoney}}</text>
2023-05-16 18:22:32 +08:00
</view>
2023-05-18 18:03:06 +08:00
<view class="money-box money-term">
2023-05-24 16:59:54 +08:00
<text>带返还期额</text>
<text class="money-text">{{item.frequency}}x12</text>
2023-05-16 18:22:32 +08:00
</view>
2023-05-18 18:03:06 +08:00
<view class="money-box money-time">
2023-05-24 16:59:54 +08:00
<text>返费结束时间</text>
<text class="money-text">{{item.endTime}}</text>
</view>
</view>
</view>
</view>
<u-navbar leftIcon="" title="会员申请"></u-navbar>
</view>
2023-05-16 18:22:32 +08:00
</template>
<script>
2023-05-22 13:29:42 +08:00
import {
2023-05-23 18:08:01 +08:00
memberHeadInfo,
2023-05-24 16:59:54 +08:00
memberGradeInfo,
query
2023-05-22 13:29:42 +08:00
} from '@/api/member.js';
import {
mapGetters
} from 'vuex'
2023-05-16 18:22:32 +08:00
export default {
name: "member_application",
data() {
return {
2023-05-19 16:09:25 +08:00
list: [
{
2023-05-24 16:59:54 +08:00
img:'../../static/images/member240.png',
name:'360'
2023-05-19 16:09:25 +08:00
},
{
2023-05-24 16:59:54 +08:00
img:'../../static/images/member400.png',
name:'600'
},
{
img:'../../static/images/member960.png',
name:'900'
2023-05-19 16:09:25 +08:00
},
],
2023-05-22 14:29:04 +08:00
vipData:['普通会员','中级会员','高级会员'],
2023-05-19 16:09:25 +08:00
show: false,
2023-05-24 16:59:54 +08:00
memberDetail:{},
equityData:[]
2023-05-16 18:22:32 +08:00
};
},
2023-05-22 13:29:42 +08:00
computed: mapGetters(['userInfo']),
async onLoad() {
2023-05-23 18:08:01 +08:00
const resful = await memberGradeInfo()
if(resful.data.some((item) => !!parseInt(item.isExist))){
uni.setTabBarItem({
index: 0,
pagePath: '/pages/member_equity/index'
})
}else{
uni.setTabBarItem({
index: 0,
pagePath: '/pages/member_application/index'
})
uni.switchTab({
url:'/pages/member_application/index'
})
}
2023-05-22 13:29:42 +08:00
const res = await memberHeadInfo()
this.memberDetail = res.data
2023-05-24 16:59:54 +08:00
// this.userInfo.mobile
const equity = await query(13668261228)
this.equityData = equity.data
2023-05-16 18:22:32 +08:00
},
methods: {
2023-05-24 16:59:54 +08:00
handleDetailed(reportId){
uni.navigateTo({
url:`/pages/member_detail/index?reportId=${reportId}`,
})
},
2023-05-22 14:29:04 +08:00
handleRenew(){
uni.navigateTo({
url:'/pages/member_renew/index'
})
},
2023-05-24 16:59:54 +08:00
handleRouter(value){
switch (value){
2023-05-19 16:09:25 +08:00
case "购买记录":
uni.navigateTo({
url:'/pages/member_record/index'
})
break;
case "为他人充值":
uni.navigateTo({
url:'/pages/member_others/index'
})
break;
default:
break;
}
},
2023-05-16 18:22:32 +08:00
}
};
</script>
<style lang="scss" scoped>
.box {
2023-05-22 14:29:04 +08:00
margin-bottom: 30%;
2023-05-19 16:09:25 +08:00
margin-top: 10%;
2023-05-18 18:03:06 +08:00
background: #fff;
height: 100vh;
2023-05-19 11:34:07 +08:00
background: url(../../static/images/memberBg.png);
2023-05-19 16:09:25 +08:00
background-size: cover;
background-repeat: no-repeat;
background-attachment: fixed;
2023-05-22 13:29:42 +08:00
.u-nav-slot{
::v-deep .u-popup__content{
padding-bottom: 20% !important;
}
}
2023-05-19 18:04:40 +08:00
2023-05-19 16:09:25 +08:00
2023-05-16 18:22:32 +08:00
.box-member {
2023-05-19 11:34:07 +08:00
padding: 36rpx 40rpx;
2023-05-16 18:22:32 +08:00
border-radius: 20rpx;
width: 100%;
2023-05-18 18:03:06 +08:00
// padding: 20rpx 20rpx 30rpx 20rpx;
2023-05-16 18:22:32 +08:00
display: flex;
justify-content: space-between;
2023-05-24 16:59:54 +08:00
line-height: 50rpx;
2023-05-19 16:09:25 +08:00
.member-left {
2023-05-16 18:22:32 +08:00
display: flex;
flex-direction: column;
justify-content: space-between;
2023-05-18 18:03:06 +08:00
width: 69%;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: #000000;
2023-05-19 16:09:25 +08:00
.left-title {
2023-05-18 18:03:06 +08:00
font-size: 35rpx;
font-family: PingFang SC;
font-weight: 600;
color: #000000;
}
2023-05-19 16:09:25 +08:00
.left-info {
2023-05-17 15:25:16 +08:00
display: flex;
justify-content: space-between;
}
2023-05-24 16:59:54 +08:00
.left-button{
display: flex;
justify-content: space-between;
margin-top: 10rpx;
image{
width: 24rpx;
height: 24rpx;
margin-left: 13rpx;
}
.left-shopping{
display: flex;
align-items: center;
justify-content: center;
width: 204rpx;
height: 61rpx;
background: #F8EFF0;
border: 1px solid #F783B0;
border-radius: 30rpx;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: #000000;
}
.left-others{
background-image: url("../../static/images/others-button.png");
background-size: 204rpx 61rpx;
display: flex;
align-items: center;
justify-content: center;
width: 204rpx;
height: 61rpx;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: #FFFFFF;
}
}
2023-05-16 18:22:32 +08:00
}
2023-05-19 16:09:25 +08:00
.member-right {
2023-05-16 18:22:32 +08:00
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
2023-05-18 18:03:06 +08:00
width: 22%;
font-size: 22rpx;
font-family: PingFang SC;
font-weight: 400;
color: #000000;
2023-05-19 16:09:25 +08:00
2023-05-16 18:22:32 +08:00
image {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
margin-bottom: 10rpx;
}
2023-05-18 18:03:06 +08:00
2023-05-19 16:09:25 +08:00
button {
2023-05-18 18:03:06 +08:00
margin-top: 10rpx;
padding: 7rpx 16rpx;
background: #F22E60;
border-image: linear-gradient(0deg, #A8052E, #FFFFFF) 10 10;
border-radius: 18rpx;
font-size: 22rpx;
font-family: PingFang SC;
font-weight: 400;
color: #FFFFFF;
}
2023-05-16 18:22:32 +08:00
}
}
.box-equity {
2023-05-19 11:34:07 +08:00
// border-radius: 20rpx;
2023-05-16 18:22:32 +08:00
width: 100%;
2023-05-19 11:34:07 +08:00
padding: 0 40rpx;
background: url(../../static/images/memberEquity.png);
background-size: 100%;
2023-05-19 16:09:25 +08:00
background-repeat: no-repeat;
2023-05-16 18:22:32 +08:00
display: flex;
flex-direction: column;
2023-05-19 11:34:07 +08:00
position: relative;
2023-05-19 16:09:25 +08:00
.equity-text {
margin: 5% 0;
display: flex;
align-items: center;
height: 10%;
2023-05-23 12:03:27 +08:00
view{
display: flex;
align-items: center;
justify-content: center;
width: 44%;
image{
width: 26rpx;
height: 26rpx;
}
}
2023-05-19 16:09:25 +08:00
.equity-member {
2023-05-19 11:34:07 +08:00
margin: 0 10%;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 400;
color: #FFFFFF;
2023-05-19 16:09:25 +08:00
}
2023-05-19 11:34:07 +08:00
2023-05-19 16:09:25 +08:00
.equity-look {
2023-05-19 11:34:07 +08:00
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: #FF4922;
2023-05-16 18:22:32 +08:00
}
}
2023-05-19 16:09:25 +08:00
2023-05-16 18:22:32 +08:00
.equity-item {
2023-05-18 18:03:06 +08:00
background: #fff;
2023-05-16 18:22:32 +08:00
display: flex;
flex-direction: column;
justify-content: space-between;
border-radius: 20rpx;
2023-05-19 11:34:07 +08:00
margin: 0 20rpx 20rpx 20rpx;
2023-05-19 16:09:25 +08:00
.equity-grade {
2023-05-16 18:22:32 +08:00
border-radius: 10rpx 10rpx;
padding: 20rpx;
display: flex;
justify-content: space-between;
2023-05-22 13:29:42 +08:00
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 400;
color: #000000;
image{
width: 295rpx;
height: 35rpx;
}
2023-05-16 18:22:32 +08:00
}
2023-05-19 16:09:25 +08:00
2023-05-16 18:22:32 +08:00
.equity-money {
2023-05-18 18:03:06 +08:00
display: flex;
2023-05-19 11:34:07 +08:00
justify-content: space-around;
2023-05-18 18:03:06 +08:00
flex-wrap: wrap;
2023-05-19 16:09:25 +08:00
.money-box {
2023-05-19 11:34:07 +08:00
width: 46%;
2023-05-18 18:03:06 +08:00
padding: 24rpx 25rpx;
border-radius: 10px;
display: flex;
flex-direction: column;
justify-content: space-between;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: #000000;
margin-bottom: 18rpx;
2023-05-19 16:09:25 +08:00
.money-text {
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 400;
2023-05-18 18:03:06 +08:00
}
}
2023-05-19 16:09:25 +08:00
.money-completed {
2023-05-18 18:03:06 +08:00
background: #FFF2F2;
border: 1px solid #F22E60;
2023-05-19 16:09:25 +08:00
.money-text {
2023-05-18 18:03:06 +08:00
color: #F91F57;
2023-05-19 16:09:25 +08:00
}
view {
margin-top: 26rpx;
2023-05-18 18:03:06 +08:00
display: flex;
justify-content: space-between;
align-items: center;
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 400;
color: #000000;
}
}
2023-05-19 16:09:25 +08:00
.money-treat {
2023-05-18 18:03:06 +08:00
background: #FFFDF1;
border: 1px solid #FF962F;
2023-05-19 16:09:25 +08:00
.money-text {
2023-05-18 18:03:06 +08:00
margin-top: 26rpx;
2023-05-19 16:09:25 +08:00
color: #EBAF00;
2023-05-18 18:03:06 +08:00
}
}
2023-05-19 16:09:25 +08:00
.money-term {
2023-05-18 18:03:06 +08:00
background: #F8FFF8;
border: 1px solid #38A74F;
2023-05-19 16:09:25 +08:00
.money-text {
2023-05-18 18:03:06 +08:00
margin-top: 26rpx;
2023-05-19 16:09:25 +08:00
color: #2C9E2C;
2023-05-18 18:03:06 +08:00
}
}
2023-05-19 16:09:25 +08:00
.money-time {
2023-05-18 18:03:06 +08:00
background: #F0FDFC;
border: 1px solid #5CA4E8;
2023-05-19 16:09:25 +08:00
.money-text {
2023-05-18 18:03:06 +08:00
margin-top: 26rpx;
2023-05-19 16:09:25 +08:00
color: #2D7AC9;
2023-05-18 18:03:06 +08:00
}
2023-05-16 18:22:32 +08:00
}
}
}
}
}
</style>