refactor: 余额明细修复

This commit is contained in:
zzzzzak
2025-01-16 23:34:50 +08:00
parent 23d94407c2
commit 79b6ce1136
5 changed files with 99 additions and 12 deletions
+79
View File
@@ -0,0 +1,79 @@
<route lang="json5">
{
style: {
navigationBarTitleText: '资金明细',
navigationBarBackgroundColor: '#fff',
navigationStyle: 'custom',
},
}
</route>
<script lang="ts" setup>
import NavBar from '@/components/NavBar.vue'
import { getMyAssetAPI } from '@/service'
import { useUserStore } from '@/store'
const { list: assetList } = useListPageRequest(getMyAssetAPI)
</script>
<template>
<view class="asset-page pt-15 relative">
<NavBar />
<!-- <view class="flex justify-around">
<view
v-for="(tabItem, index) in tabList"
@click="tabIndex = index"
:key="tabItem.value"
class="flex items-center bg-#DEEBFF text-#3B81F3 rounded-full justify-center py-4 px-10"
:class="{ 'btn-gradient text-white': tabIndex === index }"
>
<view class="text-14">{{ tabItem.label }}</view>
</view>
</view> -->
<view class="relative z-1 mt-10 main-content pt-30 pb-30 rounded-t-15">
<view class="mb-15 px-25">资金明细</view>
<template v-if="assetList.length">
<view
class="flex px-25 py-12 border-b items-center border-#3333331A border-b-solid"
v-for="item in assetList"
:key="item.id"
>
<image src="/static/images/page-sub/invite-icon.png" class="w-48 h-48" />
<view class="flex flex-col flex-1 ml-15">
<view class="text-14 text-#333">{{ item.memo }}</view>
<view class="text-12 mt-4 text-#333">{{ item.createtime }}</view>
</view>
<view class="flex flex-col items-end">
<view class="text-17 font-bold text-gradient">{{ item.money }}</view>
</view>
</view>
</template>
<template v-else>
<wd-status-tip image="content" tip="暂无数据" />
</template>
</view>
<!-- <view class="mx-15 text-16 font-bold text-#333">我的资产</view>
<view
class="mt-15 mx-15 rounded-20 text-#476FFF main-content p-15 rounded-10 shadow-[0_5px_30px_rgba(149,195,255,0.4)]"
>
<view class="text-14 text-#6784C7">总投资金</view>
<view class="text-35 mt-10 font-bold">{{ detailInfo.suminvest }}</view>
</view>
<view class="text-16 mx-15 mb-15 font-bold text-#333 mt-30">资产记录</view>
-->
</view>
</template>
<style scoped>
.asset-page {
background-image: url('@/static/images/assets-bg.jpg');
background-repeat: no-repeat;
background-position: top center;
background-size: 100%;
}
.main-content {
background-color: #ffffff;
/* backdrop-filter: blur(60px); */
}
</style>
+3 -11
View File
@@ -37,18 +37,10 @@ const { list: assetList, onReload } = useListPageRequest(
onLoad((options) => { onLoad((options) => {
tabIndex.value = Number(options.tabIndex ?? 0) tabIndex.value = Number(options.tabIndex ?? 0)
onReload({
flagdata: unref(tabList)[tabIndex.value].value,
})
}) })
watch(
() => tabIndex.value,
(index) => {
onReload({
type: unref(tabList)[index].value,
})
},
{
immediate: true,
},
)
</script> </script>
<template> <template>
+9
View File
@@ -124,6 +124,15 @@
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{
"path": "asset-detail/index",
"type": "page",
"style": {
"navigationBarTitleText": "资金明细",
"navigationBarBackgroundColor": "#fff",
"navigationStyle": "custom"
}
},
{ {
"path": "convert/index", "path": "convert/index",
"type": "page", "type": "page",
+7 -1
View File
@@ -152,6 +152,12 @@ const handleAsset = (index = 0) => {
}) })
} }
const handleAssetDetail = () => {
uni.navigateTo({
url: '/pages-sub/asset-detail/index',
})
}
const handleBankCard = () => { const handleBankCard = () => {
uni.navigateTo({ uni.navigateTo({
url: '/pages-sub/withdrawal-type/index', url: '/pages-sub/withdrawal-type/index',
@@ -205,7 +211,7 @@ const commonList = [
{ {
title: '资金明细', title: '资金明细',
icon: CommonIcon6, icon: CommonIcon6,
handle: () => handleAsset(0), handle: handleAssetDetail,
}, },
{ {
title: '申请理赔', title: '申请理赔',
+1
View File
@@ -12,6 +12,7 @@ interface NavigateToOptions {
"/pages/my/index" | "/pages/my/index" |
"/pages/register/index" | "/pages/register/index" |
"/pages-sub/asset/index" | "/pages-sub/asset/index" |
"/pages-sub/asset-detail/index" |
"/pages-sub/convert/index" | "/pages-sub/convert/index" |
"/pages-sub/demo/index" | "/pages-sub/demo/index" |
"/pages-sub/hot-news/index" | "/pages-sub/hot-news/index" |