['对接现金红包接口及样式处理']

This commit is contained in:
2021-10-15 09:49:18 +08:00
parent 01a9d8eb40
commit 9a89f3dded
16 changed files with 419 additions and 786 deletions

View File

@@ -4,25 +4,25 @@
<image src="/static/imgs/account-bg.png" mode="aspectFill" class="record-bg" />
<view class="propery-content">
<view class="currency">能量球钱包
<span>( {{ price || '0.00' }} CNY)</span>
</view>
<span>( {{ price || '0.00' }} CNY)</span>
</view>
<view class="balance">{{ balance.balance || '0.00' }}</view>
<!-- <view class="frozen">{{ balance.frozen || '0.00' }} 冻结中</view> -->
<view class="balance-flex">
<!-- <view class="balance-flex-item" @click="showAddress">区块链地址</view> -->
<view class="balance-flex-item" @click="showAddress">区块链地址</view>
<!-- <view class="balance-flex-item" @click="showPrivatekey('privatekey')">我的私钥</view> -->
<view class="balance-flex-item" @click="$Router.push({name: 'Extract'})">能量球提现</view>
<view class="balance-flex-item" @click="$Router.push({name: 'Extract'})">能量球转红包</view>
</view>
</view>
</view>
<!-- 账户记录 -->
<view class="record">
<!-- <view class="record-tabs">
<view class="tabs-item" :class="logsType === 0 ? 'show': ''" @click="onLogsType(0)">全部</view>
<view class="tabs-item" :class="logsType === 2 ? 'show': ''" @click="onLogsType(2)">收入</view>
<view class="tabs-item" :class="logsType === 1 ? 'show': ''" @click="onLogsType(1)">支出</view>
</view> -->
<record :list="logs" :logsType="0" />
<view class="record-tabs">
<view class="tabs-item" :class="logsType === '' ? 'show': ''" @click="onLogsType('')">全部</view>
<view class="tabs-item" :class="logsType === 'in' ? 'show': ''" @click="onLogsType('in')">收入</view>
<view class="tabs-item" :class="logsType === 'out' ? 'show': ''" @click="onLogsType('out')">支出</view>
</view>
<record :list="logs" :logsType="logsType" :hash='true' />
<!-- ios安全距离 -->
<view class="ios-bottom"></view>
</view>
@@ -32,13 +32,12 @@
<script>
import record from '@/components/property/record'
import h5Copy from '@/js_sdk/junyi-h5-copy/junyi-h5-copy/junyi-h5-copy'
import h5Copy from '@/js_sdk/junyi-h5-copy/junyi-h5-copy/junyi-h5-copy'
import {
sum,
price,
logs,
code,
securityCheck // 输入旧密码是否正确
code
} from '@/apis/interfaces/wallet'
import numberJpan from "@/components/numberJpan/numberJpan.vue";
export default {
@@ -50,7 +49,7 @@
balance: {},
price: '0.00',
logs: [],
logsType: 0,
logsType: '', // ''全部in入out出
password: '',
passwordPages: ''
};
@@ -86,54 +85,25 @@
this.passwordPages = pages
this.$refs.showPassword.open('center')
},
// 验证私钥
payPassword(type) {
if (type === 'confirm') {
if (this.password === '') {
uni.showToast({
title: '请输入安全密码',
icon: 'none'
})
return
}
securityCheck(this.password).then(res => {
this.$refs.showPassword.close()
switch (this.passwordPages) {
case 'privatekey':
this.$Router.push({
name: 'Privatekey',
params: {
password: this.password
}
})
break;
case 'resetPassword':
this.$Router.push({
name: 'ResetPassword',
params: {
password: this.password
}
})
break;
}
this.password = ''
}).catch(err => {
uni.showToast({
title: err.message,
icon: 'none',
})
})
return
}
this.$refs.showPassword.close()
},
// 交易记录
onLogsType(index) {
if (this.logsType === index) return
this.logsType = index
let flag
switch(index){
case '':
flag = 0
break;
case 'in':
flag = 2
break;
case 'out':
flag = 1
break;
}
this.logs = []
logs({
flag: this.logsType
flag: flag
}).then(res => {
this.logs = res
})
@@ -145,7 +115,7 @@
content: '\n地址可以理解为银行卡卡号与他人转账时是区块链上的两个地址间的交易行为\n\n' + this.balance.address,
confirmText: '复制',
confirmColor: '#b11eff',
showCancel:false,
showCancel: false,
success: (res) => {
if (res.confirm) {
uni.setClipboardData({
@@ -153,7 +123,7 @@
success() {
uni.showToast({
title: '区块链地址已复制',
icon : 'none'
icon: 'none'
})
}
})
@@ -270,6 +240,7 @@
background-image: linear-gradient(to top, #7c52fc, #976dff);
position: relative;
overflow: hidden;
.record-bg {
position: absolute;
width: 100%;