From ea2fb93a0dfcde8f5b66825b20f9d9b835a28acc Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期五, 22 五月 2026 10:54:09 +0800
Subject: [PATCH] 提交
---
app/pages/wallet/wallet.vue | 67 ++++++++++++++++++++++++++++++---
1 files changed, 60 insertions(+), 7 deletions(-)
diff --git a/app/pages/wallet/wallet.vue b/app/pages/wallet/wallet.vue
index 326874c..4727d89 100644
--- a/app/pages/wallet/wallet.vue
+++ b/app/pages/wallet/wallet.vue
@@ -60,15 +60,13 @@
<view class="item-list">
<view class="item-list-item" v-for="(item, index) in dataList" :key="index" @click="jumpDetail(item)">
<view class="image">
- <image v-if="item.type === 0" src="/static/image/ic_shouru@2x.png" mode="widthFix"></image>
- <image v-if="item.type === 1" src="/static/image/ic_tixian@2x.png" mode="widthFix"></image>
- <image v-if="item.type === 2" src="/static/image/ic_tuikuan@2x.png" mode="widthFix"></image>
+ <image :src="getTransactionIcon(item.type)" mode="widthFix"></image>
</view>
<view class="info">
<view class="info">
<view class="info-a">
<view class="info-a-label">
- {{item.type === 0 ? '瀹屾垚璁㈠崟' : item.type === 1 ? '鎻愮幇鏀嚭' : item.type === 2 ? '鎻愮幇閫�鍥�' : ''}}
+ {{ getTransactionLabel(item.type) }}
<template v-if="item.type === 1">
<text style="color: #FF0020;" v-if="item.withdrawStatus == 2">鏈�氳繃</text>
<text style="color: #004096" v-else-if="item.withdrawStatus == 1">宸查�氳繃</text>
@@ -76,7 +74,7 @@
</template>
</view>
<view class="info-a-price">
- <text>{{item.type==1?'-':'+'}}{{(item.amountInfo ||0)}}</text>
+ <text>{{ isExpenseType(item) ? '-' : '+' }}{{(item.amountInfo ||0)}}</text>
<text></text>
</view>
</view>
@@ -113,6 +111,9 @@
<view @click="checkType(0)" :class="tempType === 0 ?'sear-item-list-item active':'sear-item-list-item'">璁㈠崟缁撶畻</view>
<view @click="checkType(1)" :class="tempType === 1?'sear-item-list-item active':'sear-item-list-item'">鎻愮幇</view>
<view @click="checkType(2)" :class="tempType === 2?'sear-item-list-item active':'sear-item-list-item'">鎻愮幇閫�鍥�</view>
+ <view @click="checkType(3)" :class="tempType === 3?'sear-item-list-item active':'sear-item-list-item'">骞冲彴濂栧姳</view>
+ <view @click="checkType(4)" :class="tempType === 4?'sear-item-list-item active':'sear-item-list-item'">璐d换鎵f</view>
+ <view @click="checkType(5)" :class="tempType === 5?'sear-item-list-item active':'sear-item-list-item'">寮傚父杞繍</view>
<view style="width: 216rpx; height: 0;"></view>
</view>
</view>
@@ -206,6 +207,10 @@
this.initDateStr()
// uni.$on('accountListReload', this.getFirstPageData())
},
+ onReachBottom() {
+ console.log('onReachBottom')
+ this.getShopPage()
+ },
methods:{
bindChange1 (e) {
this.tempStartDate = e.detail.value || null
@@ -270,7 +275,7 @@
startTime: this.startDate || this.defaultStartDate,
endTime: this.endDate || this.defaultEndDate,
type: this.active === 1?0:(this.active===2?1:''),
- objType: this.type === 1?16:( this.type === 2?17:( this.type === 3?25: (this.type === 4?1: ''))),
+ objType: this.getSummaryObjType(this.type),
}).then(res=>{
if(res.code == 200){
this.countDataList = res.data
@@ -326,7 +331,7 @@
this.words = '鍏ㄩ儴'
}else {
let t1 = this.active === 1 ? '鏀跺叆 ':(this.active === 2 ? '鏀嚭 ' : '');
- let t2 = this.type === 0 ? '璁㈠崟缁撶畻' : (this.type === 1 ? '鎻愮幇': (this.type === 2 ? '鎻愮幇閫�鍥�' : ''))
+ let t2 = this.getFilterTypeLabel(this.type)
if(t1 !='' && t2 !=''){
this.wordsWidth = 350
}
@@ -371,6 +376,54 @@
checkActive(index){
this.tempActive =index
},
+ getTransactionLabel(type) {
+ const typeMap = {
+ 0: '瀹屾垚璁㈠崟',
+ 1: '鎻愮幇鏀嚭',
+ 2: '鎻愮幇閫�鍥�',
+ 3: '骞冲彴濂栧姳',
+ 4: '璐d换鎵f',
+ 5: '寮傚父杞繍'
+ }
+ return typeMap[type] || ''
+ },
+ getFilterTypeLabel(type) {
+ const typeMap = {
+ 0: '璁㈠崟缁撶畻',
+ 1: '鎻愮幇',
+ 2: '鎻愮幇閫�鍥�',
+ 3: '骞冲彴濂栧姳',
+ 4: '璐d换鎵f',
+ 5: '寮傚父杞繍'
+ }
+ return typeMap[type] || ''
+ },
+ getTransactionIcon(type) {
+ const typeMap = {
+ 0: '/static/image/ic_shouru@2x.png',
+ 1: '/static/image/ic_tixian@2x.png',
+ 2: '/static/image/ic_tuikuan@2x.png',
+ 3: '/static/image/ic_shouru@2x.png',
+ 4: '/static/image/ic_tixian@2x.png',
+ 5: '/static/image/ic_tuikuan@2x.png'
+ }
+ return typeMap[type] || '/static/image/ic_shouru@2x.png'
+ },
+ getSummaryObjType(type) {
+ const typeMap = {
+ 1: 16,
+ 2: 17,
+ 3: 25,
+ 4: 1
+ }
+ return typeMap[type] || ''
+ },
+ isExpenseType(item) {
+ if (item && item.optType !== undefined && item.optType !== null && item.optType !== '') {
+ return Number(item.optType) === -1
+ }
+ return [1, 4].includes(Number(item.type))
+ },
checkType(index){
this.tempType = index
},
--
Gitblit v1.9.3