feat(bonus/real-time): 实时奖金 奖金日期添加默认值

This commit is contained in:
woody 2025-06-13 12:00:57 +08:00
parent c04c817d55
commit bf1179154a
2 changed files with 11 additions and 3 deletions

View File

@ -23,4 +23,4 @@ export const realTimeBonus = () =>
//奖金明细列表
export const queryBonusList = params =>
http.post('/bonus/api/bonus/query-bonus-first/', { params })
http.post('/bonus/api/bonus/query-bonus-first', { params })

View File

@ -16,7 +16,9 @@
<view class="details-card">
<view class="detail-item">
<text class="detail-label">奖金日期</text>
<text class="detail-value date">{{ bonusData.settleDate }}</text>
<text class="detail-value date">{{
bonusData.settleDate || formatDate
}}</text>
</view>
<view v-for="(label, key) in detailLabels" :key="key" class="detail-item">
<text class="detail-label">{{ label }}</text>
@ -32,7 +34,7 @@
<text class="detail-label total-label">小计(¥)</text>
<text class="detail-value total-value">
<text class="currency-symbol-small">¥</text>
{{ bonusData.subtotal || '0.00' }}
{{ bonusData.retailRealSubtotal || '0.00' }}
</text>
</view>
</view>
@ -41,6 +43,7 @@
<script>
import { realTimeBonus } from '@/config/bonus.js'
import dayjs from 'dayjs'
export default {
data() {
return {
@ -70,6 +73,11 @@ export default {
onShow() {
this.getRealTimeBonus()
},
computed: {
formatDate() {
return dayjs(new Date()).format('YYYY-MM-DD')
},
},
methods: {
getRealTimeBonus() {
realTimeBonus().then(res => {