diff --git a/api/members.js b/api/members.js index 79b82d8..1e9170b 100644 --- a/api/members.js +++ b/api/members.js @@ -477,3 +477,11 @@ export function withdrawalSettingVO() { }); } + +export function getCurrentMemberBenefits() { return http.request({url:'/member/benefit/current',method:Method.GET,needToken:true}) } +export function getMemberGradeBenefits() { return http.request({url:'/member/memberGrade/list',method:Method.GET,needToken:true}) } + +/** 仅返回后台已开启的经验值规则及当前会员累计获得情况。 */ +export function getExperienceTasks() { return http.request({ url: '/member/memberGrade/rules', method: Method.GET, needToken: true }) } +/** 当前会员等级、经验值及分页流水;会员身份由服务端登录态确定。 */ +export function getExperienceRecords(params) { return http.request({ url: '/member/memberGrade/current', method: Method.GET, params, needToken: true }) } diff --git a/pages.json b/pages.json index 7650abf..0aa04b6 100644 --- a/pages.json +++ b/pages.json @@ -13,16 +13,16 @@ } }, "pages": [ - + { "path": "pages/tabbar/home/index", "style": { "navigationBarTitleText": "首页", "navigationStyle": "custom", // 隐藏系统导航栏 "navigationBarTextStyle": "black", - "enablePullDownRefresh":true + "enablePullDownRefresh":true } - }, + }, { "path":"pages/tabbar/screen/fullScreen", "style": { @@ -63,13 +63,13 @@ } } }, - + { "path": "pages/navigation/search/searchPage", "style": { "navigationBarTitleText": "搜索", "navigationStyle": "custom", - + "app-plus": { //app页面不显示滚动条 "scrollIndicator": "none", @@ -89,11 +89,11 @@ "navigationStyle": "custom" } }, - + { "path": "pages/tabbar/home/web-view", "style": { - + } }, { @@ -173,7 +173,9 @@ { "root": "pages/mine", "pages": [ - + {"path":"memberBenefits","style":{"navigationBarTitleText":"会员权益","enablePullDownRefresh":true,"navigationBarBackgroundColor":"#f5f6f9","navigationBarTextStyle":"black"}}, + {"path":"experience","style":{"navigationBarTitleText":"我的经验","enablePullDownRefresh":true,"navigationBarBackgroundColor":"#f5f6f9","navigationBarTextStyle":"black"}}, + { "path": "signIn", "style": { @@ -379,7 +381,7 @@ "navigationStyle": "custom" } }, - + { "path": "deposit/info", "style": { @@ -432,8 +434,8 @@ "navigationBarTitleText": "面容登录" } }, - - + + { "path": "set/securityCenter/editPassword", "style": { @@ -443,13 +445,13 @@ } } }, - + { "path": "set/securityCenter/bindMobile", "style": { "navigationBarTitleText": "绑定手机号", "app-plus": { - + } } }, @@ -461,7 +463,7 @@ "enablePullDownRefresh": true, "app-plus": { } - + } }, { @@ -471,7 +473,7 @@ "enablePullDownRefresh": true, "app-plus": { } - + } }, { @@ -619,9 +621,9 @@ // 禁止页面滚动 "scrollIndicator": "none", "safearea": { - "bottom": { - "offset": "none" - } + "bottom": { + "offset": "none" + } } } } @@ -677,14 +679,14 @@ "animationType": "slide-in-bottom", "scrollIndicator": "none", "safearea": { - "bottom": { - "offset": "none" - } + "bottom": { + "offset": "none" + } } } } }, - + { "path": "entry/seller/index", "style": { @@ -740,7 +742,7 @@ } } }, - + // #ifndef MP-WEIXIN { "path": "live/room", @@ -802,7 +804,7 @@ "path": "point/pointList", "style": { "navigationBarTitleText": "积分商城" - + } } @@ -818,7 +820,7 @@ "navigationBarTitleText": "我的优惠券", "app-plus": { "bounce": "coupon/none" - + } } }, @@ -834,13 +836,13 @@ "navigationBarTitleText": "优惠券" } }, - + { "path": "coupon/couponCenter", "style": { "navigationBarTitleText": "领券中心", "enablePullDownRefresh": true - + } }, { @@ -897,7 +899,7 @@ } } } - + ] }, @@ -928,7 +930,7 @@ "enablePullDownRefresh": true, "app-plus": { "bounce": "none" - + } } }, @@ -969,7 +971,7 @@ "navigationBarTitleText": "评价详情" } }, - + { "path": "evaluate/releaseEvaluate", "style": { @@ -982,7 +984,7 @@ "navigationBarTitleText": "我的评价" } }, - + { "path": "afterSales/applyProgress", "style": { @@ -1067,7 +1069,7 @@ "selectedIconPath": "static/tabbar/category-s.png", "text": "分类" }, - + { "pagePath": "pages/tabbar/cart/cartList", "iconPath": "static/tabbar/cart.png", @@ -1082,11 +1084,11 @@ } ] }, - // #todo 为什么要注释condition下代码? + // #todo 为什么要注释condition下代码? // IOS plus.runtime.arguments 添加 condition节点后, 框架会修改 runtime.arguments // 会影响什么功能? // -在h5中唤醒app会一直返回默认值 {"name":"","path":"","query":"","id":0} - "condition": { //模式配置,仅开发期间生效 + "condition": { //模式配置,仅开发期间生效 // "current": 0, //当前激活的模式(list 的索引项) // "list": [{ // "name": "", //模式名称 diff --git a/pages/mine/components/MemberGradeCard.vue b/pages/mine/components/MemberGradeCard.vue new file mode 100644 index 0000000..db8c674 --- /dev/null +++ b/pages/mine/components/MemberGradeCard.vue @@ -0,0 +1,37 @@ + + + diff --git a/pages/mine/experience.vue b/pages/mine/experience.vue new file mode 100644 index 0000000..f735b5c --- /dev/null +++ b/pages/mine/experience.vue @@ -0,0 +1,164 @@ + + + + + diff --git a/pages/mine/memberBenefits.vue b/pages/mine/memberBenefits.vue new file mode 100644 index 0000000..1136dc4 --- /dev/null +++ b/pages/mine/memberBenefits.vue @@ -0,0 +1,230 @@ + + + + + diff --git a/pages/tabbar/user/my.vue b/pages/tabbar/user/my.vue index de4436a..c0f1a2e 100644 --- a/pages/tabbar/user/my.vue +++ b/pages/tabbar/user/my.vue @@ -1,14 +1,21 @@ @@ -248,19 +327,35 @@ async function getUserOrderNum() { background: linear-gradient(175deg, #e53238 0%, #eb4448 45%, #ff5e62 100%); padding-left: 28rpx; padding-right: 28rpx; - padding-bottom: 64rpx; + padding-bottom: 44rpx; border-bottom-left-radius: 36rpx; border-bottom-right-radius: 36rpx; - /* CSS 静态兜底:状态栏高度 + 充足的沉降留白 */ - padding-top: calc(var(--status-bar-height, 44px) + 88rpx); + /* 静态兜底保留状态栏与导航操作区域 */ + padding-top: calc(var(--status-bar-height, 44px) + 72rpx); box-sizing: border-box; + overflow: hidden; } -/* 用户信息行(移到胶囊下方,拥有充裕横纵向空间) */ +.grade-background { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + opacity: 0; + pointer-events: none; +} + +.grade-background.is-loaded { + opacity: 1; +} + +/* 紧凑用户信息行 */ .user-profile { + position: relative; display: flex; align-items: center; - padding: 8rpx 6rpx; + padding: 4rpx 6rpx; transition: opacity 0.2s; &:active { @@ -272,8 +367,8 @@ async function getUserOrderNum() { flex-shrink: 0; .avatar-img { - width: 124rpx; - height: 124rpx; + width: 104rpx; + height: 104rpx; border-radius: 50%; border: 4rpx solid rgba(255, 255, 255, 0.92); box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.16); @@ -281,19 +376,6 @@ async function getUserOrderNum() { display: block; } - .vip-tag-icon { - position: absolute; - right: -2rpx; - bottom: 2rpx; - width: 34rpx; - height: 34rpx; - background: linear-gradient(135deg, #f59e0b, #d97706); - border: 2rpx solid #ffffff; - border-radius: 50%; - display: flex; - align-items: center; - justify-content: center; - } } .user-detail-info { @@ -306,9 +388,9 @@ async function getUserOrderNum() { align-items: center; .user-nickname { - font-size: 38rpx; + font-size: 34rpx; font-weight: 700; - color: #ffffff; + color: var(--member-header-color, #ffffff); letter-spacing: 0.5rpx; overflow: hidden; text-overflow: ellipsis; @@ -317,25 +399,46 @@ async function getUserOrderNum() { } .user-sub-row { - margin-top: 12rpx; + margin-top: 8rpx; display: flex; align-items: center; flex-wrap: wrap; gap: 12rpx; .badge-tag { + display: inline-flex; + align-items: center; + gap: 6rpx; + max-width: 100%; + min-height: 40rpx; + box-sizing: border-box; font-size: 20rpx; - color: #ffffff; + color: var(--member-header-color, #ffffff); background: rgba(255, 255, 255, 0.22); - padding: 3rpx 14rpx; + padding: 2rpx 12rpx 2rpx 6rpx; border-radius: 20rpx; border: 1rpx solid rgba(255, 255, 255, 0.35); font-weight: 500; + + .grade-icon { + width: 36rpx; + height: 36rpx; + flex-shrink: 0; + display: block; + } + + .grade-name { + min-width: 0; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } } .user-sub-text { font-size: 23rpx; - color: rgba(255, 255, 255, 0.88); + color: var(--member-header-color, #ffffff); + opacity: 0.88; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; @@ -350,12 +453,13 @@ async function getUserOrderNum() { } } -/* 核心资产栏(沉浸在红色背景中) */ +/* 核心资产栏 */ .hero-assets { + position: relative; display: flex; align-items: center; justify-content: space-between; - margin-top: 44rpx; + margin-top: 24rpx; padding: 0 12rpx; .asset-col { @@ -374,7 +478,7 @@ async function getUserOrderNum() { .asset-number-row { display: flex; align-items: baseline; - color: #ffffff; + color: var(--member-header-color, #ffffff); .symbol { font-size: 22rpx; @@ -384,7 +488,7 @@ async function getUserOrderNum() { } .num { - font-size: 40rpx; + font-size: 36rpx; font-weight: 700; letter-spacing: 0.5rpx; } @@ -404,9 +508,10 @@ async function getUserOrderNum() { } .asset-title { - margin-top: 10rpx; + margin-top: 8rpx; font-size: 24rpx; - color: rgba(255, 255, 255, 0.88); + color: var(--member-header-color, #ffffff); + opacity: 0.88; line-height: 1; } } @@ -414,7 +519,8 @@ async function getUserOrderNum() { .asset-sep { width: 2rpx; height: 38rpx; - background-color: rgba(255, 255, 255, 0.22); + background-color: var(--member-header-color, #ffffff); + opacity: 0.22; } }