From 16d4fc43a65ff915f780b6e1ea7a6f8055926b32 Mon Sep 17 00:00:00 2001 From: woody Date: Tue, 24 Jun 2025 16:44:10 +0800 Subject: [PATCH] =?UTF-8?q?feat(mine):=20=E6=B7=BB=E5=8A=A0=E6=8B=93?= =?UTF-8?q?=E5=B1=95=E7=BB=93=E4=BD=99=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/settings.json | 4 +- config/mine.js | 20 ++- config/request.js | 2 +- pages/mine/index.vue | 274 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 291 insertions(+), 9 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index f8fa38c..73891e1 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,8 +1,8 @@ { "editor.formatOnSave": true, "editor.codeActionsOnSave": { - "source.fixAll.eslint": true, - "source.organizeImports": true + "source.fixAll.eslint": "explicit", + "source.organizeImports": "explicit" }, "editor.defaultFormatter": "esbenp.prettier-vscode", "[vue]": { diff --git a/config/mine.js b/config/mine.js index df211d6..feefd12 100644 --- a/config/mine.js +++ b/config/mine.js @@ -1,16 +1,24 @@ - const http = uni.$u.http //我的市场 -export const getMyMarket = (params) => http.get('/sale/api/order/index-myMarket', { params }) +export const getMyMarket = params => + http.get('/sale/api/order/index-myMarket', { params }) // 我的市场点亮 -export const getMyMarketColor = (params) => http.get('/system/manage/area/get-light-area', { params }) +export const getMyMarketColor = params => + http.get('/system/manage/area/get-light-area', { params }) // 礼品地址列表 -export const getMemberGift = (params) => http.get('/member/api/member-gift/member-gift-list', { params }) +export const getMemberGift = params => + http.get('/member/api/member-gift/member-gift-list', { params }) //全部荣誉墙 -export const getMemberHonorWallAll = (params) => http.get('/member/api/member/member-honor-wall-all', { params }) +export const getMemberHonorWallAll = params => + http.get('/member/api/member/member-honor-wall-all', { params }) //年度奖衔 -export const yearAwards = (params) => http.get('/member/api/member/year-awards-list', { params }) +export const yearAwards = params => + http.get('/member/api/member/year-awards-list', { params }) + +// 结余查询 +export const getMemberBalance = () => + http.get('/member/api/member-structure/az-framework') diff --git a/config/request.js b/config/request.js index 87a834b..7c691d2 100644 --- a/config/request.js +++ b/config/request.js @@ -20,7 +20,7 @@ module.exports = vm => { //#ifdef DEV_SERVER console.log('DEV_SERVER') - config.baseURL = '/prod-api' + config.baseURL = 'http://192.168.0.104:8080' //#endif //#ifdef QA_SERVER diff --git a/pages/mine/index.vue b/pages/mine/index.vue index 37e6919..1e38964 100644 --- a/pages/mine/index.vue +++ b/pages/mine/index.vue @@ -85,6 +85,55 @@ + + + 拓展结余 + + + + + + + + + + + + + + 左区: {{ balanceProgress.leftValue }} + + + + + 右区: {{ balanceProgress.rightValue }} + + + + + + + 昨日业绩 = rightValue + + let leftProgress = 0 + let rightProgress = 0 + + if (isLeftBig) { + leftProgress = Math.min((leftValue / maxBig) * 100, 100) + rightProgress = Math.min((rightValue / maxSmall) * 100, 100) + } else { + leftProgress = Math.min((leftValue / maxSmall) * 100, 100) + rightProgress = Math.min((rightValue / maxBig) * 100, 100) + } + + return { + leftProgress, + rightProgress, + leftValue: leftValue.toFixed(0), + rightValue: rightValue.toFixed(0), + maxBig, + maxSmall, + isLeftBig, + } + }, }, methods: { + getMemberBalance() { + getMemberBalance().then(res => { + console.log('🌈res', res) + if (res.code === 200 && res.data) { + this.balanceData = res.data + } + }) + }, goYear() { uni.navigateTo({ url: '/pages/mine/yearGift/index', @@ -1341,4 +1450,169 @@ export default { font-size: 24rpx; padding: 0 4rpx; } + +/* 统一结余进度条样式 */ +.unified_balance_container { + flex: 1; + margin: 10rpx; +} + +.progress_text { + position: absolute; + top: 50%; + transform: translateY(-50%); + font-size: 22rpx; + color: #000; + // text-shadow: 1rpx 1rpx 2rpx rgba(0, 0, 0, 0.8); + white-space: nowrap; + z-index: 5; +} + +// .left_progress:not(.big_area) .progress_text, +// .right_progress:not(.big_area) .progress_text { +// color: #000; +// text-shadow: +// 1rpx 1rpx 2rpx rgba(0, 0, 0, 0.8), +// 0 0 8rpx rgba(0, 91, 172, 0.8); +// } + +// .left_progress.big_area .progress_text, +// .right_progress.big_area .progress_text { +// color: #000; +// text-shadow: +// 1rpx 1rpx 2rpx rgba(0, 0, 0, 0.8), +// 0 0 8rpx rgba(255, 107, 53, 0.8); +// } + +/* 终点标签样式 */ +.endpoint_label { + position: absolute; + top: 50%; + transform: translateY(-50%); + font-size: 22rpx; + color: #000; + padding: 8rpx 12rpx; + border-radius: 12rpx; + z-index: 15; + font-weight: 500; +} + +.left_endpoint { + left: calc(50% - 10rpx); + transform: translate(-100%, -50%); +} + +.right_endpoint { + right: calc(50% - 10rpx); + transform: translate(100%, -50%); +} + +.left_text { + left: 10rpx; +} + +.right_text { + right: 10rpx; +} + +.unified_progress_bar { + height: 34rpx; + background: #eeeeee; + border-radius: 20rpx; + position: relative; + overflow: hidden; +} + +.left_progress { + position: absolute; + left: 0; + top: 0; + height: 100%; + max-width: 50%; + background: linear-gradient(90deg, #005bac 0%, #3385d6 100%); + border-radius: 20rpx 0 0 20rpx; + transition: width 0.6s ease-in-out; + overflow: hidden; +} + +.left_progress.big_area { + background: linear-gradient(90deg, #ff6b35 0%, #f7931e 100%); + box-shadow: 0 2rpx 8rpx rgba(255, 107, 53, 0.3); +} + +.right_progress { + position: absolute; + right: 0; + top: 0; + height: 100%; + max-width: 50%; + background: linear-gradient(270deg, #005bac 0%, #3385d6 100%); + border-radius: 0 20rpx 20rpx 0; + transition: width 0.6s ease-in-out; + overflow: hidden; +} + +.right_progress.big_area { + background: linear-gradient(270deg, #ff6b35 0%, #f7931e 100%); + box-shadow: 0 2rpx 8rpx rgba(255, 107, 53, 0.3); +} + +.center_divider { + position: absolute; + left: 50%; + top: 0; + width: 2rpx; + height: 100%; + background: transparent; + transform: translateX(-50%); + z-index: 10; + box-shadow: 0 0 4rpx rgba(0, 0, 0, 0.2); +} + +.left_progress::before, +.right_progress::before { + content: ''; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: linear-gradient( + 100deg, + rgba(255, 255, 255, 0) 20%, + rgba(255, 255, 255, 0.4) 50%, + rgba(255, 255, 255, 0) 80% + ); + transform: translateX(-100%); + animation: unified_shimmer_animation 3s infinite linear; +} + +.right_progress::before { + background: linear-gradient( + -100deg, + rgba(255, 255, 255, 0) 20%, + rgba(255, 255, 255, 0.4) 50%, + rgba(255, 255, 255, 0) 80% + ); + transform: translateX(100%); + animation: unified_shimmer_animation_right 3s infinite linear; +} + +@keyframes unified_shimmer_animation { + 0% { + transform: translateX(-100%); + } + 100% { + transform: translateX(100%); + } +} + +@keyframes unified_shimmer_animation_right { + 0% { + transform: translateX(100%); + } + 100% { + transform: translateX(-100%); + } +}