From 31388942681cd45d4b259f11e01fc2bf79fe1ca0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=94=90=E6=98=8E=E6=98=8E?= <970899069@qq.com> Date: Wed, 12 Jan 2022 18:02:07 +0800 Subject: [PATCH] =?UTF-8?q?=E9=92=B1=E5=8C=85=EF=BC=8C=E9=AA=8C=E8=AF=81?= =?UTF-8?q?=E5=AF=86=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apis/interfaces/wallet.js | 33 ++++++- components/property/record.vue | 91 ++++++++++++++++++++ pages.json | 26 +++++- pages/user/index.vue | 7 +- pages/wallet/property.vue | 151 +++++++++++++-------------------- static/icon/logs-null.png | Bin 0 -> 5610 bytes static/iconfont.css | 4 + static/iconfont.ttf | Bin 2872 -> 3016 bytes 8 files changed, 219 insertions(+), 93 deletions(-) create mode 100644 components/property/record.vue create mode 100644 static/icon/logs-null.png diff --git a/apis/interfaces/wallet.js b/apis/interfaces/wallet.js index 42f7a38..67c6e49 100644 --- a/apis/interfaces/wallet.js +++ b/apis/interfaces/wallet.js @@ -7,6 +7,7 @@ import { request } from '../index' +// 设置密码 const security = data => { return request({ url: 'chain/safe/security', @@ -15,6 +16,7 @@ const security = data => { }) } +// 获取助记词 const seed = data => { return request({ url: 'chain/safe/seed', @@ -22,7 +24,36 @@ const seed = data => { }) } +// 余额 +const sum = () => { + return request({ + url: 'chain/account/balance' + }) +} + +// 账户记录 +const logs = data => { + return request({ + url: 'chain/account/logs', + data + }) +} + +// 验证密码 +const securityCheck = (password) => { + return request({ + url : "chain/safe/security/check", + method: 'POST', + data:{ + code : password, + } + }) +} + export { security, - seed + seed, + sum, + logs, + securityCheck } diff --git a/components/property/record.vue b/components/property/record.vue new file mode 100644 index 0000000..2172273 --- /dev/null +++ b/components/property/record.vue @@ -0,0 +1,91 @@ + + + + + diff --git a/pages.json b/pages.json index 26c757a..400dee0 100644 --- a/pages.json +++ b/pages.json @@ -262,7 +262,31 @@ "navigationBarBackgroundColor":"#FFFFFF", "enablePullDownRefresh": false } - }], + },{ + "path": "pages/wallet/property", + "name": "WalletProperty", + "style": { + "navigationBarTitleText": "ZH钱包", + "navigationBarTextStyle":"white", + "app-plus": { + "titleNView": { + "backgroundImage": "linear-gradient(to right, #34ce98, #22aa98)", + "type": "transparent", + "buttons": [{ + "float": "right", + "text": "\ue607", + "fontSrc": "/static/iconfont.ttf", + "color": "#FFF", + "fontSize": "20px", + "background": "rgba(0,0,0,0)" + }], + "backButton":{ + "background": "rgba(0,0,0,0)" + } + } + } + } + }], "tabBar": { "borderStyle": "white", "selectedColor": "#34CE98", diff --git a/pages/user/index.vue b/pages/user/index.vue index 72512c0..fec7a91 100644 --- a/pages/user/index.vue +++ b/pages/user/index.vue @@ -86,7 +86,12 @@ - ZH钱包 + ZH钱包(首次) + + + + + ZH钱包(钱包) diff --git a/pages/wallet/property.vue b/pages/wallet/property.vue index 382afc4..c66b066 100644 --- a/pages/wallet/property.vue +++ b/pages/wallet/property.vue @@ -2,7 +2,7 @@ - 原石 (≈ {{ price || '0' }} CNY) + 钱包余额 {{ balance.balance || '0' }} {{ balance.frozen || '0' }} 冻结中 @@ -22,58 +22,46 @@ - - + + - 验证密码 - + 钱包密码 + - 取消 验证 - - - +