| 
									
										
										
										
											2025-06-12 11:55:12 +08:00
										 |  |  | <template> | 
					
						
							|  |  |  |   <view class="container"> | 
					
						
							|  |  |  |     <!-- 总览卡片 --> | 
					
						
							|  |  |  |     <view class="summary-card"> | 
					
						
							|  |  |  |       <view class="summary-title-container"> | 
					
						
							|  |  |  |         <view class="summary-icon"></view> | 
					
						
							|  |  |  |         <text class="summary-title">今日实发合计</text> | 
					
						
							|  |  |  |       </view> | 
					
						
							|  |  |  |       <view class="summary-amount"> | 
					
						
							|  |  |  |         <text class="currency-symbol">¥</text> | 
					
						
							| 
									
										
										
										
											2025-06-12 17:01:36 +08:00
										 |  |  |         <text>{{ bonusData.realIncomeTotal || '0.00' }}</text> | 
					
						
							| 
									
										
										
										
											2025-06-12 11:55:12 +08:00
										 |  |  |       </view> | 
					
						
							|  |  |  |     </view> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     <!-- 奖金明细列表 --> | 
					
						
							|  |  |  |     <view class="details-card"> | 
					
						
							|  |  |  |       <view class="detail-item"> | 
					
						
							|  |  |  |         <text class="detail-label">奖金日期</text> | 
					
						
							| 
									
										
										
										
											2025-06-13 12:00:57 +08:00
										 |  |  |         <text class="detail-value date">{{ | 
					
						
							|  |  |  |           bonusData.settleDate || formatDate | 
					
						
							|  |  |  |         }}</text> | 
					
						
							| 
									
										
										
										
											2025-06-12 11:55:12 +08:00
										 |  |  |       </view> | 
					
						
							| 
									
										
										
										
											2025-07-10 17:17:43 +08:00
										 |  |  |       <template v-for="(label, key) in detailLabels"> | 
					
						
							|  |  |  |         <view v-if="key === 'repurRangeIncome'"> | 
					
						
							|  |  |  |           <view | 
					
						
							|  |  |  |             v-if="bonusData.repurRangeIncome" | 
					
						
							|  |  |  |             class="detail-item" | 
					
						
							|  |  |  |             :key="key" | 
					
						
							|  |  |  |           > | 
					
						
							|  |  |  |             <text class="detail-label">{{ label }}</text> | 
					
						
							|  |  |  |             <text class="detail-value"> | 
					
						
							|  |  |  |               <text class="currency-symbol-small">¥</text> | 
					
						
							|  |  |  |               {{ bonusData[key] || '0.00' }} | 
					
						
							|  |  |  |             </text> | 
					
						
							|  |  |  |           </view> | 
					
						
							|  |  |  |         </view> | 
					
						
							|  |  |  |         <view v-else class="detail-item" :key="key"> | 
					
						
							| 
									
										
										
										
											2025-07-09 15:54:49 +08:00
										 |  |  |           <text class="detail-label">{{ label }}</text> | 
					
						
							|  |  |  |           <text class="detail-value"> | 
					
						
							|  |  |  |             <text class="currency-symbol-small">¥</text> | 
					
						
							|  |  |  |             {{ bonusData[key] || '0.00' }} | 
					
						
							|  |  |  |           </text> | 
					
						
							| 
									
										
										
										
											2025-07-10 17:17:43 +08:00
										 |  |  |         </view> | 
					
						
							|  |  |  |       </template> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-06-12 11:55:12 +08:00
										 |  |  |       <!-- 分割线 --> | 
					
						
							|  |  |  |       <view class="divider"></view> | 
					
						
							|  |  |  |       <!-- 小计 --> | 
					
						
							|  |  |  |       <view class="detail-item total"> | 
					
						
							|  |  |  |         <text class="detail-label total-label">小计(¥)</text> | 
					
						
							|  |  |  |         <text class="detail-value total-value"> | 
					
						
							|  |  |  |           <text class="currency-symbol-small">¥</text> | 
					
						
							| 
									
										
										
										
											2025-06-13 12:00:57 +08:00
										 |  |  |           {{ bonusData.retailRealSubtotal || '0.00' }} | 
					
						
							| 
									
										
										
										
											2025-06-12 11:55:12 +08:00
										 |  |  |         </text> | 
					
						
							|  |  |  |       </view> | 
					
						
							|  |  |  |     </view> | 
					
						
							|  |  |  |   </view> | 
					
						
							|  |  |  | </template> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | <script> | 
					
						
							|  |  |  | import { realTimeBonus } from '@/config/bonus.js' | 
					
						
							| 
									
										
										
										
											2025-06-13 12:00:57 +08:00
										 |  |  | import dayjs from 'dayjs' | 
					
						
							| 
									
										
										
										
											2025-06-12 11:55:12 +08:00
										 |  |  | export default { | 
					
						
							|  |  |  |   data() { | 
					
						
							|  |  |  |     return { | 
					
						
							|  |  |  |       // 使用截图中的数据作为示例
 | 
					
						
							|  |  |  |       bonusData: { | 
					
						
							| 
									
										
										
										
											2025-06-12 17:01:36 +08:00
										 |  |  |         totalIssued: 0, | 
					
						
							|  |  |  |         date: '', | 
					
						
							|  |  |  |         retailRangeIncome: 0, | 
					
						
							|  |  |  |         retailSameLevelIncome: 0.0, | 
					
						
							|  |  |  |         retailAreaIncome: 0.0, | 
					
						
							|  |  |  |         // welfareLevelDifferenceIncome: 0.0,
 | 
					
						
							|  |  |  |         // welfareDividendIncome: 0.0,
 | 
					
						
							|  |  |  |         backPoints: 0, | 
					
						
							|  |  |  |         subtotal: 0, | 
					
						
							| 
									
										
										
										
											2025-06-12 11:55:12 +08:00
										 |  |  |       }, | 
					
						
							|  |  |  |       detailLabels: { | 
					
						
							| 
									
										
										
										
											2025-06-12 17:01:36 +08:00
										 |  |  |         retailRangeIncome: '直推收益(¥)', | 
					
						
							|  |  |  |         retailSameLevelIncome: '平级收益(¥)', | 
					
						
							|  |  |  |         retailAreaIncome: '区域收益(¥)', | 
					
						
							| 
									
										
										
										
											2025-07-09 15:54:49 +08:00
										 |  |  |         repurRangeIncome: '复购级差收益(¥)', | 
					
						
							| 
									
										
										
										
											2025-06-12 17:01:36 +08:00
										 |  |  |         // welfareLevelDifferenceIncome: '福利级差收益(¥)',
 | 
					
						
							|  |  |  |         // welfareDividendIncome: '福利分红收益(¥)',
 | 
					
						
							|  |  |  |         backPoints: '重消收益(¥)', | 
					
						
							| 
									
										
										
										
											2025-06-12 11:55:12 +08:00
										 |  |  |       }, | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  |   }, | 
					
						
							|  |  |  |   onLoad() {}, | 
					
						
							|  |  |  |   onShow() { | 
					
						
							|  |  |  |     this.getRealTimeBonus() | 
					
						
							|  |  |  |   }, | 
					
						
							| 
									
										
										
										
											2025-06-13 12:00:57 +08:00
										 |  |  |   computed: { | 
					
						
							|  |  |  |     formatDate() { | 
					
						
							|  |  |  |       return dayjs(new Date()).format('YYYY-MM-DD') | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |   }, | 
					
						
							| 
									
										
										
										
											2025-06-12 11:55:12 +08:00
										 |  |  |   methods: { | 
					
						
							|  |  |  |     getRealTimeBonus() { | 
					
						
							|  |  |  |       realTimeBonus().then(res => { | 
					
						
							|  |  |  |         this.bonusData = res.rows?.[0] || {} | 
					
						
							|  |  |  |       }) | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |   }, | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | </script> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | <style scoped> | 
					
						
							|  |  |  | /* 主题色 */ | 
					
						
							|  |  |  | :root { | 
					
						
							|  |  |  |   --primary-color: #005bac; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | .container { | 
					
						
							|  |  |  |   background-color: #f7f8fa; | 
					
						
							|  |  |  |   min-height: 100vh; | 
					
						
							|  |  |  |   padding: 12px; | 
					
						
							|  |  |  |   box-sizing: border-box; | 
					
						
							|  |  |  |   font-family: | 
					
						
							|  |  |  |     -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, | 
					
						
							|  |  |  |     Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | .summary-card { | 
					
						
							|  |  |  |   background: linear-gradient(45deg, #005bac, #0077d9); | 
					
						
							|  |  |  |   color: #ffffff; | 
					
						
							|  |  |  |   padding: 24px; | 
					
						
							|  |  |  |   border-radius: 16px; | 
					
						
							|  |  |  |   margin-bottom: 16px; | 
					
						
							|  |  |  |   box-shadow: 0 8px 16px rgba(0, 91, 172, 0.2); | 
					
						
							|  |  |  |   text-align: left; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | .summary-title-container { | 
					
						
							|  |  |  |   display: flex; | 
					
						
							|  |  |  |   align-items: center; | 
					
						
							|  |  |  |   margin-bottom: 8px; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | .summary-icon { | 
					
						
							|  |  |  |   width: 4px; | 
					
						
							|  |  |  |   height: 16px; | 
					
						
							|  |  |  |   background-color: #fff; | 
					
						
							|  |  |  |   border-radius: 2px; | 
					
						
							|  |  |  |   margin-right: 8px; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | .summary-title { | 
					
						
							|  |  |  |   font-size: 16px; | 
					
						
							|  |  |  |   opacity: 0.9; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | .summary-amount { | 
					
						
							|  |  |  |   font-size: 38px; | 
					
						
							|  |  |  |   font-weight: 700; | 
					
						
							|  |  |  |   display: flex; | 
					
						
							|  |  |  |   align-items: baseline; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | .currency-symbol { | 
					
						
							|  |  |  |   font-size: 22px; | 
					
						
							|  |  |  |   font-weight: 500; | 
					
						
							|  |  |  |   margin-right: 4px; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | .currency-symbol-small { | 
					
						
							|  |  |  |   font-size: 14px; | 
					
						
							|  |  |  |   font-weight: 400; | 
					
						
							|  |  |  |   color: #666; | 
					
						
							|  |  |  |   margin-right: 2px; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | .details-card { | 
					
						
							|  |  |  |   background-color: #ffffff; | 
					
						
							|  |  |  |   padding: 8px 20px; | 
					
						
							|  |  |  |   border-radius: 16px; | 
					
						
							|  |  |  |   box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | .detail-item { | 
					
						
							|  |  |  |   display: flex; | 
					
						
							|  |  |  |   justify-content: space-between; | 
					
						
							|  |  |  |   align-items: center; | 
					
						
							|  |  |  |   padding: 18px 0; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | .divider { | 
					
						
							|  |  |  |   height: 1px; | 
					
						
							|  |  |  |   background-color: #f2f2f2; | 
					
						
							|  |  |  |   margin: 0; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | .detail-label { | 
					
						
							|  |  |  |   font-size: 15px; | 
					
						
							|  |  |  |   color: #333; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | .detail-value { | 
					
						
							|  |  |  |   font-size: 16px; | 
					
						
							|  |  |  |   color: #333; | 
					
						
							|  |  |  |   font-weight: 500; | 
					
						
							|  |  |  |   display: flex; | 
					
						
							|  |  |  |   align-items: center; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | .detail-value.date { | 
					
						
							|  |  |  |   color: #999; | 
					
						
							|  |  |  |   font-weight: 400; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | .total { | 
					
						
							|  |  |  |   padding-top: 18px; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | .total-label { | 
					
						
							|  |  |  |   font-weight: 600; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | .total-value { | 
					
						
							|  |  |  |   font-size: 20px; | 
					
						
							|  |  |  |   font-weight: 600; | 
					
						
							|  |  |  |   color: var(--primary-color); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | .total-value .currency-symbol-small { | 
					
						
							|  |  |  |   color: var(--primary-color); | 
					
						
							|  |  |  |   font-size: 16px; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | </style> |