feat: 前端重构

This commit is contained in:
anonymous
2025-01-07 18:04:40 +08:00
parent dbb57f07c3
commit 21d8f75f6a
43 changed files with 705 additions and 359 deletions
+25 -10
View File
@@ -8,7 +8,7 @@
</route>
<template>
<view class="min-h-screen pb-100">
<NavBar>
<NavBar :title="title" title-color="#333">
<template #right>
<image
@click="onWithdrawalDetail"
@@ -17,26 +17,32 @@
/>
</template>
</NavBar>
<view class="p-15">
<view
class="m-15 text-white flex rounded-tl-10 rounded-br-10 justify-between items-center p-15 bg-[linear-gradient(90deg,rgba(59,129,243,0.5),#3B81F3)]"
>
<view class="text-14">{{ type === 0 ? '养老金' : '团队佣金' }}余额</view>
<view class="text-17 font-bold">{{ userStore.userInfo.money }}</view>
</view>
<view class="p-15 bg-white shadow-[0_-2px_3px_rgba(10,68,245,0.1)] rounded-10">
<view class="mt-15">
<view class="flex items-center justify-between">
<view class="text-14 text-#333">我的股数</view>
<view class="text-12 text-#999">可转换股数{{ userStore.userInfo.score }}</view>
</view>
<view
class="flex items-center text-14 mt-15 text-#333 p-16 shadow-[0_0_10px_rgba(10,68,245,0.1)] rounded-10"
>
<input
v-model="convertNum"
type="number"
placeholder="请输入股数"
placeholder="转出金额"
class="text-14 text-#333 flex-1"
/>
<view class="text-12 text-gradient" @click="convertNum = userStore.userInfo.score">
全部
</view>
</view>
<view class="text-12 text-#889BC6 mt-15">马尔代夫股权每股价值500元</view>
<view class="text-14 text-#889BC6 mt-30">提现说明TIPS</view>
<view class="text-12 text-#889BC6 mt-15">
<view>1如遇到系统结算繁忙转换将会延迟到账</view>
<view class="mt-4">2提现将会提现至您的工商银行卡;</view>
</view>
</view>
</view>
<view
@@ -47,7 +53,7 @@
class="btn-gradient flex-1 text-center text-white rounded-full text-14 px-30 py-10"
@click="onSubmit"
>
确认转换至余额
确认转换至{{ type === 0 ? '余额' : '养老金' }}
</view>
</view>
</view>
@@ -66,7 +72,7 @@ const convertNum = ref('')
const onWithdrawalDetail = () => {
uni.navigateTo({
url: '/pages-sub/asset/index',
url: `/pages-sub/asset/index?tabIndex=${type.value ? 3 : 2}`,
})
}
@@ -79,6 +85,15 @@ const onSubmit = mergeStep(async () => {
userStore.loadUserInfo()
onWithdrawalDetail()
})
const type = ref(0)
onLoad((options) => {
type.value = Number(options.type ?? 0)
})
const title = computed(() => {
return type.value === 0 ? '养老金转余额' : '团队佣金转养老金'
})
</script>
<style scoped></style>