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 @@ - - + + - 验证密码 - + 钱包密码 + - 取消 验证 - - - +