['现金红包部分页面添加及发现更多微调app端样式']

This commit is contained in:
2021-10-14 09:44:55 +08:00
parent 50fb945707
commit 01a9d8eb40
139 changed files with 62907 additions and 1049 deletions

View File

@@ -11,16 +11,6 @@
</view>
</view>
<view class="item-name">
提现至银行卡
<view class="right">
<view class="cardName" v-if="bank_accounts === 0" @click="addBanks">添加银行卡</view>
<view class="cardName" v-if='bank_accounts>0' @click="bankLists">{{bankInfo.name?bankInfo.name:'选择银行卡'}}
</view>
<uni-icons type="arrowright" size="12" color="#fff" />
</view>
</view>
<view class="withdrawing-content">
<view class="item">
<view style="flex: 1;">
@@ -33,8 +23,8 @@
</view>
</view>
<view class="total" v-if="total"> {{total.toFixed(2)}} </view>
<view class="btn" @click="actions">提现至银行卡</view>
<view class="des">预计5- 10个工作日到账 手续费: {{tax === '0'?'免手续费':tax+'%'}}</view>
<view class="btn" @click="actions">提现至红包</view>
<view class="des">提现到红包可在红包中提现到银行卡 手续费: </view>
</view>
</template>
@@ -133,13 +123,13 @@
bank_account_id: this.bankInfo.bank_account_id,
amount: Number(this.withdraw_input)
}
if (data.bank_account_id === undefined || data.bank_account_id === null || data.bank_account_id === '') {
uni.showToast({
title: this.bank_accounts > 0 ? '请选择银行卡' : '请添加银行卡',
icon: 'none'
})
return;
}
// if (data.bank_account_id === undefined || data.bank_account_id === null || data.bank_account_id === '') {
// uni.showToast({
// title: this.bank_accounts > 0 ? '请选择银行卡' : '请添加银行卡',
// icon: 'none'
// })
// return;
// }
if (data.amount === 0) {
uni.showToast({
title: '请输入能量球数量',
@@ -149,7 +139,7 @@
}
uni.showModal({
title: '温馨提示',
content:this.tax === '0'?'您是否确认提现交易将免手续费':'您是否确认提现将会扣除' + this.tax + '%手续费',
content:'您是否确认提现到红包,交易将免手续费',
confirmColor: '#7c52fc',
cancelColor: '#cacaca',
cancelText: '我再想想',
@@ -182,18 +172,6 @@
})
},
// 添加银行卡
addBanks() {
this.$Router.push({
name: 'addBank'
})
},
// 选择银行卡
bankLists() {
this.$Router.push({
name: 'bankList'
})
},
// 提现记录
withdrawDetail() {
this.$Router.push({

403
pages/wallet/extractRed.vue Normal file
View File

@@ -0,0 +1,403 @@
<template>
<view class="WithdrawingCoin ">
<view class="propery">
<image src="/static/imgs/account-bg.png" mode="aspectFill" class="record-bg" />
<view class="propery-content">
<view class="currency">可提现额度</view>
<view class="balance">{{ balance || '0.00' }}</view>
<view class="frozen" @click="withdrawDetail">提现记录</view>
</view>
</view>
<view class="item-name">
提现至银行卡
<view class="right">
<view class="cardName" v-if="bank_accounts === 0" @click="addBanks">添加银行卡</view>
<view class="cardName" v-if='bank_accounts>0' @click="bankLists">{{bankInfo.name?bankInfo.name:'选择银行卡'}}
</view>
<uni-icons type="arrowright" size="12" color="#fff" />
</view>
</view>
<view class="withdrawing-content">
<view class="item">
<view style="flex: 1;">
<view class="inputTxt">提现金额</view>
<input class="input_num" v-model="withdraw_input" @input='inputNum' type="number"
placeholder-style="color:#999;font-weight:normal; font-size:34rpx;"
placeholder="请输入提现金额" :disabled="balance===0" />
</view>
<view class="all" @click="all">全部提现</view>
</view>
</view>
<view class="total" v-if="total">≈ ¥{{total.toFixed(2)}} </view>
<view class="btn" @click="actions">提现至银行卡</view>
<view class="des">预计5- 10个工作日到账 手续费: {{tax === '0'?'免手续费':tax+'%'}}</view>
</view>
</template>
<script>
import {
withdrawsIndexCreate,
withdrawsIndex
} from '@/apis/interfaces/withdraws';
export default {
data() {
return {
balance: 0, // 钱包能量球金额
tax: 0, // 当前手续费
cost: 1, // 每个能量球的价格
total: 0, // 约合人民币
card: '', // 银行卡号
withdraw_input: '', // 提现能量球金额
bank_accounts: 0,
bankInfo: {}
};
},
onLoad() {
this.getInfo()
},
onShow() {
if (uni.getStorageSync('refresh')) {
this.bankInfo = {}
this.getInfo()
}
},
methods: {
// 提现基本信息
getInfo() {
withdrawsIndexCreate().then(res => {
this.balance = res.balance
this.tax = res.tax
this.cost = res.cost
this.bank_accounts = res.bank_accounts.length
this.withdraw_input = Number(res.balance)
this.total = Number(res.balance) * Number(res.cost)
uni.setStorageSync('refresh', false)
}).catch(err => {
uni.showToast({
title: err.message,
icon: 'none'
})
})
},
// 输入提现能量球金额
inputNum(e) {
let number = Number(e.detail.value)
console.log(number, this.balance)
if (number <= Number(this.balance)) {
this.total = Number(e.detail.value) * this.cost
} else {
this.total = 0
if (Number(this.balance) === 0) {
uni.showToast({
title: '当前不能提现',
icon: 'none',
duration: 2000
});
this.withdraw_input = 0
this.total = 0
} else {
uni.showToast({
title: '最大值能超过' + this.balance + '',
icon: 'none',
duration: 2000
});
this.withdraw_input = this.balance
this.total = this.balance * this.cost
}
}
},
// 点击全部
all() {
if (this.balance > 0) {
this.withdraw_input = this.balance
this.total = this.balance * this.cost
} else {
uni.showToast({
title: '啥也没有我也做不到~',
icon: 'none',
duration: 2000
})
this.withdraw_input = 0
}
},
// 提现
actions() {
let data = {
bank_account_id: this.bankInfo.bank_account_id,
amount: Number(this.withdraw_input)
}
if (data.bank_account_id === undefined || data.bank_account_id === null || data.bank_account_id === '') {
uni.showToast({
title: this.bank_accounts > 0 ? '请选择银行卡' : '请添加银行卡',
icon: 'none'
})
return;
}
if (data.amount === 0) {
uni.showToast({
title: '请输入能量球金额',
icon: 'none'
})
return;
}
uni.showModal({
title: '温馨提示',
content:this.tax === '0'?'您是否确认提现交易将免手续费':'您是否确认提现将会扣除' + this.tax + '%手续费',
confirmColor: '#7c52fc',
cancelColor: '#cacaca',
cancelText: '我再想想',
confirmText: '确认提现',
success: (res) => {
if (res.confirm) {
uni.showLoading({
title: '提交中'
})
withdrawsIndex(data).then(res => {
uni.showToast({
title: res,
icon: 'none',
duration: 3000
})
this.withdraw_input = ''
this.total = ''
setTimeout(res => {
this.getInfo()
uni.hideLoading()
}, 3000)
}).catch(err => {
uni.showToast({
title: err.message,
icon: 'none'
})
})
}
}
})
},
// 添加银行卡
addBanks() {
this.$Router.push({
name: 'addBank'
})
},
// 选择银行卡
bankLists() {
this.$Router.push({
name: 'bankList'
})
},
// 提现记录
withdrawDetail() {
this.$Router.push({
name: 'withdrawList'
})
}
}
}
</script>
<style lang="scss">
page {
width: 100%;
min-height: 100vh;
background-color: #f7f7f7;
}
.receiptCode {
color: #808080;
text-align: left;
// margin: $margin 0;
font-size: $title-size-m;
}
.WithdrawingCoin {
background-color: #f7f7f7;
width: 100%;
min-height: 100vh;
padding-bottom: 100rpx;
// 账户
.propery {
position: relative;
padding-top: var(--status-bar-height);
background-image: linear-gradient(to top, #7c52fc, #976dff);
position: relative;
overflow: hidden;
.record-bg {
position: absolute;
width: 120%;
height: 300rpx;
bottom: -50rpx;
right: -20rpx;
z-index: 1;
opacity: .5;
transform: rotate(-7deg);
}
.propery-content {
position: relative;
z-index: 1;
padding: $padding/2 $padding $padding*3;
text-align: center;
.currency {
font-size: $title-size-m;
color: rgba($color: white, $alpha: .8);
}
.balance {
font-size: $title-size * 2.5;
padding: $padding 0;
color: white;
}
.frozen {
background: rgba($color: #000000, $alpha: .1);
color: rgba($color: white, $alpha: .7);
display: inline-block;
font-size: 24rpx;
padding: 6rpx $padding;
border-radius: $radius-m;
border: solid 1rpx rgba($color: white, $alpha: .4)
}
}
}
}
.all {
color: $text-price;
width: 160rpx;
text-align: center;
}
.item-name {
text-align: center;
color: #303030;
font-weight: bold;
margin-bottom: $margin;
font-size: 30rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
background-image: linear-gradient(to right, #aaaaff, #aaaaff);
color: #fff;
margin: 30rpx;
padding: 30rpx;
.right {
flex: 1;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
font-size: 34rpx;
.cardName {
flex: 1;
}
}
}
.withdrawing-content {
background-color: #fff;
padding: $padding $padding $padding $padding * 2;
font-size: $title-size-m;
/* 绑定银行卡 */
.bank-card {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 0 45rpx 0 35rpx;
}
.item {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
padding: 20rpx 0;
span:nth-child(1) {
color: #666;
margin-right: 20rpx;
}
.inputTxt {
color: #999;
padding-bottom: 20rpx;
}
.input_num {
font-size: 60rpx;
color: #3a3a3a;
font-weight: bolder;
flex: 1;
}
}
.item-total {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
padding: $padding*1 0 0 0;
color: #3a3a3a;
.total {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
box-sizing: border-box;
.money {
padding-top: $padding *0.5;
}
}
.lists {
color: $text-price;
}
}
}
.btn {
background-image: linear-gradient(to right, #7c52fc, #976dff);
color: #fff;
border-radius: 10rpx;
text-align: center;
padding: $padding * .9;
margin: $margin * 3 $margin *2 $margin $margin*2;
font-size: $title-size;
font-weight: bold;
}
.des {
text-align: center;
color: #cacaca;
font-size: 26rpx;
}
.total {
color: $mian-color;
margin-top: 20rpx;
margin-left: 50rpx;
font-size: 36rpx;
}
</style>

View File

@@ -0,0 +1,396 @@
<template>
<view class="propertyIndex">
<view class="propery">
<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>
<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="showPrivatekey('privatekey')">我的私钥</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="logsType" />
<!-- ios安全距离 -->
<view class="ios-bottom"></view>
</view>
<!-- 支付密码 -->
<uni-popup ref="showPassword">
<view class="validationPassword">
<view class="from">
<view class="title">验证密码</view>
<input class="input" v-model="password" password placeholder="请验证安全密码" />
</view>
<view class="buttons">
<view class="button cancel" @click="payPassword('cancel', passwordPages)">取消</view>
<view class="button confirm" @click="payPassword('confirm', passwordPages)">验证</view>
</view>
</view>
</uni-popup>
<!-- 原密码弹窗 -->
<!-- <number-jpan :length="6" @closeChange="closeChange($event)" ref="numberPad"></number-jpan> -->
</view>
</template>
<script>
import record from '@/components/property/record'
import h5Copy from '@/js_sdk/junyi-h5-copy/junyi-h5-copy/junyi-h5-copy'
import {
sum,
price,
logs,
code,
securityCheck // 输入旧密码是否正确
} from '@/apis/interfaces/wallet'
import numberJpan from "@/components/numberJpan/numberJpan.vue";
export default {
components: {
record
},
data() {
return {
balance: {},
price: '0.00',
logs: [],
logsType: 0,
password: '',
passwordPages: ''
};
},
onShow() {
this.getsum()
this.getlog()
},
methods: {
getsum() {
sum().then(res => {
this.balance = res
this.price = res.price
}).catch(err => {
uni.showToast({
icon: 'none',
title: err.message
})
})
},
getlog() {
logs().then(res => {
this.logs = res
}).catch(err => {
uni.showToast({
icon: 'none',
title: err.message
})
})
},
// 弹出私钥
showPrivatekey(pages) {
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
this.logs = []
logs({
flag: this.logsType
}).then(res => {
this.logs = res
})
},
// 区块地址
showAddress() {
uni.showModal({
title: '我的区块链地址',
content: '\n地址可以理解为银行卡卡号与他人转账时是区块链上的两个地址间的交易行为\n\n' + this.balance.address,
confirmText: '复制',
confirmColor: '#b11eff',
showCancel:false,
success: (res) => {
if (res.confirm) {
uni.setClipboardData({
data: this.balance.address,
success() {
uni.showToast({
title: '区块链地址已复制',
icon : 'none'
})
}
})
}
}
})
}
},
onNavigationBarButtonTap(e) {
if (e.index === 0) {
uni.showActionSheet({
// itemList: ['转账', '收款', '提币', '修改密码'],
itemList: ['提现', '修改密码'],
success: (res) => {
switch (res.tapIndex) {
case 0:
console.log('提现了,')
this.$Router.push({
name: 'Extract'
})
break;
case 1:
this.showPrivatekey('resetPassword')
break;
}
uni.hideLoading()
}
})
}
}
}
</script>
<style lang="scss" scoped>
.propertyIndex {
width: 100%;
min-height: 100vh;
background-color: #FFFFFF;
}
// 验证密码弹出层
.validationPassword {
background-color: white;
border-radius: $radius-m;
width: 70vw;
.from {
padding: $padding*2;
.title {
text-align: center;
font-size: $title-size;
padding-bottom: $padding*2;
font-weight: bold;
color: $text-price;
}
.input {
text-align: center;
height: 90rpx;
font-size: $title-size;
border-radius: $radius-m;
background: $border-color-lg;
padding: 0 ($padding*2);
}
}
.buttons {
display: flex;
border-top: solid 1rpx $border-color;
.button {
width: 50%;
font-size: $title-size;
line-height: 90rpx;
height: 90rpx;
text-align: center;
box-sizing: border-box;
&.cancel {
border-right: solid 1rpx $border-color;
color: $text-gray;
}
&.confirm {
color: $text-price;
}
}
}
// .button{
// background-color: $text-price;
// color: white;
// border-radius: $radius-m;
// border: none;
// margin-top: $margin*2;
// font-size: $title-size;
// height: 90rpx;
// line-height: 90rpx;
// }
// .close{
// @extend .button;
// text-align: center;
// color: $text-gray;
// margin-top: $margin;
// background-color: transparent;
// }
}
// 账户
.propery {
position: relative;
padding-top: var(--status-bar-height);
background-image: linear-gradient(to top, #7c52fc, #976dff);
position: relative;
overflow: hidden;
.record-bg {
position: absolute;
width: 100%;
height: 300rpx;
bottom: 0;
right: 0;
z-index: 1;
opacity: .5;
transform: rotate(0);
}
// &::before {
// position: absolute;
// left: 0;
// top: 0;
// width: 100%;
// height: 100%;
// content: " ";
// background-image: url(@/static/imgs/account-bg.png);
// background-size: 100%;
// background-repeat: no-repeat;
// opacity: .5;
// transform:rotate(0deg);
// }
.propery-content {
position: relative;
z-index: 1;
padding: $padding/2 $padding $padding*3;
text-align: center;
.currency {
font-size: $title-size-m;
color: rgba($color: white, $alpha: .8);
}
.balance {
font-size: $title-size * 2.5;
padding: $padding 0;
color: white;
}
.frozen {
background: rgba($color: #000000, $alpha: .1);
color: rgba($color: white, $alpha: .7);
display: inline-block;
font-size: 24rpx;
padding: 6rpx $padding;
border-radius: $radius-m;
border: solid 1rpx rgba($color: white, $alpha: .4)
}
.balance-flex {
display: flex;
justify-content: center;
margin-top: $margin * 2;
.balance-flex-item {
background-color: white;
width: 200rpx;
height: 75rpx;
line-height: 75rpx;
color: $text-price;
margin: 0 $margin;
border-radius: $radius-m;
font-size: 28rpx;
}
}
}
}
// 记录
.record {
background-color: white;
border-radius: $radius $radius 0 0;
padding: $padding ($padding * 2);
margin-top: -$margin;
position: relative;
z-index: 2;
.record-tabs {
display: flex;
justify-content: space-around;
font-weight: bold;
font-size: $title-size;
color: $text-gray;
line-height: 70rpx;
margin-bottom: $margin;
.tabs-item {
position: relative;
padding: 0 $padding;
&.show {
color: $text-price;
&::before {
position: absolute;
bottom: 0;
left: $padding;
right: $padding;
height: 4rpx;
content: " ";
background-color: $text-price;
}
}
}
}
}
</style>

View File

@@ -9,7 +9,7 @@
<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>
@@ -17,30 +17,16 @@
</view>
<!-- 账户记录 -->
<view class="record">
<view class="record-tabs">
<!-- <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="logsType" />
</view> -->
<record :list="logs" :logsType="0" />
<!-- ios安全距离 -->
<view class="ios-bottom"></view>
</view>
<!-- 支付密码 -->
<uni-popup ref="showPassword">
<view class="validationPassword">
<view class="from">
<view class="title">验证密码</view>
<input class="input" v-model="password" password placeholder="请验证安全密码" />
</view>
<view class="buttons">
<view class="button cancel" @click="payPassword('cancel', passwordPages)">取消</view>
<view class="button confirm" @click="payPassword('confirm', passwordPages)">验证</view>
</view>
</view>
</uni-popup>
<!-- 原密码弹窗 -->
<!-- <number-jpan :length="6" @closeChange="closeChange($event)" ref="numberPad"></number-jpan> -->
</view>
</template>

View File

@@ -0,0 +1,396 @@
<template>
<view class="propertyIndex">
<view class="propery">
<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>
<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="showPrivatekey('privatekey')">我的私钥</view> -->
<view class="balance-flex-item" @click="$Router.push({name: 'ExtractRed'})">红包提现</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="logsType" />
<!-- ios安全距离 -->
<view class="ios-bottom"></view>
</view>
<!-- 支付密码 -->
<uni-popup ref="showPassword">
<view class="validationPassword">
<view class="from">
<view class="title">验证密码</view>
<input class="input" v-model="password" password placeholder="请验证安全密码" />
</view>
<view class="buttons">
<view class="button cancel" @click="payPassword('cancel', passwordPages)">取消</view>
<view class="button confirm" @click="payPassword('confirm', passwordPages)">验证</view>
</view>
</view>
</uni-popup>
<!-- 原密码弹窗 -->
<!-- <number-jpan :length="6" @closeChange="closeChange($event)" ref="numberPad"></number-jpan> -->
</view>
</template>
<script>
import record from '@/components/property/record'
import h5Copy from '@/js_sdk/junyi-h5-copy/junyi-h5-copy/junyi-h5-copy'
import {
sum,
price,
logs,
code,
securityCheck // 输入旧密码是否正确
} from '@/apis/interfaces/wallet'
import numberJpan from "@/components/numberJpan/numberJpan.vue";
export default {
components: {
record
},
data() {
return {
balance: {},
price: '0.00',
logs: [],
logsType: 0,
password: '',
passwordPages: ''
};
},
onShow() {
this.getsum()
this.getlog()
},
methods: {
getsum() {
sum().then(res => {
this.balance = res
this.price = res.price
}).catch(err => {
uni.showToast({
icon: 'none',
title: err.message
})
})
},
getlog() {
logs().then(res => {
this.logs = res
}).catch(err => {
uni.showToast({
icon: 'none',
title: err.message
})
})
},
// 弹出私钥
showPrivatekey(pages) {
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
this.logs = []
logs({
flag: this.logsType
}).then(res => {
this.logs = res
})
},
// 区块地址
showAddress() {
uni.showModal({
title: '我的区块链地址',
content: '\n地址可以理解为银行卡卡号与他人转账时是区块链上的两个地址间的交易行为\n\n' + this.balance.address,
confirmText: '复制',
confirmColor: '#b11eff',
showCancel:false,
success: (res) => {
if (res.confirm) {
uni.setClipboardData({
data: this.balance.address,
success() {
uni.showToast({
title: '区块链地址已复制',
icon : 'none'
})
}
})
}
}
})
}
},
onNavigationBarButtonTap(e) {
if (e.index === 0) {
uni.showActionSheet({
// itemList: ['转账', '收款', '提币', '修改密码'],
itemList: ['提现', '修改密码'],
success: (res) => {
switch (res.tapIndex) {
case 0:
console.log('提现了,')
this.$Router.push({
name: 'Extract'
})
break;
case 1:
this.showPrivatekey('resetPassword')
break;
}
uni.hideLoading()
}
})
}
}
}
</script>
<style lang="scss" scoped>
.propertyIndex {
width: 100%;
min-height: 100vh;
background-color: #FFFFFF;
}
// 验证密码弹出层
.validationPassword {
background-color: white;
border-radius: $radius-m;
width: 70vw;
.from {
padding: $padding*2;
.title {
text-align: center;
font-size: $title-size;
padding-bottom: $padding*2;
font-weight: bold;
color: $text-price;
}
.input {
text-align: center;
height: 90rpx;
font-size: $title-size;
border-radius: $radius-m;
background: $border-color-lg;
padding: 0 ($padding*2);
}
}
.buttons {
display: flex;
border-top: solid 1rpx $border-color;
.button {
width: 50%;
font-size: $title-size;
line-height: 90rpx;
height: 90rpx;
text-align: center;
box-sizing: border-box;
&.cancel {
border-right: solid 1rpx $border-color;
color: $text-gray;
}
&.confirm {
color: $text-price;
}
}
}
// .button{
// background-color: $text-price;
// color: white;
// border-radius: $radius-m;
// border: none;
// margin-top: $margin*2;
// font-size: $title-size;
// height: 90rpx;
// line-height: 90rpx;
// }
// .close{
// @extend .button;
// text-align: center;
// color: $text-gray;
// margin-top: $margin;
// background-color: transparent;
// }
}
// 账户
.propery {
position: relative;
padding-top: var(--status-bar-height);
background-image: linear-gradient(to top, #7c52fc, #976dff);
position: relative;
overflow: hidden;
.record-bg {
position: absolute;
width: 100%;
height: 300rpx;
bottom: 0;
right: 0;
z-index: 1;
opacity: .5;
transform: rotate(0);
}
// &::before {
// position: absolute;
// left: 0;
// top: 0;
// width: 100%;
// height: 100%;
// content: " ";
// background-image: url(@/static/imgs/account-bg.png);
// background-size: 100%;
// background-repeat: no-repeat;
// opacity: .5;
// transform:rotate(0deg);
// }
.propery-content {
position: relative;
z-index: 1;
padding: $padding/2 $padding $padding*3;
text-align: center;
.currency {
font-size: $title-size-m;
color: rgba($color: white, $alpha: .8);
}
.balance {
font-size: $title-size * 2.5;
padding: $padding 0;
color: white;
}
.frozen {
background: rgba($color: #000000, $alpha: .1);
color: rgba($color: white, $alpha: .7);
display: inline-block;
font-size: 24rpx;
padding: 6rpx $padding;
border-radius: $radius-m;
border: solid 1rpx rgba($color: white, $alpha: .4)
}
.balance-flex {
display: flex;
justify-content: center;
margin-top: $margin * 2;
.balance-flex-item {
background-color: white;
width: 200rpx;
height: 75rpx;
line-height: 75rpx;
color: $text-price;
margin: 0 $margin;
border-radius: $radius-m;
font-size: 28rpx;
}
}
}
}
// 记录
.record {
background-color: white;
border-radius: $radius $radius 0 0;
padding: $padding ($padding * 2);
margin-top: -$margin;
position: relative;
z-index: 2;
.record-tabs {
display: flex;
justify-content: space-around;
font-weight: bold;
font-size: $title-size;
color: $text-gray;
line-height: 70rpx;
margin-bottom: $margin;
.tabs-item {
position: relative;
padding: 0 $padding;
&.show {
color: $text-price;
&::before {
position: absolute;
bottom: 0;
left: $padding;
right: $padding;
height: 4rpx;
content: " ";
background-color: $text-price;
}
}
}
}
}
</style>