From 1e2cca44dd7b4cc30f60435d22bc58574f2fd4f0 Mon Sep 17 00:00:00 2001
From: xuxueyang <xuxy@fengyuntec.com>
Date: 星期四, 12 九月 2024 10:38:04 +0800
Subject: [PATCH] update 样式等、积分信息、合伙人注册
---
sub_pages/customer/self/member-center.vue | 130 +++++++++++++++++++++++--------------------
1 files changed, 70 insertions(+), 60 deletions(-)
diff --git a/sub_pages/customer/self/member-center.vue b/sub_pages/customer/self/member-center.vue
index 38305bd..999f936 100644
--- a/sub_pages/customer/self/member-center.vue
+++ b/sub_pages/customer/self/member-center.vue
@@ -68,75 +68,84 @@
<script>
import banner3d from '@/components/banner3d/banner3d'
export default {
+ async onPullDownRefresh() {
+ await this.$store.dispatch('getCurrentInfo')
+ uni.stopPullDownRefresh()
+ },
methods: {
},
- onLoad() {
- if (this.currentInfo.customerDTO && this.currentInfo.customerDTO.userGrowthRecord && this.currentInfo
- .customerDTO.userGrowthRecord.currentMemberLevel) {
- // userGrowthRecord: {currentMemberLevel: "普通会员", currentGrowthValue: 6919,…}
- // currentGrowthValue: 6919
- // currentMemberLevel: "普通会员"
- // targetMemberInfos: [{targetMemberLevel: "金卡会员", targetStartPoint: 15001, targetGap: 8082, targetDiscountAmount: 0.4},…]
- // 0: {targetMemberLevel: "金卡会员", targetStartPoint: 15001, targetGap: 8082, targetDiscountAmount: 0.4}
- // targetDiscountAmount: 0.4
- // targetGap: 8082
- // targetMemberLevel: "金卡会员"
- // targetStartPoint: 15001
- // 1: {targetMemberLevel: "钻石会员", targetStartPoint: 10001, targetGap: 3082, targetDiscountAmount: 0.5}
- // targetDiscountAmount: 0.5
- // targetGap: 3082
- // targetMemberLevel: "钻石会员"
- // targetStartPoint: 10001
- //计算下一个等级的差距
- let name = this.currentInfo.customerDTO.userGrowthRecord.currentMemberLevel
+ async onLoad() {
+ await this.$store.dispatch('getCurrentInfo')
+ this.$nextTick(() => {
+ if (this.currentInfo.customerDTO && this.currentInfo.customerDTO.userGrowthRecord && this
+ .currentInfo
+ .customerDTO.userGrowthRecord.currentMemberLevel) {
+ // userGrowthRecord: {currentMemberLevel: "普通会员", currentGrowthValue: 6919,…}
+ // currentGrowthValue: 6919
+ // currentMemberLevel: "普通会员"
+ // targetMemberInfos: [{targetMemberLevel: "金卡会员", targetStartPoint: 15001, targetGap: 8082, targetDiscountAmount: 0.4},…]
+ // 0: {targetMemberLevel: "金卡会员", targetStartPoint: 15001, targetGap: 8082, targetDiscountAmount: 0.4}
+ // targetDiscountAmount: 0.4
+ // targetGap: 8082
+ // targetMemberLevel: "金卡会员"
+ // targetStartPoint: 15001
+ // 1: {targetMemberLevel: "钻石会员", targetStartPoint: 10001, targetGap: 3082, targetDiscountAmount: 0.5}
+ // targetDiscountAmount: 0.5
+ // targetGap: 3082
+ // targetMemberLevel: "钻石会员"
+ // targetStartPoint: 10001
+ //计算下一个等级的差距
+ let name = this.currentInfo.customerDTO.userGrowthRecord.currentMemberLevel
- for (var tmp of this.bannerList) {
- tmp.point = {
- current: this.currentInfo.customerDTO.userGrowthRecord.currentGrowthValue || 0
- }
- tmp.currentMsg = ''
- if (tmp.title === name) {
- //说明是当前等级,其他待定
- tmp.currentMsg = '当前等级'
- }
- }
- if (this.currentInfo.customerDTO.userGrowthRecord.targetMemberInfos) {
- var t = -1
for (var tmp of this.bannerList) {
- t += 1
- for (var k of this.currentInfo.customerDTO.userGrowthRecord.targetMemberInfos) {
- if (tmp.title === k.targetMemberLevel) {
- console.log('eq', k, tmp)
- tmp.point = {
- current: this.currentInfo.customerDTO.userGrowthRecord.currentGrowthValue || 0,
- end: k.targetStartPoint || 0,
+ tmp.point = {
+ current: this.currentInfo.customerDTO.userGrowthRecord.currentGrowthValue || 0
+ }
+ tmp.currentMsg = ''
+ if (tmp.title === name) {
+ //说明是当前等级,其他待定
+ tmp.currentMsg = '当前等级'
+ }
+ }
+ if (this.currentInfo.customerDTO.userGrowthRecord.targetMemberInfos) {
+ var t = -1
+ for (var tmp of this.bannerList) {
+ t += 1
+ for (var k of this.currentInfo.customerDTO.userGrowthRecord.targetMemberInfos) {
+ if (tmp.title === k.targetMemberLevel) {
+ console.log('eq', k, tmp)
+ tmp.point = {
+ current: this.currentInfo.customerDTO.userGrowthRecord
+ .currentGrowthValue || 0,
+ end: k.targetStartPoint || 0,
+ }
}
}
}
}
- }
- this.init = true
- this.$nextTick(() => {
- // var name = this.currentInfo.customerDTO.userGrowthRecord.currentMemberLevel
- var index = -1
- for (var tmp of this.bannerList) {
- index += 1
- if (tmp.title === name) {
- this.$refs.banner3d.swiperChange({
- mp: {
- detail: {
- current: index
+ this.init = true
+ this.$nextTick(() => {
+ // var name = this.currentInfo.customerDTO.userGrowthRecord.currentMemberLevel
+ var index = -1
+ for (var tmp of this.bannerList) {
+ index += 1
+ if (tmp.title === name) {
+ this.$refs.banner3d.swiperChange({
+ mp: {
+ detail: {
+ current: index
+ }
}
- }
- })
- break
+ })
+ break
+ }
}
- }
- })
+ })
- }
+ }
+ })
},
data() {
return {
@@ -208,18 +217,19 @@
text-align: left;
font-style: normal;
padding: 24rpx;
-
+
.icon {
width: 78rpx;
height: 78rpx;
margin: auto;
display: block;
margin-bottom: 10rpx;
-
+
}
- .desc{
+
+ .desc {
text-align: center;
-
+
}
}
--
Gitblit v1.9.3