转账修改

This commit is contained in:
weiwei committed 2025-04-03 15:09:56 +08:00
1 parent 3c27c10871
commit 4269ce8ab8
4 files changed
+28 -10

No files matched your search

+22 -9
View File
@@ -1,6 +1,17 @@
<template>
<view class="bg-gray-100 flex-col min-h-screen">
<view class="bg-white p-4 card m-3 flex items-center justify-between active:bg-[#f0f0f0]" @click="targetWalletSelect">
<view class="bg-white p-4 card mx-3 my-1 mt-2 flex items-center justify-between">
<view class="flex items-center">
<image class="w-64 h-64 mr-2" :src="filePath(transferMoney.sourceWalletType.walletTypeIcon)" />
<view>{{ transferMoney.sourceWalletType.walletTypeName }}</view>
</view>
<view class="flex items-center">
<view class="main-text-28">余额:</view>
<view class="main-text-28 mr-1">{{ hooks.useMoney(transferMoney.sourceWalletType.balance) + "元" }}</view>
</view>
</view>
<view class="bg-white p-4 card mx-3 my-1 flex items-center justify-between active:bg-[#f0f0f0]" @click="targetWalletSelect">
<view class="flex items-center">
<image class="w-64 h-64 rounded-full mr-2" src="@/static/page/money-cny-circle-fill.svg" />
<view>转入到</view>
@@ -11,7 +22,7 @@
</view>
</view>
<view class="bg-white p-4 card m-3">
<view class="bg-white p-4 card mx-3 my-1">
<text class="text-gray-700 font-bold text-lg">转账金额</text>
<view class="flex-row items-center">
<text class="text-3xl text-[#333] mr-2">¥</text>
@@ -20,11 +31,13 @@
</view>
</view>
<!-- 金额限制提示 -->
<!-- <view class="h-30rpx">
<view v-if="storePrice(amount) > curTargetWallet?.balance" class="text-xs c-red px-8">注:转账金额不能超过钱包余额</view>
</view> -->
<view class="h-30rpx">
<view v-if="storePrice(amount) > transferMoney.sourceWalletType?.balance" class="text-xs c-red px-8">
注:转账金额不能超过钱包余额
</view>
</view>
<view class="p-4 font-bold mt-4">
<view class="p-4 font-bold mt-1">
<tm-button block @click="confirmTransfer" v-if="transferMoney.sourceWalletType.walletTypeId">确定转账</tm-button>
</view>
@@ -140,9 +153,9 @@ const confirmTransfer = async () => {
if (!amount.value || amount.value === "0" || amount.value === "0." || parseFloat(amount.value) === 0) {
return uni.showToast({ title: "金额不能为零", icon: "none" })
}
// if (numAmount > curSourceWallet.value.balance) {
// return uni.showToast({ title: "转账金额不能超过钱包余额", icon: "none" })
// }
if (numAmount > transferMoney.sourceWalletType.balance) {
return uni.showToast({ title: "转账金额不能超过钱包余额", icon: "none" })
}
console.log("state.sourceWalletTypeId", state.sourceWalletTypeId)
console.log("state.targetWalletTypeId", state.targetWalletTypeId)
+1
View File
@@ -71,6 +71,7 @@ const doTab = (e: any) => {
<tm-tag v-if="v.title == '充值'" size="m">{{ v.title }}</tm-tag>
<tm-tag v-if="v.title == '支付'" color="error" size="m">{{ v.title }}</tm-tag>
<tm-tag v-if="v.title == '退款'" color="info" size="m">{{ v.title }}</tm-tag>
<tm-tag v-if="v.title == '转账'" color="success" size="m">{{ v.title }}</tm-tag>
</view>
<view class="flex-row-center">
<text class="sub-text-30">{{ hooks.useMoney(v.price) }}元</text>
+1 -1
View File
@@ -184,7 +184,7 @@ const doTransferMoney = (v: any) => {
</view>
<view class="flex-row items-center justify-end space-x-20rpx m-t-10rpx">
<!-- <view v-if="v.walletTypeUniqueCode == 1 && !v.cardNumber" class="botder_btn" @tap.stop="openBindDialog(v)">绑定</view> -->
<!-- <view v-if="v.isRule == '1'" class="botder_btn" @tap.stop="doTransferMoney(v)">转账</view> -->
<view v-if="v.isRule == '1'" class="botder_btn" @tap.stop="doTransferMoney(v)">转账</view>
<view v-if="v.walletTypeUniqueCode == 1 && v.cardNumber && v.isFreeze != 1" class="botder_btn" @tap.stop="openFreezeDialog(v)">
申请冻结
</view>
+4
View File
@@ -122,6 +122,10 @@ async function checkAndRefreshToken(tokenStorage: any) {
const expiresDate = new Date(accessToken.expiresAt).getTime()
// console.log("过期时间", expiresDate)
// console.log("现在时间", new Date().getTime())
// console.log("现在时间大于过期时间吗", new Date().getTime() >= expiresDate)
// token已过期,尝试刷新
if (new Date().getTime() >= expiresDate) {
await autoLogin()