first commit
This commit is contained in:
@@ -0,0 +1,369 @@
|
||||
<template>
|
||||
<view class="income-container">
|
||||
<!-- 收入概览区域 -->
|
||||
<view class="income-overview">
|
||||
<view class="income-header">
|
||||
<text class="income-title">今日已赚</text>
|
||||
<text class="income-amount">¥86.50</text>
|
||||
</view>
|
||||
|
||||
<!-- 时间选择标签 -->
|
||||
<view class="time-tabs">
|
||||
<text v-for="(item ,index) in timeList" :key="index" @click="changeTab(index)"
|
||||
:class="{ 'active':currentTime==index }" class="tab-item">{{item}}</text>
|
||||
</view>
|
||||
<text class="month-total">本月累计¥1,240.00</text>
|
||||
</view>
|
||||
|
||||
<!-- 收入构成区域 -->
|
||||
<view class="income-composition">
|
||||
<!-- 饼图占位区域 -->
|
||||
<view class="pie-chart-placeholder">
|
||||
<view id="cahrt" class="pie-chart">
|
||||
<!-- 黑边白底的饼图占位 -->
|
||||
</view>
|
||||
<view class="chart-legend">
|
||||
<view class="legend-item">
|
||||
<view class="legend-dot blue"></view>
|
||||
<text class="legend-text">配送费¥60.50</text>
|
||||
</view>
|
||||
<view class="legend-item">
|
||||
<view class="legend-dot orange"></view>
|
||||
<text class="legend-text">冲单奖¥20.00</text>
|
||||
</view>
|
||||
<view class="legend-item">
|
||||
<view class="legend-dot green"></view>
|
||||
<text class="legend-text">恶劣天气补贴¥6.00</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 钱包区域 -->
|
||||
<view class="wallet-section">
|
||||
<view class="wallet-header">
|
||||
<text class="wallet-title">钱包余额</text>
|
||||
<text class="wallet-amount">¥86.50</text>
|
||||
</view>
|
||||
<u-button class="withdraw-button" type="primary">立即提现</u-button>
|
||||
<text class="withdraw-tip">提现到账时间: T+1工作日</text>
|
||||
</view>
|
||||
|
||||
<!-- 收入明细区域 -->
|
||||
<view class="detail-header">
|
||||
<text class="detail-title">收入明细</text>
|
||||
</view>
|
||||
<view class="detail-list" v-for="(item, index) in 3" :key="index">
|
||||
<view class="detail-content">
|
||||
<view class="icon-placeholder">
|
||||
<image src="/static/index/income/order.png"
|
||||
style="width: 55rpx; height: 55rpx;" mode=""></image>
|
||||
</view>
|
||||
<view class="detail-info">
|
||||
<text class="order-id">订单 MT20251020123456</text>
|
||||
<text class="order-time">10-20 18:35</text>
|
||||
</view>
|
||||
<text class="order-amount">+¥5.50</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import { ref, onMounted } from 'vue';
|
||||
import * as echarts from 'echarts';
|
||||
import { Service } from '@/Service/Service';
|
||||
|
||||
let timeList = ref([
|
||||
'今日',
|
||||
'本周',
|
||||
'本月'
|
||||
])
|
||||
|
||||
let currentTime = ref(0)
|
||||
|
||||
let option = ref({
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
legend: {
|
||||
top: '5%',
|
||||
left: 'center'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: 'Access From',
|
||||
type: 'pie',
|
||||
radius: ['40%', '70%'],
|
||||
avoidLabelOverlap: true,
|
||||
label: {
|
||||
show: false,
|
||||
position: 'center'
|
||||
},
|
||||
emphasis: {
|
||||
label: {
|
||||
show: false,
|
||||
fontSize: 40,
|
||||
fontWeight: 'bold'
|
||||
}
|
||||
},
|
||||
labelLine: {
|
||||
show: false
|
||||
},
|
||||
data: [
|
||||
{ value: 1048 },
|
||||
{ value: 735 },
|
||||
{ value: 580 },
|
||||
{ value: 484},
|
||||
{ value: 300 }
|
||||
]
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
onLoad(() => {
|
||||
|
||||
})
|
||||
onMounted(()=>{
|
||||
let chartDom =ref( document.getElementById('cahrt'))
|
||||
let myChart = ref(echarts.init(chartDom.value))
|
||||
myChart.value.setOption(option.value);
|
||||
})
|
||||
const changeTab = (index : number) => {
|
||||
currentTime.value = index
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.income-container {
|
||||
padding: 20rpx;
|
||||
background-color: #f5f5f5;
|
||||
min-height: 100vh;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* 收入概览区域 */
|
||||
.income-overview {
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding: 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.income-header {
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.income-title {
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
display: block;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.income-amount {
|
||||
font-size: 48rpx;
|
||||
font-weight: bold;
|
||||
color: #ff4d4f;
|
||||
}
|
||||
|
||||
/* 时间标签 */
|
||||
.time-tabs {
|
||||
display: flex;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.tab-item {
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
margin-right: 40rpx;
|
||||
padding-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.tab-item.active {
|
||||
color: #1890ff;
|
||||
border-bottom: 3rpx solid #1890ff;
|
||||
}
|
||||
|
||||
.month-total {
|
||||
font-size: 26rpx;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
/* 收入构成区域 */
|
||||
.income-composition {
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding: 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
/* 饼图占位 */
|
||||
.pie-chart-placeholder {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.pie-chart {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
margin-right: 30rpx;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
.chart-legend {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.legend-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 15rpx;
|
||||
}
|
||||
|
||||
.legend-dot {
|
||||
width: 16rpx;
|
||||
height: 16rpx;
|
||||
border-radius: 50%;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.legend-dot.blue {
|
||||
background-color: #1890ff;
|
||||
}
|
||||
|
||||
.legend-dot.orange {
|
||||
background-color: #fa8c16;
|
||||
}
|
||||
|
||||
.legend-dot.green {
|
||||
background-color: #52c41a;
|
||||
}
|
||||
|
||||
.legend-text {
|
||||
font-size: 26rpx;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
/* 钱包区域 */
|
||||
.wallet-section {
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding: 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.wallet-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.wallet-title {
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.wallet-amount {
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
color: #ff4d4f;
|
||||
}
|
||||
|
||||
.withdraw-button {
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
font-size: 32rpx;
|
||||
border-radius: 40rpx;
|
||||
background-color: #1890ff;
|
||||
color: #fff;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.withdraw-tip {
|
||||
display: block;
|
||||
font-size: 22rpx;
|
||||
color: #999;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* 收入明细区域 */
|
||||
.income-detail {
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding: 30rpx;
|
||||
}
|
||||
|
||||
.detail-header {
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.detail-title {
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
|
||||
.detail-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.detail-list {
|
||||
margin: 15rpx 0 0;
|
||||
background-color: #fff;
|
||||
padding: 20rpx 30rpx;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
/* 图标占位符 - 黑边白底 */
|
||||
.icon-placeholder {
|
||||
width: 70rpx;
|
||||
height: 70rpx;
|
||||
background-color: #E6F7FF;
|
||||
border-radius: 8rpx;
|
||||
margin-right: 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.detail-info {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.order-id {
|
||||
display: block;
|
||||
font-size: 26rpx;
|
||||
color: #333;
|
||||
margin-bottom: 5rpx;
|
||||
}
|
||||
|
||||
.order-time {
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.order-amount {
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
color: #ff4d4f;
|
||||
}
|
||||
|
||||
/* 没有更多记录 */
|
||||
.no-more {
|
||||
text-align: center;
|
||||
padding: 40rpx 0;
|
||||
}
|
||||
|
||||
.no-more-text {
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
}
|
||||
</style>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 474 B |
@@ -0,0 +1,655 @@
|
||||
<template>
|
||||
|
||||
<!-- 骨架屏状态 -->
|
||||
<view v-if="loading" class="skeleton-loading">
|
||||
<!-- 收入概览骨架屏 -->
|
||||
<view class="skeleton-card income-overview">
|
||||
<view class="skeleton-income-title"></view>
|
||||
<view class="skeleton-income-amount"></view>
|
||||
<view class="skeleton-time-tabs">
|
||||
<view class="skeleton-tab-item"></view>
|
||||
<view class="skeleton-tab-item"></view>
|
||||
<view class="skeleton-tab-item"></view>
|
||||
</view>
|
||||
<view class="skeleton-month-total"></view>
|
||||
</view>
|
||||
|
||||
<!-- 收入构成骨架屏 -->
|
||||
<view class="skeleton-card income-composition">
|
||||
<view class="skeleton-pie-container">
|
||||
<view class="skeleton-pie-chart"></view>
|
||||
<view class="skeleton-legend-list">
|
||||
<view class="skeleton-legend-item" v-for="item in 3">
|
||||
<view class="skeleton-legend-dot"></view>
|
||||
<view class="skeleton-legend-text"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 钱包区域骨架屏 -->
|
||||
<view class="skeleton-card wallet-section">
|
||||
<view class="skeleton-wallet-header">
|
||||
<view class="skeleton-wallet-title"></view>
|
||||
<view class="skeleton-wallet-amount"></view>
|
||||
</view>
|
||||
<view class="skeleton-withdraw-button"></view>
|
||||
<view class="skeleton-withdraw-tip"></view>
|
||||
</view>
|
||||
|
||||
<!-- 收入明细骨架屏 -->
|
||||
<view class="skeleton-card">
|
||||
<view class="skeleton-detail-title"></view>
|
||||
</view>
|
||||
|
||||
<!-- 明细项骨架屏 -->
|
||||
<view v-for="index in 3" :key="index" class="skeleton-card detail-list">
|
||||
<view class="skeleton-detail-content">
|
||||
<view class="skeleton-icon-placeholder"></view>
|
||||
<view class="skeleton-detail-info">
|
||||
<view class="skeleton-order-id"></view>
|
||||
<view class="skeleton-order-time"></view>
|
||||
</view>
|
||||
<view class="skeleton-order-amount"></view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 加载更多 -->
|
||||
<view class="skeleton-card" style="display: flex; justify-content: center; ">
|
||||
<view class="skeleton-detail-title"></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 收入概览区域 -->
|
||||
<view v-else class="income-container">
|
||||
<view class="income-overview">
|
||||
<view class="income-header">
|
||||
<text class="income-title">今日已赚</text>
|
||||
<text class="income-amount">¥86.50</text>
|
||||
</view>
|
||||
|
||||
<!-- 时间选择标签 -->
|
||||
<view class="time-tabs">
|
||||
<text v-for="(item ,index) in timeList" :key="index" @click="changeTab(index)"
|
||||
:class="{ 'active':currentTime==index }" class="tab-item">{{item}}</text>
|
||||
</view>
|
||||
<text class="month-total">本月累计¥1,240.00</text>
|
||||
</view>
|
||||
|
||||
<!-- 收入构成区域 -->
|
||||
<view class="income-composition">
|
||||
<!-- 饼图占位区域 -->
|
||||
<view class="pie-chart-placeholder">
|
||||
<view id="cahrt" class="pie-chart">
|
||||
<!-- 黑边白底的饼图占位 -->
|
||||
</view>
|
||||
<view class="chart-legend">
|
||||
<view class="legend-item">
|
||||
<view class="legend-dot blue"></view>
|
||||
<text class="legend-text">配送费¥60.50</text>
|
||||
</view>
|
||||
<view class="legend-item">
|
||||
<view class="legend-dot orange"></view>
|
||||
<text class="legend-text">冲单奖¥20.00</text>
|
||||
</view>
|
||||
<view class="legend-item">
|
||||
<view class="legend-dot green"></view>
|
||||
<text class="legend-text">恶劣天气补贴¥6.00</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 钱包区域 -->
|
||||
<view class="wallet-section">
|
||||
<view class="wallet-header">
|
||||
<text class="wallet-title">钱包余额</text>
|
||||
<text class="wallet-amount">¥86.50</text>
|
||||
</view>
|
||||
<u-button class="withdraw-button" @click="Service.GoPage('/pages/order/withdraw')" type="primary">立即提现</u-button>
|
||||
<text class="withdraw-tip">提现到账时间: T+1工作日</text>
|
||||
</view>
|
||||
|
||||
<!-- 收入明细区域 -->
|
||||
<view class="detail-header">
|
||||
<text class="detail-title">收入明细</text>
|
||||
</view>
|
||||
<view class="detail-list" @click="Service.GoPage('/pages/order/incomeDetail')" v-for="(item, index) in 3"
|
||||
:key="index">
|
||||
<view class="detail-content">
|
||||
<view class="icon-placeholder">
|
||||
<image :src="Service.GetIconImg('/static/index/income/order.png')"
|
||||
style="width: 55rpx; height: 55rpx;" mode=""></image>
|
||||
</view>
|
||||
<view class="detail-info">
|
||||
<text class="order-id">订单 MT20251020123456</text>
|
||||
<text class="order-time">10-20 18:35</text>
|
||||
</view>
|
||||
<text class="order-amount">+¥5.50</text>
|
||||
</view>
|
||||
</view>
|
||||
<up-loadmore :status="status" />
|
||||
<view class="" style="width: 100vw; height: 100rpx; ">
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import { ref, onMounted } from 'vue';
|
||||
import * as echarts from 'echarts';
|
||||
import { Service } from '@/Service/Service';
|
||||
|
||||
let loading = ref(true)
|
||||
|
||||
let timeList = ref([
|
||||
'今日',
|
||||
'本周',
|
||||
'本月'
|
||||
])
|
||||
|
||||
let currentTime = ref(0)
|
||||
|
||||
let status = ref('nomore')
|
||||
|
||||
let test = ref(10)
|
||||
|
||||
let option = ref({
|
||||
tooltip: {
|
||||
'show': false
|
||||
},
|
||||
legend: {
|
||||
'show': false
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: 'Access From',
|
||||
type: 'pie',
|
||||
radius: ['40%', '70%'],
|
||||
avoidLabelOverlap: true,
|
||||
label: {
|
||||
show: false,
|
||||
position: 'center'
|
||||
},
|
||||
emphasis: {
|
||||
label: {
|
||||
show: false,
|
||||
fontSize: 40,
|
||||
fontWeight: 'bold'
|
||||
}
|
||||
},
|
||||
labelLine: {
|
||||
show: false
|
||||
},
|
||||
data: [
|
||||
{ value: test.value, name: "配送奖", itemStyle: { color: '#1890FF' } },
|
||||
{ value: 735, name: "冲单奖", itemStyle: { color: '#52C41A' } },
|
||||
{ value: 580, name: "恶劣天气奖", itemStyle: { color: '#FF4D4F' } }
|
||||
]
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
onLoad(() => {
|
||||
setTimeout(() => {
|
||||
loading.value = false
|
||||
setTimeout(() => {
|
||||
draw()
|
||||
}, 1000)
|
||||
}, 1000)
|
||||
})
|
||||
onMounted(() => {
|
||||
})
|
||||
|
||||
const draw = () => {
|
||||
let chartDom = ref(document.getElementById('cahrt'))
|
||||
let myChart = ref(echarts.init(chartDom.value))
|
||||
myChart.value.setOption(option.value)
|
||||
}
|
||||
|
||||
const changeTab = (index : number) => {
|
||||
currentTime.value = index
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
<style scoped>
|
||||
.income-container {
|
||||
padding: 20rpx;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
/* 收入概览区域 */
|
||||
.income-overview {
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding: 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.income-header {
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.income-title {
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
display: block;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.income-amount {
|
||||
font-size: 48rpx;
|
||||
font-weight: bold;
|
||||
color: #ff4d4f;
|
||||
}
|
||||
|
||||
/* 时间标签 */
|
||||
.time-tabs {
|
||||
display: flex;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.tab-item {
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
margin-right: 40rpx;
|
||||
padding-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.tab-item.active {
|
||||
color: #1890ff;
|
||||
border-bottom: 3rpx solid #1890ff;
|
||||
}
|
||||
|
||||
.month-total {
|
||||
font-size: 26rpx;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
/* 收入构成区域 */
|
||||
.income-composition {
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding: 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
/* 饼图占位 */
|
||||
.pie-chart-placeholder {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.pie-chart {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
margin-right: 30rpx;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
.chart-legend {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.legend-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 15rpx;
|
||||
}
|
||||
|
||||
.legend-dot {
|
||||
width: 16rpx;
|
||||
height: 16rpx;
|
||||
border-radius: 50%;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.legend-dot.blue {
|
||||
background-color: var(--nav-mian);
|
||||
}
|
||||
|
||||
.legend-dot.orange {
|
||||
background-color: var(--nav-vice);
|
||||
}
|
||||
|
||||
.legend-dot.green {
|
||||
background-color: var(--nav-diluted);
|
||||
}
|
||||
|
||||
.legend-text {
|
||||
font-size: 26rpx;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
/* 钱包区域 */
|
||||
.wallet-section {
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding: 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.wallet-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.wallet-title {
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.wallet-amount {
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
color: #ff4d4f;
|
||||
}
|
||||
|
||||
.withdraw-button {
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
font-size: 32rpx;
|
||||
border-radius: 40rpx;
|
||||
background-color: #1890ff;
|
||||
color: #fff;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.withdraw-tip {
|
||||
display: block;
|
||||
font-size: 22rpx;
|
||||
color: #999;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* 收入明细区域 */
|
||||
.income-detail {
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding: 30rpx;
|
||||
}
|
||||
|
||||
.detail-header {
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.detail-title {
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
|
||||
.detail-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.detail-list {
|
||||
margin: 15rpx 0 0;
|
||||
background-color: #fff;
|
||||
padding: 20rpx 30rpx;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
/* 图标占位符 - 黑边白底 */
|
||||
.icon-placeholder {
|
||||
width: 70rpx;
|
||||
height: 70rpx;
|
||||
background-color: #E6F7FF;
|
||||
border-radius: 8rpx;
|
||||
margin-right: 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.detail-info {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.order-id {
|
||||
display: block;
|
||||
font-size: 26rpx;
|
||||
color: #333;
|
||||
margin-bottom: 5rpx;
|
||||
}
|
||||
|
||||
.order-time {
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.order-amount {
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
color: #ff4d4f;
|
||||
}
|
||||
|
||||
/* 没有更多记录 */
|
||||
.no-more {
|
||||
text-align: center;
|
||||
padding: 40rpx 0;
|
||||
}
|
||||
|
||||
.no-more-text {
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
/* 骨架屏样式 */
|
||||
.skeleton-loading .skeleton-card {
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding: 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* 收入概览骨架屏 */
|
||||
.skeleton-income-title {
|
||||
width: 100rpx;
|
||||
height: 30rpx;
|
||||
background-color: #f0f0f0;
|
||||
border-radius: 4rpx;
|
||||
margin-bottom: 15rpx;
|
||||
}
|
||||
|
||||
.skeleton-income-amount {
|
||||
width: 200rpx;
|
||||
height: 50rpx;
|
||||
background-color: #f0f0f0;
|
||||
border-radius: 4rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.skeleton-time-tabs {
|
||||
display: flex;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.skeleton-tab-item {
|
||||
width: 80rpx;
|
||||
height: 30rpx;
|
||||
background-color: #f0f0f0;
|
||||
border-radius: 4rpx;
|
||||
margin-right: 40rpx;
|
||||
}
|
||||
|
||||
.skeleton-month-total {
|
||||
width: 200rpx;
|
||||
height: 30rpx;
|
||||
background-color: #f0f0f0;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
|
||||
/* 收入构成骨架屏 */
|
||||
.skeleton-pie-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.skeleton-pie-chart {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
background-color: #f0f0f0;
|
||||
border-radius: 50%;
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
|
||||
.skeleton-legend-list {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.skeleton-legend-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 15rpx;
|
||||
}
|
||||
|
||||
.skeleton-legend-dot {
|
||||
width: 16rpx;
|
||||
height: 16rpx;
|
||||
background-color: #f0f0f0;
|
||||
border-radius: 50%;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.skeleton-legend-text {
|
||||
width: 200rpx;
|
||||
height: 30rpx;
|
||||
background-color: #f0f0f0;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
|
||||
/* 钱包区域骨架屏 */
|
||||
.skeleton-wallet-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.skeleton-wallet-title {
|
||||
width: 120rpx;
|
||||
height: 30rpx;
|
||||
background-color: #f0f0f0;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
|
||||
.skeleton-wallet-amount {
|
||||
width: 150rpx;
|
||||
height: 40rpx;
|
||||
background-color: #f0f0f0;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
|
||||
.skeleton-withdraw-button {
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
background-color: #f0f0f0;
|
||||
border-radius: 40rpx;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.skeleton-withdraw-tip {
|
||||
width: 300rpx;
|
||||
height: 24rpx;
|
||||
background-color: #f0f0f0;
|
||||
border-radius: 4rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
/* 收入明细骨架屏 */
|
||||
.skeleton-detail-title {
|
||||
width: 150rpx;
|
||||
height: 30rpx;
|
||||
background-color: #f0f0f0;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
|
||||
.skeleton-detail-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.skeleton-icon-placeholder {
|
||||
width: 70rpx;
|
||||
height: 70rpx;
|
||||
background-color: #f0f0f0;
|
||||
border-radius: 8rpx;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.skeleton-detail-info {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.skeleton-order-id {
|
||||
width: 300rpx;
|
||||
height: 30rpx;
|
||||
background-color: #f0f0f0;
|
||||
border-radius: 4rpx;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.skeleton-order-time {
|
||||
width: 200rpx;
|
||||
height: 26rpx;
|
||||
background-color: #f0f0f0;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
|
||||
.skeleton-order-amount {
|
||||
width: 100rpx;
|
||||
height: 36rpx;
|
||||
background-color: #f0f0f0;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
|
||||
/* 骨架屏动画 */
|
||||
.skeleton-loading .skeleton-income-title::after,
|
||||
.skeleton-loading .skeleton-income-amount::after,
|
||||
.skeleton-loading .skeleton-tab-item::after,
|
||||
.skeleton-loading .skeleton-month-total::after,
|
||||
.skeleton-loading .skeleton-pie-chart::after,
|
||||
.skeleton-loading .skeleton-legend-dot::after,
|
||||
.skeleton-loading .skeleton-legend-text::after,
|
||||
.skeleton-loading .skeleton-wallet-title::after,
|
||||
.skeleton-loading .skeleton-wallet-amount::after,
|
||||
.skeleton-loading .skeleton-withdraw-button::after,
|
||||
.skeleton-loading .skeleton-withdraw-tip::after,
|
||||
.skeleton-loading .skeleton-detail-title::after,
|
||||
.skeleton-loading .skeleton-icon-placeholder::after,
|
||||
.skeleton-loading .skeleton-order-id::after,
|
||||
.skeleton-loading .skeleton-order-time::after,
|
||||
.skeleton-loading .skeleton-order-amount::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
|
||||
animation: shimmer 1.5s infinite;
|
||||
}
|
||||
|
||||
@keyframes shimmer {
|
||||
0% {
|
||||
transform: translateX(-100%);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: translateX(100%);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,445 @@
|
||||
<template>
|
||||
|
||||
<view v-if="loading" class="">
|
||||
<view class="tab-bar-skeleton">
|
||||
<view class="skeleton-slot skeleton-tab-item"></view>
|
||||
<view class="skeleton-slot skeleton-tab-item"></view>
|
||||
</view>
|
||||
<view class="skeleton-container">
|
||||
<view class="skeleton-order-item" v-for="index in 3" :key="'skeleton-' + index">
|
||||
<!-- 订单头部骨架 -->
|
||||
<view class="skeleton-header">
|
||||
<view class="skeleton-slot skeleton-order-number"></view>
|
||||
<view class="skeleton-slot skeleton-status-badge"></view>
|
||||
</view>
|
||||
|
||||
<!-- 异常类型骨架 -->
|
||||
<view class="skeleton-slot skeleton-type"></view>
|
||||
|
||||
<!-- 异常描述骨架 -->
|
||||
<view class="skeleton-slot skeleton-description"></view>
|
||||
|
||||
<!-- 底部信息骨架 -->
|
||||
<view class="skeleton-footer">
|
||||
<view class="skeleton-slot skeleton-time"></view>
|
||||
<view class="skeleton-actions">
|
||||
<view class="skeleton-slot skeleton-btn"></view>
|
||||
<view class="skeleton-slot skeleton-btn"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" style="width: 100vw; display: flex; justify-content: center; ">
|
||||
<view class="skeleton-slot " style="width: 160rpx; height: 30rpx; "></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view v-else class="abnormal-orders-page">
|
||||
<!-- 选项卡 -->
|
||||
<view class="tab-bar">
|
||||
<view class="tab-item" :class="{ active: activeTab === 0 }" @click="switchTab(0)">
|
||||
<text class="tab-text" :class="{ active: activeTab === 0 }">待处理</text>
|
||||
</view>
|
||||
<view class="tab-item" :class="{ active: activeTab === 1 }" @click="switchTab(1)">
|
||||
<text class="tab-text" :class="{ active: activeTab === 1 }">已处理</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 订单列表 -->
|
||||
<view class="order-list">
|
||||
<view class="order-item" v-for="(orderItem,orederIndex) in dataList" :key="orederIndex">
|
||||
<!-- 订单头部 -->
|
||||
<view class="order-header">
|
||||
<text class="order-number">订单号: {{ orderItem.orderId}}</text>
|
||||
<view class="order-status pending">
|
||||
<text class="status-text">{{ orderItem.status===0?'待处理':'已处理' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 订单内容 -->
|
||||
<view class="">
|
||||
<text class="abnormal-type">{{orderItem.type }}</text>
|
||||
<text class="abnormal-description">{{ orderItem.remark }}</text>
|
||||
<view class="" style="display: flex; align-items: center; justify-content: space-between;">
|
||||
<text class="order-time"
|
||||
style="font-size: 26rpx; color: #666;">{{ Service.formatDate(orderItem.addTime,1) }}</text>
|
||||
<!-- 操作按钮 -->
|
||||
<view class="order-actions">
|
||||
<text @click="Service.GoPage('/pages/my/abnormalDetail?orderId='+orderItem.orderId)"
|
||||
class="action-btn detail-btn">查看详情</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<up-loadmore :status="status" />
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import { ref, computed } from 'vue';
|
||||
import { Service } from "@/Service/Service"
|
||||
import { CNRiderOrderService } from '@/Service/CN/CNRiderOrderService'
|
||||
|
||||
|
||||
let loading = ref(true)
|
||||
// 响应式数据
|
||||
const activeTab = ref(0);
|
||||
|
||||
let status = ref('nomore')
|
||||
let page = ref(1)
|
||||
let dataList = ref<Array<any>>([])
|
||||
onLoad(() => {
|
||||
getData()
|
||||
})
|
||||
|
||||
|
||||
const getData = () => {
|
||||
dataList.value = []
|
||||
page.value = 1
|
||||
status.value = 'loadmore'
|
||||
getList()
|
||||
}
|
||||
|
||||
const getList = () => {
|
||||
if (status.value == 'nomore' || status.value == 'loading') {
|
||||
return
|
||||
}
|
||||
status.value == 'loadmore'
|
||||
CNRiderOrderService.GetRiderOrderServiceList(activeTab.value, page.value).then(res => {
|
||||
loading.value = false
|
||||
if (res.data) {
|
||||
dataList.value = [...dataList.value, ...res.data.list]
|
||||
status.value = res.data.list == 10 ? 'loadmore' : 'nomore'
|
||||
page.value++
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 切换选项卡
|
||||
const switchTab = (tab : any) => {
|
||||
activeTab.value = tab;
|
||||
getData()
|
||||
};
|
||||
|
||||
|
||||
// 重新上报
|
||||
const reportAgain = (orderNo : string) => {
|
||||
uni.showModal({
|
||||
title: '重新上报',
|
||||
content: '确定要重新上报此订单异常吗?',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
// 模拟重新上报
|
||||
uni.showToast({
|
||||
title: '已提交重新上报申请',
|
||||
icon: 'success'
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
/* 页面基础样式 */
|
||||
.abnormal-orders-page {
|
||||
min-height: 100vh;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
/* 顶部导航栏 */
|
||||
.nav-bar {
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
background-color: #fff;
|
||||
padding: 0 30rpx;
|
||||
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.nav-left,
|
||||
.nav-right {
|
||||
width: 60rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.nav-center {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.nav-title {
|
||||
font-size: 34rpx;
|
||||
color: #333;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
/* 选项卡 */
|
||||
.tab-bar {
|
||||
height: 88rpx;
|
||||
display: flex;
|
||||
background-color: #fff;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.tab-item {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.tab-item.active::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 50rpx;
|
||||
height: 6rpx;
|
||||
background-color: #1890ff;
|
||||
border-radius: 3rpx;
|
||||
}
|
||||
|
||||
.tab-text {
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.tab-text.active {
|
||||
color: #1890ff;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
/* 订单列表 */
|
||||
.order-list {
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
|
||||
.order-item {
|
||||
background-color: #fff;
|
||||
border-radius: 16rpx;
|
||||
padding: 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
/* 订单头部 */
|
||||
.order-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.order-number {
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.order-status {
|
||||
padding: 4rpx 16rpx;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
.order-status.pending {
|
||||
background-color: #fff2e8;
|
||||
}
|
||||
|
||||
.order-status.processed {
|
||||
background-color: #f6ffed;
|
||||
}
|
||||
|
||||
.status-text {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.order-status.pending .status-text {
|
||||
color: #fa5151;
|
||||
}
|
||||
|
||||
.order-status.processed .status-text {
|
||||
color: #52c41a;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.abnormal-type {
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
font-weight: 500;
|
||||
display: block;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
.abnormal-description {
|
||||
font-size: 26rpx;
|
||||
color: #666;
|
||||
display: block;
|
||||
margin-bottom: 12rpx;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.order-time {
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
/* 操作按钮 */
|
||||
.order-actions {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 20rpx;
|
||||
}
|
||||
|
||||
.action-btn {
|
||||
font-size: 26rpx;
|
||||
padding: 8rpx 20rpx;
|
||||
}
|
||||
|
||||
.detail-btn {
|
||||
color: #1890ff;
|
||||
}
|
||||
|
||||
.report-btn {
|
||||
color: #52c41a;
|
||||
}
|
||||
|
||||
/* 空状态 */
|
||||
.empty-state {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 100rpx 0;
|
||||
}
|
||||
|
||||
.empty-icon {
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.empty-text {
|
||||
font-size: 28rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
/* 骨架屏样式 - 纯CSS实现 */
|
||||
/* 选项卡骨架屏 */
|
||||
.tab-bar-skeleton {
|
||||
height: 88rpx;
|
||||
display: flex;
|
||||
background-color: #fff;
|
||||
margin-bottom: 20rpx;
|
||||
padding: 0 40rpx;
|
||||
}
|
||||
|
||||
.skeleton-tab-item {
|
||||
flex: 1;
|
||||
height: 36rpx;
|
||||
align-self: center;
|
||||
margin: 0 20rpx;
|
||||
border-radius: 18rpx;
|
||||
}
|
||||
|
||||
/* 订单列表骨架屏 */
|
||||
.skeleton-container {
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
|
||||
/* 订单项骨架 */
|
||||
.skeleton-order-item {
|
||||
background-color: #ffffff;
|
||||
border-radius: 16rpx;
|
||||
padding: 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
/* 订单头部布局 */
|
||||
.skeleton-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
/* 底部布局 */
|
||||
.skeleton-footer {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/* 操作按钮区域 */
|
||||
.skeleton-actions {
|
||||
display: flex;
|
||||
gap: 20rpx;
|
||||
}
|
||||
|
||||
/* 通用骨架占位元素 */
|
||||
.skeleton-slot {
|
||||
background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
|
||||
background-size: 200% 100%;
|
||||
animation: skeleton-loading 1.5s infinite ease-in-out;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
/* 特定元素尺寸 */
|
||||
.skeleton-order-number {
|
||||
width: 60%;
|
||||
height: 36rpx;
|
||||
}
|
||||
|
||||
.skeleton-status-badge {
|
||||
width: 120rpx;
|
||||
height: 40rpx;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
.skeleton-type {
|
||||
width: 30%;
|
||||
height: 36rpx;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.skeleton-description {
|
||||
width: 100%;
|
||||
height: 32rpx;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.skeleton-time {
|
||||
width: 25%;
|
||||
height: 30rpx;
|
||||
}
|
||||
|
||||
.skeleton-btn {
|
||||
width: 100rpx;
|
||||
height: 30rpx;
|
||||
}
|
||||
|
||||
/* 骨架屏动画 */
|
||||
@keyframes skeleton-loading {
|
||||
0% {
|
||||
background-position: 200% 0;
|
||||
}
|
||||
|
||||
100% {
|
||||
background-position: -200% 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user