3
0
Fork 0

feat(mine): 添加市场动态盒数请求逻辑

This commit is contained in:
woody 2025-06-12 09:39:42 +08:00
parent 26cd798485
commit cfb456cdd2
9 changed files with 734 additions and 372 deletions

View File

@ -43,3 +43,13 @@ export const getRegionAssessmentRecord = () =>
// 获取会员业绩 // 获取会员业绩
export const getMemberPerformance = () => export const getMemberPerformance = () =>
http.get('/retail-member/api/retail-member/member-achieve') 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,
})

7
package-lock.json generated
View File

@ -10,6 +10,7 @@
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"axios": "^1.5.0", "axios": "^1.5.0",
"dayjs": "^1.11.13",
"echarts": "^4.9.0", "echarts": "^4.9.0",
"file-saver": "^2.0.5", "file-saver": "^2.0.5",
"glob": "^11.0.1", "glob": "^11.0.1",
@ -1948,6 +1949,12 @@
"dev": true, "dev": true,
"peer": 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": { "node_modules/debug": {
"version": "2.6.9", "version": "2.6.9",
"resolved": "https://mirrors.cloud.tencent.com/npm/debug/-/debug-2.6.9.tgz", "resolved": "https://mirrors.cloud.tencent.com/npm/debug/-/debug-2.6.9.tgz",

View File

@ -5,6 +5,7 @@
"main": "main.js", "main": "main.js",
"dependencies": { "dependencies": {
"axios": "^1.5.0", "axios": "^1.5.0",
"dayjs": "^1.11.13",
"echarts": "^4.9.0", "echarts": "^4.9.0",
"file-saver": "^2.0.5", "file-saver": "^2.0.5",
"glob": "^11.0.1", "glob": "^11.0.1",

View File

@ -132,6 +132,14 @@
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
}, },
{
"path": "pages/mine/directPush/index",
"style": {
"navigationBarTitleText": "直推列表",
"navigationBarBackgroundColor": "#fff",
"enablePullDownRefresh": true
}
},
{ {
"path": "pages/performanceEchart/index", "path": "pages/performanceEchart/index",
"style": { "style": {

View File

@ -1,233 +1,440 @@
<template> <template>
<view class="main"> <view class="bonus-detail-page">
<scroll-view class="left_scrol_style" scroll-x="false" scroll-y="true"> <view class="header-section">
<view class="top-lists" v-if="navList.length > 0"> <!-- 今日实发合计 -->
<view v-for="(item, index) in navList" v-show="item.menuKey!=''" :key="index" <view class="summary-bar">
:class="navIndex == item.path ? 'styles' : ''" class="nav-view" @click="clickHref(item.path)"> <text class="summary-text"
{{ item.name }} >今日实发合计:
</view> <text class="summary-amount">{{
</view> formatAmount(todayTotal)
</scroll-view> }}</text></text
<view class="sum-val"> >
<view v-if="monthIncomeTotal" >本月合计: <span>{{monthIncomeTotal | toThousandthAndKeepDecimal}}</span></view> </view>
<view>昨日合计: <span>{{toSum | toThousandthAndKeepDecimal}}</span></view>
</view> <!-- 日期筛选 -->
<template> <view class="date-filter">
<sgsy v-if="navIndex==0" ref="sgsyData" :checkRule="marketList[0].isShow" :num="page.pageNum" /> <view class="date-picker-container">
<fgsy v-if="navIndex==1" ref="sgsyData" :checkRule="marketList[0].isShow" /> <view class="date-input-wrapper" @click="showStartDatePicker = true">
<hignfsy v-if="navIndex==2" ref="sgsyData" :checkRule="marketList[0].isShow" /> <text>{{ startDate || '开始时间' }}</text>
<hfsy v-if="navIndex==3" ref="sgsyData" :checkRule="marketList[0].isShow" /> </view>
<sbydsy v-if="navIndex==4" ref="sgsyData" :checkRule="marketList[0].isShow" /> <text class="separator"></text>
<fgqsy v-if="navIndex==5" ref="sgsyData" :checkRule="marketList[0].isShow" /> <view class="date-input-wrapper" @click="showEndDatePicker = true">
<ckkj v-if="navIndex==6" ref="sgsyData" :checkRule="marketList[0].isShow" /> <text>{{ endDate || '结束时间' }}</text>
</template> </view>
</view> </view>
<button class="search-button" @click="handleSearch">
<u-icon name="search" color="#ffffff" size="20" />
</button>
</view>
</view>
<!-- 奖金列表 -->
<scroll-view scroll-y class="bonus-list-scroll" @scrolltolower="loadMore">
<view v-if="bonusList.length === 0 && !loading" class="empty-state"
>暂无数据</view
>
<template v-else>
<view
v-for="(dailyBonus, index) in bonusList"
:key="index"
class="daily-bonus-card"
>
<view class="card-header">
<view class="header-left">
<u-icon
name="calendar"
size="18"
color="#333"
class="header-icon"
></u-icon>
<text class="header-title">奖金明细</text>
</view>
<text class="header-date">{{ dailyBonus.date }}</text>
</view>
<view class="card-content">
<view
v-for="item in dailyBonus.details"
:key="item.label"
class="bonus-item"
>
<text class="item-label">{{ item.label }}(¥)</text>
<text class="item-value">{{ formatAmount(item.value) }}</text>
</view>
</view>
<view class="card-footer">
<text class="subtotal-label">小计(¥)</text>
<text class="subtotal-value">{{
formatAmount(dailyBonus.subtotal)
}}</text>
</view>
</view>
</template>
<view class="scroll-footer" v-if="bonusList.length > 0">
<text v-if="loading">加载中...</text>
<text v-else-if="!hasMore">没有更多数据了</text>
</view>
</scroll-view>
<u-datetime-picker
:show="showStartDatePicker"
v-model="startDateValue"
mode="date"
@confirm="onStartDateConfirm"
@cancel="showStartDatePicker = false"
style="flex: 0"
></u-datetime-picker>
<u-datetime-picker
:show="showEndDatePicker"
v-model="endDateValue"
mode="date"
@confirm="onEndDateConfirm"
@cancel="showEndDatePicker = false"
style="flex: 0"
></u-datetime-picker>
</view>
</template> </template>
<script> <script>
import * as api from '@/config/login.js' // : API
import * as apis from '@/config/market.js' // import { getBonusDetailsByDate, getTodayBonusTotal } from '@/config/bonus.js';
import * as api1 from '@/config/bonus.js' import dayjs from 'dayjs'
import {
setToken export default {
} from '@/config/auth.js' data() {
import store from '@/store' return {
import sgsy from '@/components/bonus/sgsy.vue' todayTotal: 0,
import fgsy from '@/components/bonus/fgsy.vue' startDate: '',
import hignfsy from '@/components/bonus/hignfsy.vue' endDate: '',
import hfsy from '@/components/bonus/hfsy.vue' showStartDatePicker: false,
import sbydsy from '@/components/bonus/sbydsy.vue' showEndDatePicker: false,
import fgqsy from '@/components/bonus/fgqsy.vue' startDateValue: Number(new Date()),
import ckkj from '@/components/bonus/ckkj.vue' endDateValue: Number(new Date()),
export default { bonusList: [],
data() { loading: false,
return { hasMore: true,
toSum: 0, page: {
index: null, pageNum: 1,
userInfo: [], pageSize: 10,
marketList: [{ },
text: '奖金来源', }
id: 3, },
path: "/marketDynamics", onLoad() {
name: 'bonusSource', this.setDefaultDateRange()
isShow: false, this.handleSearch()
}, ], },
navList: [{ methods: {
name: '首购收益', formatAmount(amount) {
path: 0, if (typeof amount !== 'number') {
value: "firstPurchase", return '0.00'
menuKey: '' }
}, return amount.toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g, ',')
{ },
name: '复购收益', setDefaultDateRange() {
path: 1, const end = new Date()
value: "repurchaseEarnings", const start = new Date()
menuKey: '' start.setDate(end.getDate() - 7) // 7
}, this.startDate = this.formatDate(start)
{ this.endDate = this.formatDate(end)
name: '海粉收益', this.startDateValue = Number(start)
path: 2, this.endDateValue = Number(end)
value: "hignFans", },
menuKey: '' formatDate(date) {
}, return dayjs(date).format('YYYY-MM-DD')
{ },
name: '海粉收益', goBack() {
path: 3, uni.navigateBack()
value: "seaFans", },
menuKey: '' handleSearch() {
}, //
// { name: '',path:4,value:"sbyd",menuKey:''}, if (
{ this.startDate &&
name: '复购券收益', this.endDate &&
path: 5, new Date(this.startDate) > new Date(this.endDate)
value: "repurchaseTicket", ) {
menuKey: '' uni.showToast({
}, title: '开始时间不能晚于结束时间',
// { icon: 'none',
// name: '', })
// path: 6, return
// value: "markerSpaceEarnings", }
// menuKey: '' this.page.pageNum = 1
// }, this.bonusList = []
], this.hasMore = true
navIndex: 0, this.fetchBonusData()
page: { },
pageSize: 50, onStartDateConfirm(e) {
pageNum: 1, this.startDate = this.formatDate(new Date(e.value))
}, this.startDateValue = e.value
monthIncomeTotal: 0, this.showStartDatePicker = false
} },
}, onEndDateConfirm(e) {
components: { this.endDate = this.formatDate(new Date(e.value))
sgsy, this.endDateValue = e.value
fgsy, this.showEndDatePicker = false
hignfsy, },
hfsy, loadMore() {
sbydsy, if (this.loading || !this.hasMore) {
fgqsy, return
ckkj }
}, this.page.pageNum++
onLoad() { this.fetchBonusData()
this.getMenuLists() },
this.getSum() //
}, async fetchBonusData() {
methods: { if (this.loading) return
getSum() { this.loading = true
api1.queryBonusTotal({}).then((res) => {
console.log(res, '....res====aa') // API
this.toSum = res.rows[0].realIncomeTotal await new Promise(resolve => setTimeout(resolve, 800))
this.monthIncomeTotal = res.rows[0].monthIncomeTotal
}) // TODO: API
}, // :
bindPickerChange(e) { // try {
this.index = e.detail.value // const params = { startDate: this.startDate, endDate: this.endDate, pageNum: this.page.pageNum, pageSize: this.page.pageSize };
}, // const res = await getBonusDetailsByDate(params);
clickHref(index) { // if (res.data.list.length < this.page.pageSize) {
let that = this; // this.hasMore = false;
this.navIndex = index // }
this.page.pageNum = 1 // this.bonusList = [...this.bonusList, ...res.data.list];
}, // } catch (error) {
getMenuLists() { // console.error("Failed to fetch bonus data:", error);
api.menuList().then((res) => { // uni.showToast({ title: '', icon: 'none' });
res.data.forEach((item) => { // } finally {
this.navList.forEach((items) => { // this.loading = false;
if (item.menuKey == items.value) { // }
items.menuKey = item.menuKey
} // --- ---
}) this.todayTotal = Math.random() * 1000
if (this.marketList[0].name == item.menuKey) { const mockData = []
this.marketList[0].isShow = true // ""
} if (this.page.pageNum > 3) {
}) this.hasMore = false
}) this.loading = false
}, return
// async onReachBottom() { }
// this.page.pageNum+1
// this.$refs.sgsyData.getDataList(this.page.pageNum+=1); if (this.startDate && this.endDate) {
// }, //
}, for (let i = 0; i < this.page.pageSize; i++) {
} const dayOffset = (this.page.pageNum - 1) * this.page.pageSize + i
const date = dayjs(this.endDate).subtract(dayOffset, 'day')
if (date.isBefore(dayjs(this.startDate))) {
this.hasMore = false
break
}
const subtotal = Math.random() * 500
mockData.push({
date: date.format('YYYY-MM-DD'),
details: [
{ label: '级差收益', value: Math.random() * 100 },
{ label: '平级收益', value: Math.random() * 200 },
{ label: '区域收益', value: 0 },
{ label: '福利级差收益', value: 0 },
{ label: '福利分红收益', value: 0 },
{ label: '重消收益', value: Math.random() * 50 },
],
subtotal: subtotal,
})
}
}
if (mockData.length < this.page.pageSize) {
this.hasMore = false
}
this.bonusList = [...this.bonusList, ...mockData]
// --- ---
this.loading = false
},
},
}
</script> </script>
<style lang="scss"> <style lang="scss">
.sum-val { page {
background-color: #fff; background-color: #f7f7f8;
// height: 100rpx; font-family:
line-height: 60rpx; -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue',
text-align: right; Arial, sans-serif;
margin-top: 10rpx; height: 100%;
padding-right: 20rpx; }
display: flex;
flex-direction: column;
align-items: flex-end;
justify-content: flex-end;
span {
font-size: 34rpx;
font-weight: bold;
margin-left: 10rpx;
}
}
/*左侧分类视图*/ .bonus-detail-page {
.left_scrol_style { display: flex;
white-space: nowrap; flex-direction: column;
width: 100%; height: 100%;
background: #fff; }
}
.texts { .header-section {
color: #333; flex-shrink: 0;
font-size: 26rpx; background-color: #ffffff;
overflow: hidden; }
white-space: nowrap;
text-overflow: ellipsis;
/* width:200rpx; */
text-align: right;
}
.select-text { .summary-bar {
display: flex; display: flex;
margin-right: 20rpx; align-items: center;
font-size: 26rpx; padding: 10px 15px;
color: #333; background-color: #e6f7ff;
position: relative; border: 1px solid #91d5ff;
} border-radius: 4px;
margin: 10px 15px;
.summary-text {
margin-left: 8px;
font-size: 14px;
color: #333;
}
.summary-amount {
font-weight: bold;
font-size: 16px;
margin-left: 5px;
}
}
.selIcon { .date-filter {
width: 30rpx; display: flex;
height: 30rpx; align-items: center;
margin: 5rpx 0 0 20rpx; padding: 0 15px 10px;
} background-color: #ffffff;
page { .date-picker-container {
background-color: #f2f2f2; flex: 1;
} display: flex;
align-items: center;
background-color: #f2f2f2;
border-radius: 8px;
padding: 4px;
.date-input-wrapper {
flex: 1;
text-align: center;
padding: 6px 0;
font-size: 14px;
color: #333;
}
.separator {
color: #999;
margin: 0 5px;
}
}
.styles { .search-button {
border: none !important; width: 44px;
color: #fff !important; height: 36px;
background: #005BAC; margin-left: 10px;
} background-color: #007aff;
color: white;
display: flex;
align-items: center;
justify-content: center;
border-radius: 4px;
padding: 0;
line-height: 1;
border: none;
&:after {
border: none;
}
}
}
.top-lists { .bonus-list-scroll {
width: fit-content; flex: 1;
display: flex; height: 0; // for flexbox to correctly size the scroll view
padding: 30rpx 30rpx 0 0; }
background-color: #fff;
height: 80rpx;
line-height: 80rpx;
.nav-view { .empty-state {
width: 200rpx; text-align: center;
cursor: pointer; color: #999;
padding: 0 26rpx; padding-top: 50px;
height: 44rpx; }
border-radius: 10rpx;
border: 1rpx solid #999999; .daily-bonus-card {
font-size: 14rpx; background-color: #ffffff;
text-align: center; border-radius: 12px;
line-height: 44rpx; margin: 12px 15px;
margin-left: 20rpx; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
color: #999; overflow: hidden;
} border: 1px solid #f0f0f0;
} transition: all 0.2s ease-in-out;
</style> &: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;
}
</style>

View File

@ -136,7 +136,7 @@ export default {
// //
return 'status-fail' return 'status-fail'
} }
return '' return 'status-success'
}, },
}, },
} }
@ -182,6 +182,9 @@ export default {
.status-fail { .status-fail {
color: #fa3534; color: #fa3534;
} }
.status-success {
color: #00b42a;
}
} }
.card-footer { .card-footer {

View File

@ -0,0 +1,118 @@
<template>
<view class="container">
<view class="list">
<view class="list-item" v-for="item in list" :key="item.memberCode">
<view class="item-row">
<text class="label">会员编号</text>
<text class="value">{{ item.memberCode }}</text>
</view>
<view class="item-row">
<text class="label">会员手机号</text>
<text class="value">{{ item.phone }}</text>
</view>
<view class="item-row">
<text class="label">结算等级</text>
<text class="value">{{ item.settleGradeVal }}</text>
</view>
<view class="item-row">
<text class="label">会员昵称</text>
<text class="value">{{ item.nickName }}</text>
</view>
<view class="item-row">
<text class="label">创建时间</text>
<text class="value">{{ item.creationTime }}</text>
</view>
</view>
</view>
<view class="load-more">
<text v-if="status === 'loading'">加载中...</text>
<text v-if="status === 'nomore'">没有更多数据了</text>
</view>
</view>
</template>
<script>
import { getDirectPushList } from '@/config/mine'
export default {
name: 'DirectPush',
data() {
return {
list: [],
pageNum: 1,
pageSize: 10,
total: 0,
status: 'loading', // loading, loadmore, nomore
}
},
onLoad() {
uni.setNavigationBarTitle({
title: '服务列表',
})
this.getDirectPushList()
},
onReachBottom() {
if (this.status === 'nomore' || this.status === 'loading') {
return
}
this.pageNum++
this.getDirectPushList()
},
methods: {
getDirectPushList() {
this.status = 'loading'
getDirectPushList({
pageNum: this.pageNum,
pageSize: this.pageSize,
})
.then(res => {
this.list = this.list.concat(res.rows)
this.total = res.total
if (this.list.length >= this.total) {
this.status = 'nomore'
} else {
this.status = 'loadmore'
}
})
.catch(() => {
if (this.pageNum > 1) {
this.pageNum--
}
this.status = 'loadmore'
})
},
},
}
</script>
<style lang="scss" scoped>
.container {
background-color: #f0f2f5;
min-height: 100vh;
padding-top: 1rpx;
}
.list-item {
background-color: #ffffff;
margin: 16rpx 24rpx;
padding: 16rpx 24rpx;
border-radius: 8rpx;
}
.item-row {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12rpx 0;
font-size: 28rpx;
.label {
color: #8c8c8c;
}
.value {
color: #303133;
}
}
.load-more {
text-align: center;
color: #999;
padding: 20rpx 0;
font-size: 24rpx;
}
</style>

View File

@ -23,19 +23,28 @@
<view class="tTit1">{{ userInfo.memberCode }}</view> <view class="tTit1">{{ userInfo.memberCode }}</view>
</view> </view>
<view class="level_box"> <view class="level_box">
<view class="level_tag"> <view class="level_tag level_tag--primary">
<u-icon name="star" color="#fff" size="14"></u-icon> <u-icon name="level" color="#A77B09" size="14"></u-icon>
<text class="level_label">当月级别</text> <text class="level_label">会员等级</text>
<text class="level_value">{{ <text class="level_value">{{
userInfo.pkGradeVal || '-' userInfo.pkGradeVal || '-'
}}</text> }}</text>
</view> </view>
<view class="level_tag"> <view style="display: flex; gap: 10rpx">
<u-icon name="level" color="#fff" size="14"></u-icon> <view class="level_tag">
<text class="level_label">荣誉级别</text> <u-icon name="star" color="#005BAC" size="14"></u-icon>
<text class="level_value">{{ <text class="level_label">当月奖衔</text>
userInfo.pkAwardsVal || '-' <text class="level_value">{{
}}</text> userInfo.pkAwardsVal || '-'
}}</text>
</view>
<view class="level_tag">
<u-icon name="star" color="#005BAC" size="14"></u-icon>
<text class="level_label">荣誉奖衔</text>
<text class="level_value">{{
userInfo.pkMaxAwardsVal || '-'
}}</text>
</view>
</view> </view>
</view> </view>
</view> </view>
@ -205,22 +214,22 @@
</view> </view>
<view class="region-info-box"> <view class="region-info-box">
<view class="region-info-item"> <view class="region-info-item">
<text class="region-info-label">{{ '省' }}</text>
<text class="region-info-value">{{ <text class="region-info-value">{{
regionInfo.provinceVal || '-' regionInfo.provinceVal || '-'
}}</text> }}</text>
<text class="region-info-label">{{ '省' }}</text>
</view> </view>
<view class="region-info-item"> <view class="region-info-item">
<text class="region-info-label">{{ '市' }}</text>
<text class="region-info-value">{{ <text class="region-info-value">{{
regionInfo.cityVal || '-' regionInfo.cityVal || '-'
}}</text> }}</text>
<text class="region-info-label">{{ '市' }}</text>
</view> </view>
<view class="region-info-item"> <view class="region-info-item">
<text class="region-info-label">{{ '区' }}</text>
<text class="region-info-value">{{ <text class="region-info-value">{{
regionInfo.countyVal || '-' regionInfo.countyVal || '-'
}}</text> }}</text>
<text class="region-info-label">{{ '区' }}</text>
</view> </view>
</view> </view>
</view> </view>
@ -229,37 +238,49 @@
<view class="my_order" v-if="marketWrapperVisible"> <view class="my_order" v-if="marketWrapperVisible">
<view class="my_title"> <view class="my_title">
<text class="thetitle">{{ '市场动态' }}</text> <text class="thetitle">{{ '市场动态' }}</text>
<view
class="findallorder"
@click="goTo('/pages/performanceEchart/index')"
>
<text>更多</text>
<u-icon name="arrow-right" color="#999999" size="16rpx"></u-icon>
</view>
</view> </view>
<view class="market-cards-container"> <view class="market-stats-container">
<view class="market-card-row"> <view class="stat-row">
<view class="market-card primary"> <view class="stat-cards">
<text class="card-label">总业绩</text> <view class="stat-card primary">
<text class="card-value">{{ <text class="stat-label">总业绩</text>
performanceData.totalPerformance || '0.0000' <text class="stat-value">{{
}}</text> performanceData.totalSumPv || '0.00'
}}</text>
</view>
<view class="stat-card secondary">
<text class="stat-label">小区</text>
<text class="stat-value">{{
performanceData.smallAreaPv || '0.00'
}}</text>
</view>
</view> </view>
<view class="market-card secondary"> <view
<text class="card-label">小区</text> class="stat-more"
<text class="card-value">{{ @click="goTo('/pages/performanceEchart/index')"
performanceData.smallAreaPerformance || '0.0000' >
}}</text> <text>更多</text>
<u-icon name="arrow-right" color="#999999" size="14rpx"></u-icon>
</view> </view>
</view> </view>
<view class="market-card-row"> <view class="stat-row">
<view class="market-card primary"> <view class="stat-cards">
<text class="card-label">总盒数</text> <view class="stat-card primary">
<text class="card-value">{{ totalBox || '0' }}</text> <text class="stat-label">总盒数</text>
<text class="stat-value">{{
performanceData.totalBox || '0'
}}</text>
</view>
<view class="stat-card secondary">
<text class="stat-label">小区盒数</text>
<text class="stat-value">{{
performanceData.smallAreaBox || '0'
}}</text>
</view>
</view> </view>
<view class="market-card secondary"> <view class="stat-more" @click="goTo('/pages/mine/order/index')">
<text class="card-label">小区盒数</text> <text>更多</text>
<text class="card-value">{{ smallAreaBox || '0' }}</text> <u-icon name="arrow-right" color="#999999" size="14rpx"></u-icon>
</view> </view>
</view> </view>
</view> </view>
@ -444,7 +465,14 @@ export default {
name: '我的钱包', name: '我的钱包',
imgurl: '../../static/images/my_icon1.png', imgurl: '../../static/images/my_icon1.png',
menuKey: 'wallet', menuKey: 'wallet',
ifshow: false, ifshow: true,
},
{
url: '/pages/bonus/index',
name: '奖金明细',
imgurl: '../../static/images/mark2.png',
menuKey: 'incomeDetail',
ifshow: true,
}, },
{ {
url: '/pages/ticket/index', url: '/pages/ticket/index',
@ -459,12 +487,12 @@ export default {
name: '自助服务', name: '自助服务',
imgurl: '../../static/images/my_icon6.png', imgurl: '../../static/images/my_icon6.png',
menuKey: 'selfHelp', menuKey: 'selfHelp',
ifshow: false, ifshow: true,
}, },
{ {
url: '/pages/mine/share/index', url: '/pages/mine/share/index',
name: '个人推广', name: '个人推广',
imgurl: '../../static/images/promotion.svg', imgurl: '../../static/images/list.svg',
menuKey: 'share', menuKey: 'share',
ifshow: true, ifshow: true,
}, },
@ -473,28 +501,35 @@ export default {
name: '账号安全', name: '账号安全',
imgurl: '../../static/images/my_icon8.png', imgurl: '../../static/images/my_icon8.png',
menuKey: '', menuKey: '',
ifshow: false, ifshow: true,
}, },
{ {
url: '/pages/addressList/index', url: '/pages/addressList/index',
name: '地址管理', name: '地址管理',
imgurl: '../../static/images/my_icon9.png', imgurl: '../../static/images/my_icon9.png',
menuKey: '', menuKey: '',
ifshow: false, ifshow: true,
},
{
url: '/pages/mine/directPush/index',
name: '直推列表',
imgurl: '../../static/images/mark5.png',
menuKey: '',
ifshow: true,
}, },
{ {
url: '/pages/mine/bindBank/index', url: '/pages/mine/bindBank/index',
name: '银行信息', name: '银行信息',
imgurl: '../../static/images/my_icon10.png', imgurl: '../../static/images/my_icon10.png',
menuKey: '', menuKey: '',
ifshow: false, ifshow: true,
}, },
{ {
url: '/pages/bonus/regional-assessment/index', url: '/pages/bonus/regional-assessment/index',
name: '区域考核', name: '区域考核',
imgurl: '../../static/images/mark5.png', imgurl: '../../static/images/mark5.png',
menuKey: '', menuKey: '',
ifshow: false, ifshow: true,
}, },
// { // {
// url: '/pages/mine/addNewPv/index', // url: '/pages/mine/addNewPv/index',
@ -513,15 +548,18 @@ export default {
smallAreaBox: 0, smallAreaBox: 0,
totalBox: 0, totalBox: 0,
performanceData: {}, performanceData: {},
marketDynamicBoxInfo: {},
} }
}, },
onShow() { onShow() {
this.getInfo() this.getInfo().finally(() => {
this.orderNum() this.orderNum()
this.getRegionSelect() this.getRegionSelect()
this.getMemberBoxCount() this.getMemberBoxCount()
this.fetchMemberPerformance() this.fetchMemberPerformance()
// this.getUserAwardss() this.getMarketDynamicBoxCount()
// this.getUserAwardss()
})
}, },
computed: { computed: {
@ -637,43 +675,21 @@ export default {
}) })
}, },
getInfo() { getInfo() {
api.getInfo().then(res => { return new Promise(resolve => {
if (res) { api.getInfo().then(res => {
this.userInfo = res.data if (res.code == 200) {
if (this.userInfo.memberCode == 'CN68880628') { this.userInfo = res.data
this.ifSpecial = true resolve()
if (this.userInfo.memberCode == 'CN68880628') {
this.ifSpecial = true
} else {
this.ifSpecial = false
}
} else { } 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) { goTo(url) {
if (url == 1) { if (url == 1) {
@ -687,6 +703,13 @@ export default {
}) })
} }
}, },
getMarketDynamicBoxCount() {
getMarketDynamicBoxCount().then(res => {
if (res.code == 200) {
this.marketDynamicBoxInfo = res.data
}
})
},
goOrder(index) { goOrder(index) {
// //
uni.navigateTo({ uni.navigateTo({
@ -714,7 +737,9 @@ export default {
}) })
}, },
getMemberBoxCount() { getMemberBoxCount() {
getMemberBoxCount().then(res => { getMemberBoxCount({
pkBigMember: this.userInfo.memberCode,
}).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.totalBox = res.data?.totalBox || 0 this.totalBox = res.data?.totalBox || 0
this.smallAreaBox = res.data?.smallAreaBox || 0 this.smallAreaBox = res.data?.smallAreaBox || 0
@ -763,34 +788,6 @@ export default {
color: #666666; color: #666666;
margin-right: 8rpx; 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 { .jugrade_flex {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@ -1092,17 +1089,14 @@ export default {
.level_box { .level_box {
display: flex; display: flex;
flex-direction: row; flex-direction: column;
align-items: center; align-items: flex-start;
flex-wrap: wrap; gap: 10rpx;
gap: 16rpx;
} }
.level_tag { .level_tag {
background: rgba(255, 255, 255, 0.2); background: linear-gradient(145deg, #c5d8e8, #afc8de, #9ab5d0);
backdrop-filter: blur(10rpx); border: 1rpx solid #8ca3b8;
-webkit-backdrop-filter: blur(10rpx);
border: 1rpx solid rgba(255, 255, 255, 0.3);
padding: 6rpx 18rpx; padding: 6rpx 18rpx;
border-radius: 50px; border-radius: 50px;
display: inline-flex; display: inline-flex;
@ -1110,23 +1104,19 @@ export default {
gap: 10rpx; gap: 10rpx;
position: relative; position: relative;
overflow: hidden; 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 { .level_tag--primary {
content: ''; background: linear-gradient(145deg, #fde468, #fad02c, #e5b40a);
position: absolute; border: 1rpx solid #c8a000;
top: 0; color: #5d4203;
left: 0; box-shadow:
width: 100%; inset 0 1px 1px rgba(255, 255, 255, 0.4),
height: 100%; 0 1px 2px rgba(0, 0, 0, 0.15);
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_label { .level_label {
@ -1370,7 +1360,7 @@ export default {
.region-info-label { .region-info-label {
font-size: 24rpx; font-size: 24rpx;
color: #999; color: #999;
margin-top: 10rpx; margin-bottom: 10rpx;
} }
.region-info-value { .region-info-value {
@ -1384,7 +1374,7 @@ export default {
box-shadow: 0rpx 6rpx 24rpx rgba(0, 0, 0, 0.06); box-shadow: 0rpx 6rpx 24rpx rgba(0, 0, 0, 0.06);
border-radius: 24rpx; border-radius: 24rpx;
margin-top: 20rpx; margin-top: 20rpx;
padding: 30rpx; padding: 20rpx;
} }
.info-grid { .info-grid {
@ -1431,12 +1421,13 @@ export default {
color: #999999; color: #999999;
} }
.market-cards-container { .market-stats-container {
padding: 20rpx 0; padding: 20rpx 0;
} }
.market-card-row { .stat-row {
display: flex; display: flex;
align-items: center;
justify-content: space-between; justify-content: space-between;
margin-bottom: 20rpx; margin-bottom: 20rpx;
@ -1445,17 +1436,34 @@ export default {
} }
} }
.market-card { .stat-cards {
width: 48%; display: flex;
gap: 20rpx;
flex: 1;
}
.stat-card {
flex: 1;
padding: 20rpx; padding: 20rpx;
border-radius: 10rpx; border-radius: 10rpx;
color: #fff; color: #fff;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
font-size: 24rpx; flex-wrap: wrap;
min-height: 80rpx;
box-sizing: border-box; box-sizing: border-box;
.stat-label {
font-size: 24rpx;
}
.stat-value {
font-size: 28rpx;
font-weight: bold;
margin-left: 10rpx;
}
&.primary { &.primary {
background: linear-gradient(135deg, #005bac, #007bff); background: linear-gradient(135deg, #005bac, #007bff);
} }
@ -1463,16 +1471,15 @@ export default {
&.secondary { &.secondary {
background: linear-gradient(135deg, #4682b4, #87ceeb); background: linear-gradient(135deg, #4682b4, #87ceeb);
} }
}
.card-label { .stat-more {
opacity: 0.9; margin-left: 20rpx;
} font-size: 24rpx;
color: #999;
.card-value { display: flex;
font-weight: bold; align-items: center;
font-size: 28rpx; flex-shrink: 0;
margin-left: 10rpx;
}
} }
@keyframes bling_shimmer { @keyframes bling_shimmer {

1
static/images/list.svg Normal file
View File

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1749643527528" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5087" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M402.60608 153.088h500.736c39.424 0 71.68 32.256 71.68 71.68s-32.256 71.68-71.68 71.68h-500.736c-39.424 0-71.68-32.256-71.68-71.68 0.512-39.424 32.256-71.68 71.68-71.68zM402.60608 475.136h500.736c39.424 0 71.68 32.256 71.68 71.68s-32.256 71.68-71.68 71.68h-500.736c-39.424 0-71.68-32.256-71.68-71.68 0.512-39.424 32.256-71.68 71.68-71.68zM384.68608 833.024h536.576c29.696 0 53.76 24.064 53.76 53.76s-24.064 53.76-53.76 53.76h-536.576c-29.696 0-53.76-24.064-53.76-53.76 0.512-29.696 24.576-53.76 53.76-53.76z" fill="#f52a10" p-id="5088"></path><path d="M396.8 320h515.584c51.712 0 93.696-41.984 93.696-93.696 0-51.712-41.984-93.696-93.696-93.696H396.8c-51.712 0-93.696 41.984-93.696 93.696 0 51.712 41.984 93.696 93.696 93.696z m0-140.8h515.584c26.112 0 47.104 20.992 47.104 46.592 0 26.112-20.992 47.104-46.592 47.104H396.8c-26.112 0-47.104-20.992-47.104-46.592 0.512-26.112 21.504-47.104 47.104-47.104zM162.816 132.608c-51.712 0-93.696 41.984-93.696 93.696 0 51.712 41.984 93.696 93.696 93.696s93.696-41.984 93.696-93.696c0-51.712-41.984-93.696-93.696-93.696z m0 140.288c-26.112 0-47.104-20.992-47.104-47.104s20.992-47.104 47.104-47.104S209.92 199.68 209.92 225.792c-0.512 26.112-21.504 47.104-47.104 47.104zM912.384 460.8H396.8c-51.712 0-93.696 41.984-93.696 93.696 0 51.712 41.984 93.696 93.696 93.696h515.584c51.712 0 93.696-41.984 93.696-93.696 0.512-51.712-41.472-93.696-93.696-93.696z m0 140.288H396.8c-26.112 0-47.104-20.992-47.104-46.592 0-26.112 20.992-47.104 46.592-47.104h515.584c26.112 0 47.104 20.992 47.104 46.592 0.512 26.112-20.48 47.104-46.592 47.104 0.512 0 0.512 0 0 0zM162.816 460.8c-51.712 0-93.696 41.984-93.696 93.696s41.984 93.696 93.696 93.696 93.696-41.984 93.696-93.696c0-52.224-41.984-93.696-93.696-93.696z m0 140.288c-26.112 0-47.104-20.992-47.104-47.104s20.992-47.104 47.104-47.104 47.104 20.992 47.104 47.104c-0.512 26.112-21.504 47.104-47.104 47.104zM912.384 788.48H396.8c-51.712 0-93.696 41.984-93.696 93.696 0 51.712 41.984 93.696 93.696 93.696h515.584c51.712 0 93.696-41.984 93.696-93.696 0.512-51.712-41.472-93.696-93.696-93.696z m0 140.8H396.8c-26.112 0-47.104-20.992-47.104-46.592 0-26.112 20.992-47.104 46.592-47.104h515.584c26.112 0 47.104 20.992 47.104 46.592 0.512 26.112-20.48 47.104-46.592 47.104 0.512 0 0.512 0 0 0zM162.816 788.48c-51.712 0-93.696 41.984-93.696 93.696 0 51.712 41.984 93.696 93.696 93.696s93.696-41.984 93.696-93.696c0-51.712-41.984-93.696-93.696-93.696z m0 140.8c-26.112 0-47.104-20.992-47.104-47.104s20.992-47.104 47.104-47.104 47.104 20.992 47.104 47.104c-0.512 26.112-21.504 47.104-47.104 47.104z" fill="#f52a10" p-id="5089"></path></svg>

After

Width:  |  Height:  |  Size: 2.9 KiB