-
@@ -153,14 +155,14 @@
-
-
@@ -218,7 +220,7 @@ const fetchData = async () => {
// Set defaults if empty
if (!form.avatar) form.avatar = 'https://api.dicebear.com/7.x/avataaars/svg?seed=Master1';
}
- if (accounts) payoutAccounts.value = accounts;
+ payoutAccounts.value = accounts || [];
} catch (e) {
console.error(e);
}
@@ -263,6 +265,13 @@ const handleFileChange = async (event) => {
};
const handleAddAccount = async () => {
+ if (payoutAccounts.value.length >= 1) {
+ toast.add({ severity: 'error', summary: '限制', detail: '仅支持一个收款账户', life: 3000 });
+ return;
+ }
+ if (newAccount.type === 'alipay') {
+ newAccount.name = '支付宝';
+ }
if (!newAccount.name || !newAccount.account || !newAccount.realname) {
toast.add({ severity: 'warn', summary: '提示', detail: '请填写完整信息', life: 3000 });
return;