From cfb456cdd21ce8c3c3d254df0091e41ad151948d Mon Sep 17 00:00:00 2001 From: woody Date: Thu, 12 Jun 2025 09:39:42 +0800 Subject: [PATCH] =?UTF-8?q?feat(mine):=20=E6=B7=BB=E5=8A=A0=E5=B8=82?= =?UTF-8?q?=E5=9C=BA=E5=8A=A8=E6=80=81=E7=9B=92=E6=95=B0=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/mine.js | 10 + package-lock.json | 7 + package.json | 1 + pages.json | 8 + pages/bonus/index.vue | 645 ++++++++++++++-------- pages/bonus/regional-assessment/index.vue | 5 +- pages/mine/directPush/index.vue | 118 ++++ pages/mine/index.vue | 311 ++++++----- static/images/list.svg | 1 + 9 files changed, 734 insertions(+), 372 deletions(-) create mode 100644 pages/mine/directPush/index.vue create mode 100644 static/images/list.svg diff --git a/config/mine.js b/config/mine.js index feb2a68..a0a128b 100644 --- a/config/mine.js +++ b/config/mine.js @@ -43,3 +43,13 @@ export const getRegionAssessmentRecord = () => // 获取会员业绩 export const getMemberPerformance = () => http.get('/retail-member/api/retail-member/member-achieve') + +// 直推列表 +export const getDirectPushList = params => + http.get('/retail-member/api/retail-member/recommend-list', { params }) + +// 市场动态盒数接口 +export const getMarketDynamicBoxCount = params => + http.get('/retail-member/api/retail-member/big-small-box', { + params, + }) diff --git a/package-lock.json b/package-lock.json index a1b935b..f630bf9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "license": "ISC", "dependencies": { "axios": "^1.5.0", + "dayjs": "^1.11.13", "echarts": "^4.9.0", "file-saver": "^2.0.5", "glob": "^11.0.1", @@ -1948,6 +1949,12 @@ "dev": true, "peer": true }, + "node_modules/dayjs": { + "version": "1.11.13", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.13.tgz", + "integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==", + "license": "MIT" + }, "node_modules/debug": { "version": "2.6.9", "resolved": "https://mirrors.cloud.tencent.com/npm/debug/-/debug-2.6.9.tgz", diff --git a/package.json b/package.json index 217aee7..27b2ced 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "main": "main.js", "dependencies": { "axios": "^1.5.0", + "dayjs": "^1.11.13", "echarts": "^4.9.0", "file-saver": "^2.0.5", "glob": "^11.0.1", diff --git a/pages.json b/pages.json index 367fc66..d27a21b 100644 --- a/pages.json +++ b/pages.json @@ -132,6 +132,14 @@ "enablePullDownRefresh": true } }, + { + "path": "pages/mine/directPush/index", + "style": { + "navigationBarTitleText": "直推列表", + "navigationBarBackgroundColor": "#fff", + "enablePullDownRefresh": true + } + }, { "path": "pages/performanceEchart/index", "style": { diff --git a/pages/bonus/index.vue b/pages/bonus/index.vue index 6bc7774..c378131 100644 --- a/pages/bonus/index.vue +++ b/pages/bonus/index.vue @@ -1,233 +1,440 @@ + \ No newline at end of file +.empty-state { + text-align: center; + color: #999; + padding-top: 50px; +} + +.daily-bonus-card { + background-color: #ffffff; + border-radius: 12px; + margin: 12px 15px; + box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06); + overflow: hidden; + border: 1px solid #f0f0f0; + transition: all 0.2s ease-in-out; + &:active { + transform: scale(0.98); + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); + } +} + +.card-header { + display: flex; + justify-content: space-between; + align-items: center; + padding: 15px; + border-bottom: 1px solid #f0f0f0; + + .header-left { + display: flex; + align-items: center; + .header-icon { + margin-right: 8px; + } + } + + .header-title { + font-weight: 600; + font-size: 16px; + color: #333; + } + .header-date { + color: #666; + font-size: 14px; + } +} + +.card-content { + padding: 0; + .bonus-item { + display: flex; + justify-content: space-between; + padding: 12px 15px; + font-size: 14px; + border-bottom: 1px dashed #e5e5e5; + + &:last-child { + border-bottom: none; + } + + .item-label { + color: #555; + } + .item-value { + color: #111; + font-weight: 600; + font-family: + 'DIN-Alternate', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif; + } + } +} + +.card-footer { + display: flex; + justify-content: space-between; + align-items: center; + padding: 15px; + border-top: 1px solid #f0f0f0; + .subtotal-label { + font-weight: 600; + font-size: 15px; + color: #333; + } + .subtotal-value { + font-weight: bold; + color: #fa3534; + font-size: 18px; + } +} + +.scroll-footer { + text-align: center; + padding: 10px 0; + color: #999; + font-size: 14px; +} + diff --git a/pages/bonus/regional-assessment/index.vue b/pages/bonus/regional-assessment/index.vue index 21d89af..a0e536e 100644 --- a/pages/bonus/regional-assessment/index.vue +++ b/pages/bonus/regional-assessment/index.vue @@ -136,7 +136,7 @@ export default { // 考核不通过 return 'status-fail' } - return '' + return 'status-success' }, }, } @@ -182,6 +182,9 @@ export default { .status-fail { color: #fa3534; } + .status-success { + color: #00b42a; + } } .card-footer { diff --git a/pages/mine/directPush/index.vue b/pages/mine/directPush/index.vue new file mode 100644 index 0000000..55501d3 --- /dev/null +++ b/pages/mine/directPush/index.vue @@ -0,0 +1,118 @@ + + + + + diff --git a/pages/mine/index.vue b/pages/mine/index.vue index 976fa07..df33327 100644 --- a/pages/mine/index.vue +++ b/pages/mine/index.vue @@ -23,19 +23,28 @@ {{ userInfo.memberCode }} - - - 当月级别 + + + 会员等级 {{ userInfo.pkGradeVal || '-' }} - - - 荣誉级别 - {{ - userInfo.pkAwardsVal || '-' - }} + + + + 当月奖衔 + {{ + userInfo.pkAwardsVal || '-' + }} + + + + 荣誉奖衔 + {{ + userInfo.pkMaxAwardsVal || '-' + }} + @@ -205,22 +214,22 @@ + {{ '省' }} {{ regionInfo.provinceVal || '-' }} - {{ '省' }} + {{ '市' }} {{ regionInfo.cityVal || '-' }} - {{ '市' }} + {{ '区' }} {{ regionInfo.countyVal || '-' }} - {{ '区' }} @@ -229,37 +238,49 @@ {{ '市场动态' }} - - 更多 - - - - - - 总业绩: - {{ - performanceData.totalPerformance || '0.0000' - }} + + + + + 总业绩: + {{ + performanceData.totalSumPv || '0.00' + }} + + + 小区: + {{ + performanceData.smallAreaPv || '0.00' + }} + - - 小区: - {{ - performanceData.smallAreaPerformance || '0.0000' - }} + + 更多 + - - - 总盒数: - {{ totalBox || '0' }} + + + + 总盒数: + {{ + performanceData.totalBox || '0' + }} + + + 小区盒数: + {{ + performanceData.smallAreaBox || '0' + }} + - - 小区盒数: - {{ smallAreaBox || '0' }} + + 更多 + @@ -444,7 +465,14 @@ export default { name: '我的钱包', imgurl: '../../static/images/my_icon1.png', menuKey: 'wallet', - ifshow: false, + ifshow: true, + }, + { + url: '/pages/bonus/index', + name: '奖金明细', + imgurl: '../../static/images/mark2.png', + menuKey: 'incomeDetail', + ifshow: true, }, { url: '/pages/ticket/index', @@ -459,12 +487,12 @@ export default { name: '自助服务', imgurl: '../../static/images/my_icon6.png', menuKey: 'selfHelp', - ifshow: false, + ifshow: true, }, { url: '/pages/mine/share/index', name: '个人推广', - imgurl: '../../static/images/promotion.svg', + imgurl: '../../static/images/list.svg', menuKey: 'share', ifshow: true, }, @@ -473,28 +501,35 @@ export default { name: '账号安全', imgurl: '../../static/images/my_icon8.png', menuKey: '', - ifshow: false, + ifshow: true, }, { url: '/pages/addressList/index', name: '地址管理', imgurl: '../../static/images/my_icon9.png', menuKey: '', - ifshow: false, + ifshow: true, + }, + { + url: '/pages/mine/directPush/index', + name: '直推列表', + imgurl: '../../static/images/mark5.png', + menuKey: '', + ifshow: true, }, { url: '/pages/mine/bindBank/index', name: '银行信息', imgurl: '../../static/images/my_icon10.png', menuKey: '', - ifshow: false, + ifshow: true, }, { url: '/pages/bonus/regional-assessment/index', name: '区域考核', imgurl: '../../static/images/mark5.png', menuKey: '', - ifshow: false, + ifshow: true, }, // { // url: '/pages/mine/addNewPv/index', @@ -513,15 +548,18 @@ export default { smallAreaBox: 0, totalBox: 0, performanceData: {}, + marketDynamicBoxInfo: {}, } }, onShow() { - this.getInfo() - this.orderNum() - this.getRegionSelect() - this.getMemberBoxCount() - this.fetchMemberPerformance() - // this.getUserAwardss() + this.getInfo().finally(() => { + this.orderNum() + this.getRegionSelect() + this.getMemberBoxCount() + this.fetchMemberPerformance() + this.getMarketDynamicBoxCount() + // this.getUserAwardss() + }) }, computed: { @@ -637,43 +675,21 @@ export default { }) }, getInfo() { - api.getInfo().then(res => { - if (res) { - this.userInfo = res.data - if (this.userInfo.memberCode == 'CN68880628') { - this.ifSpecial = true + return new Promise(resolve => { + api.getInfo().then(res => { + if (res.code == 200) { + this.userInfo = res.data + resolve() + if (this.userInfo.memberCode == 'CN68880628') { + this.ifSpecial = true + } else { + this.ifSpecial = false + } } else { - this.ifSpecial = false + reject() } - } - }) - - api.getMenuList().then(res => { - res.data.forEach(item => { - if (item.menuKey == 'iHonorAward') { - this.iHonorAward = true - } - this.markMenuList.forEach(ele => { - if (ele.menuKey == item.menuKey || ele.menuKey == '') { - ele.ifshow = true - } - }) - this.otherMenuList.forEach(ele => { - if (ele.menuKey == item.menuKey || ele.menuKey == '') { - ele.ifshow = true - } - }) }) - console.log('🌈ad', this.otherMenuList) - - let a = this.markMenuList.some(item => { - return item.ifshow == true - }) - this.actMenu = a }) - // api.memberAwards().then((res) => { - // this.awardsList = res.data; - // }); }, goTo(url) { if (url == 1) { @@ -687,6 +703,13 @@ export default { }) } }, + getMarketDynamicBoxCount() { + getMarketDynamicBoxCount().then(res => { + if (res.code == 200) { + this.marketDynamicBoxInfo = res.data + } + }) + }, goOrder(index) { //全部订单 uni.navigateTo({ @@ -714,7 +737,9 @@ export default { }) }, getMemberBoxCount() { - getMemberBoxCount().then(res => { + getMemberBoxCount({ + pkBigMember: this.userInfo.memberCode, + }).then(res => { if (res.code == 200) { this.totalBox = res.data?.totalBox || 0 this.smallAreaBox = res.data?.smallAreaBox || 0 @@ -763,34 +788,6 @@ export default { color: #666666; margin-right: 8rpx; } - - .highlight-name { - font-size: 30rpx; /* 示例字号,您可以根据需要调整 */ - font-weight: bold; - color: #005bac; /* 示例颜色,您可以根据需要调整 */ - padding: 0 8rpx; /* 增加一些内边距,使其更突出 */ - margin-right: 10rpx; /* 在名称和下一个标签之间添加间距 */ - } - - .highlight-pv { - font-size: 30rpx; /* 示例字号,您可以根据需要调整 */ - font-weight: bold; - color: #ff5722; /* 示例颜色,您可以根据需要调整 */ - padding: 0 8rpx; /* 增加一些内边距,使其更突出 */ - } - - .ju_title { - font-family: Source Han Sans CN; - font-weight: bold; - color: #666666; - // padding-bottom: 10rpx; - // border-bottom: 2rpx solid #eeeeee; - // display: flex; - // justify-content: space-between - } - .ju_title1 { - font-size: 18px; - } .jugrade_flex { display: flex; justify-content: space-between; @@ -1092,17 +1089,14 @@ export default { .level_box { display: flex; - flex-direction: row; - align-items: center; - flex-wrap: wrap; - gap: 16rpx; + flex-direction: column; + align-items: flex-start; + gap: 10rpx; } .level_tag { - background: rgba(255, 255, 255, 0.2); - backdrop-filter: blur(10rpx); - -webkit-backdrop-filter: blur(10rpx); - border: 1rpx solid rgba(255, 255, 255, 0.3); + background: linear-gradient(145deg, #c5d8e8, #afc8de, #9ab5d0); + border: 1rpx solid #8ca3b8; padding: 6rpx 18rpx; border-radius: 50px; display: inline-flex; @@ -1110,23 +1104,19 @@ export default { gap: 10rpx; position: relative; overflow: hidden; + color: #003e7c; + box-shadow: + inset 0 1px 1px rgba(255, 255, 255, 0.3), + 0 1px 2px rgba(0, 0, 0, 0.15); } - .level_tag::after { - 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.5) 50%, - rgba(255, 255, 255, 0) 80% - ); - transform: translateX(-100%); - animation: bling_shimmer 3.5s infinite linear; + .level_tag--primary { + background: linear-gradient(145deg, #fde468, #fad02c, #e5b40a); + border: 1rpx solid #c8a000; + color: #5d4203; + box-shadow: + inset 0 1px 1px rgba(255, 255, 255, 0.4), + 0 1px 2px rgba(0, 0, 0, 0.15); } .level_label { @@ -1370,7 +1360,7 @@ export default { .region-info-label { font-size: 24rpx; color: #999; - margin-top: 10rpx; + margin-bottom: 10rpx; } .region-info-value { @@ -1384,7 +1374,7 @@ export default { box-shadow: 0rpx 6rpx 24rpx rgba(0, 0, 0, 0.06); border-radius: 24rpx; margin-top: 20rpx; - padding: 30rpx; + padding: 20rpx; } .info-grid { @@ -1431,12 +1421,13 @@ export default { color: #999999; } -.market-cards-container { +.market-stats-container { padding: 20rpx 0; } -.market-card-row { +.stat-row { display: flex; + align-items: center; justify-content: space-between; margin-bottom: 20rpx; @@ -1445,17 +1436,34 @@ export default { } } -.market-card { - width: 48%; +.stat-cards { + display: flex; + gap: 20rpx; + flex: 1; +} + +.stat-card { + flex: 1; padding: 20rpx; border-radius: 10rpx; color: #fff; display: flex; justify-content: center; align-items: center; - font-size: 24rpx; + flex-wrap: wrap; + min-height: 80rpx; box-sizing: border-box; + .stat-label { + font-size: 24rpx; + } + + .stat-value { + font-size: 28rpx; + font-weight: bold; + margin-left: 10rpx; + } + &.primary { background: linear-gradient(135deg, #005bac, #007bff); } @@ -1463,16 +1471,15 @@ export default { &.secondary { background: linear-gradient(135deg, #4682b4, #87ceeb); } +} - .card-label { - opacity: 0.9; - } - - .card-value { - font-weight: bold; - font-size: 28rpx; - margin-left: 10rpx; - } +.stat-more { + margin-left: 20rpx; + font-size: 24rpx; + color: #999; + display: flex; + align-items: center; + flex-shrink: 0; } @keyframes bling_shimmer { diff --git a/static/images/list.svg b/static/images/list.svg new file mode 100644 index 0000000..c2983ec --- /dev/null +++ b/static/images/list.svg @@ -0,0 +1 @@ +