diff --git a/src/api/index.ts b/src/api/index.ts index 5d21b42..fd571eb 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -82,6 +82,7 @@ interface Wallect { export async function getwallect(){ const res = await get>('wallect') console.log(res) + return res.data } /** @@ -285,8 +286,9 @@ interface SaleInfo{ * @param data */ export async function saleinfo(data?:any){ - const res= await get('account',data) + const res= await get>('account',data) console.log(res) + return res.data } /** @@ -298,6 +300,52 @@ export async function cashout(data?:any){ message.success("新增成功") } } +/** + * 账户详情 + */ +interface AccountInfo{ + wallectid:number, + typeid:number, + type:number, + account:number, + mname:string, + bankcode:string, + bankname:string +} +export async function getaccountinfo(data?: any){ + const res=await get('wallect/'+data) + console.log(res,2333) + return { + accountid:res.data.wallectid, + type:res.data.type, + account:res.data.account, + mname:res.data.mname, + bankcode:res.data.bankcode, + bankname:res.data.bankname + } +} + +/** + * 账户编辑 + */ +export async function editaccount(data?:any){ + const res=await put('wallect/'+data); + if(res.code==0){ + message.success("修改成功") + } +} +/** + * 删除账户 + */ +export async function deleteaccount(data:any) { + + const res = await del('wallect/'+data); + if(res.code==0){ + message.success("删除成功") + } + + console.log(res) +} /** * 发送验证码 * @param phone 手机号 diff --git a/src/views/mine/Addaccount.vue b/src/views/mine/Addaccount.vue index 2765896..124a1ac 100644 --- a/src/views/mine/Addaccount.vue +++ b/src/views/mine/Addaccount.vue @@ -17,14 +17,14 @@
- 银行卡 + 银行卡zzz @@ -59,7 +59,7 @@
-
+
@@ -85,7 +85,7 @@
-
+
帐号 @@ -97,7 +97,7 @@
-
+
扫码绑定
@@ -152,9 +152,10 @@