From 9a6eeff200c268ba84fcacac818892237ab6ea05 Mon Sep 17 00:00:00 2001 From: asd <374367073@qq.com> Date: Thu, 15 Oct 2020 20:12:21 +0800 Subject: [PATCH] =?UTF-8?q?=E9=92=B1=E5=8C=85=20=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E6=88=90=E5=8A=9Fid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/index.ts | 50 ++++++++- src/views/mine/Addaccount.vue | 35 ++++-- src/views/mine/Cashout.vue | 56 ++++++++-- src/views/mine/Wallet.vue | 201 +++++++++++++++++++--------------- 4 files changed, 232 insertions(+), 110 deletions(-) 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 @@