-
-
Information
- +
+
+
- Information
+
+
+
Details
+
- Available salary:
+
+
+
+
+ Available salary:
Loading...
- {{ availableSalary }}
+ {{
+ availableSalary
+ }}
+
+
+
- Transfer to others
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ selectedPayee.name }}
+
+
+ ID: {{ selectedPayee.account || selectedPayee.id }}
+
+
+
+
+
+
+
+
+ Search
+
+
-
Transfer to others
- - -
-
-
@@ -81,9 +191,9 @@
import { ref, reactive, onMounted } from 'vue'
import { useRouter } from 'vue-router'
import MobileHeader from '../components/MobileHeader.vue'
-import {getBankBalance, userBankTransfer} from '../api/wallet.js'
+import { getBankBalance, userBankTransfer } from '../api/wallet.js'
import { getSelectedPayee, clearSelectedPayee } from '../utils/payeeStore.js'
-import {showError, showSuccess} from "@/utils/toast.js";
+import { showError, showSuccess } from '@/utils/toast.js'
const router = useRouter()
@@ -100,7 +210,7 @@ const selectedPayee = reactive({
type: '',
isHost: false,
isAgency: false,
- hasSalary: false
+ hasSalary: false,
})
// 初始化收款人信息
@@ -118,7 +228,7 @@ const coinOptions = reactive([
{ id: 3, amount: 100000, price: 10 },
{ id: 4, amount: 500000, price: 50 },
{ id: 5, amount: 1000000, price: 100 },
- { id: 6, amount: 2000000, price: 200 }
+ { id: 6, amount: 2000000, price: 200 },
])
// 获取银行余额
@@ -163,7 +273,7 @@ const clearPayee = () => {
type: '',
isHost: false,
isAgency: false,
- hasSalary: false
+ hasSalary: false,
})
clearSelectedPayee()
}
@@ -188,7 +298,7 @@ const transfer = async () => {
return
}
- const selectedCoinData = coinOptions.find(coin => coin.id === selectedCoin.value)
+ const selectedCoinData = coinOptions.find((coin) => coin.id === selectedCoin.value)
// 获取支付密码
// const password = prompt('Please enter your payment password:')
@@ -219,7 +329,6 @@ const transfer = async () => {
// 刷新银行余额
await fetchBankBalance()
-
} catch (error) {
// 错误处理
console.error('Transfer failed:', error)
@@ -242,6 +351,11 @@ onMounted(() => {
-
- {{ selectedPayee.name.charAt(0) }}
+
+
+
+
-
-
-
+
-
-
+
+
- {{ coin.amount }}
+ ${{ coin.price }}
-
- {{ selectedPayee.name }}
-ID: {{ selectedPayee.account || selectedPayee.id }}
- -
-
-
-
-
-
- Search
-
-
-
-
+
-
-
{{ coin.amount }}
- ${{ coin.price }}
+
+