style(转账记录页): 更新UI
This commit is contained in:
parent
c1d8aa3498
commit
7e5bdcb009
@ -17,16 +17,11 @@
|
|||||||
<div class="record-details">
|
<div class="record-details">
|
||||||
<h4>{{ record.userName }}</h4>
|
<h4>{{ record.userName }}</h4>
|
||||||
<p>ID: {{ record.account }}</p>
|
<p>ID: {{ record.account }}</p>
|
||||||
<div class="record-time">{{ record.time }}</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="record-amount">
|
<div class="record-amount">
|
||||||
<span :class="['coins-amount', record.type === 0 ? 'positive' : 'negative']"
|
<div class="coins-amount">{{ record.amount }} coins</div>
|
||||||
>{{ record.amount }} coins</span
|
<div class="record-time">{{ record.time }}</div>
|
||||||
>
|
|
||||||
<span class="transaction-type">{{
|
|
||||||
getTransactionType(record.type, record.origin)
|
|
||||||
}}</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -44,7 +39,7 @@
|
|||||||
import { ref, onMounted } from 'vue'
|
import { ref, onMounted } from 'vue'
|
||||||
import MobileHeader from '../components/MobileHeader.vue'
|
import MobileHeader from '../components/MobileHeader.vue'
|
||||||
import { getFreightWaterFlow } from '../api/wallet.js'
|
import { getFreightWaterFlow } from '../api/wallet.js'
|
||||||
import { formatUTCTime } from '@/utils/utcFormat.js'
|
import { formatUTCCustom } from '@/utils/utcFormat.js'
|
||||||
import { getUserId } from '@/utils/userStore.js'
|
import { getUserId } from '@/utils/userStore.js'
|
||||||
|
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
@ -90,7 +85,7 @@ const fetchRecords = async () => {
|
|||||||
userId: item.acceptUserId,
|
userId: item.acceptUserId,
|
||||||
userName: `User${item.acceptUserId.toString().slice(-6)}...`, // 显示最后6位
|
userName: `User${item.acceptUserId.toString().slice(-6)}...`, // 显示最后6位
|
||||||
amount: getAmountDisplay(item.type, item.quantity),
|
amount: getAmountDisplay(item.type, item.quantity),
|
||||||
time: formatUTCTime(item.createTime),
|
time: formatUTCCustom(item.createTime),
|
||||||
type: item.type,
|
type: item.type,
|
||||||
quantity: item.quantity,
|
quantity: item.quantity,
|
||||||
balance: item.balance,
|
balance: item.balance,
|
||||||
@ -115,6 +110,11 @@ onMounted(async () => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
* {
|
||||||
|
color: rgba(0, 0, 0, 0.8);
|
||||||
|
font-family: 'SF Pro Text';
|
||||||
|
}
|
||||||
|
|
||||||
.seller-records {
|
.seller-records {
|
||||||
font-family: -apple-system, BlinkMacSystemFont, sans-serif;
|
font-family: -apple-system, BlinkMacSystemFont, sans-serif;
|
||||||
}
|
}
|
||||||
@ -201,40 +201,35 @@ onMounted(async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.record-details h4 {
|
.record-details h4 {
|
||||||
margin: 0 0 4px 0;
|
margin-bottom: 4px;
|
||||||
font-size: 16px;
|
font-size: 14px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
.record-details p {
|
.record-details p {
|
||||||
margin: 0 0 4px 0;
|
font-size: 12px;
|
||||||
font-size: 14px;
|
font-weight: 590;
|
||||||
color: #666;
|
color: rgba(0, 0, 0, 0.4);
|
||||||
}
|
}
|
||||||
|
|
||||||
.record-time {
|
.record-time {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #9ca3af;
|
font-weight: 510;
|
||||||
|
color: rgba(0, 0, 0, 0.4);
|
||||||
}
|
}
|
||||||
|
|
||||||
.record-amount {
|
.record-amount {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: flex-end;
|
align-items: flex-end;
|
||||||
|
gap: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.coins-amount {
|
.coins-amount {
|
||||||
font-size: 14px;
|
font-size: 12px;
|
||||||
font-weight: 600;
|
color: rgba(0, 0, 0, 0.4);
|
||||||
}
|
font-weight: 510;
|
||||||
|
|
||||||
.coins-amount.positive {
|
|
||||||
color: #10b981; /* 绿色表示进货/入账 */
|
|
||||||
}
|
|
||||||
|
|
||||||
.coins-amount.negative {
|
|
||||||
color: #ef4444; /* 红色表示出货/出账 */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.transaction-type {
|
.transaction-type {
|
||||||
@ -269,4 +264,34 @@ onMounted(async () => {
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #9ca3af;
|
color: #9ca3af;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 360px) {
|
||||||
|
* {
|
||||||
|
font-size: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.help-btn {
|
||||||
|
width: 14px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (min-width: 360px) {
|
||||||
|
* {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.help-btn {
|
||||||
|
width: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (min-width: 768px) {
|
||||||
|
* {
|
||||||
|
font-size: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.help-btn {
|
||||||
|
width: 28px;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user