diff --git a/apis/interfaces/withdraws.js b/apis/interfaces/withdraws.js
index 9fad558..66472f4 100644
--- a/apis/interfaces/withdraws.js
+++ b/apis/interfaces/withdraws.js
@@ -82,7 +82,14 @@ const withdrawsIndexLists = (data) => {
})
}
-//
+// 能量碎片记录
+ const userAccoutScores = (data) => {
+ return request({
+ url: 'user/account/scores',
+ method: 'get',
+ data: data
+ })
+ }
export {
accountsCreate,
@@ -93,5 +100,6 @@ export {
withdrawsAccountsDelete,
withdrawsIndexCreate,
withdrawsIndex,
- withdrawsIndexLists
+ withdrawsIndexLists,
+ userAccoutScores
}
diff --git a/components/property/record.vue b/components/property/record.vue
index a5a5ccd..6f090fd 100644
--- a/components/property/record.vue
+++ b/components/property/record.vue
@@ -1,7 +1,7 @@
-
+
{{item.hash || '-'}}
{{item.block_time || '-'}}
diff --git a/pages/wallet/addBank.vue b/pages/wallet/addBank.vue
index 768e856..1e98f00 100644
--- a/pages/wallet/addBank.vue
+++ b/pages/wallet/addBank.vue
@@ -173,6 +173,7 @@
duration: 3000
})
setTimeout(res => {
+ uni.setStorageSync('refresh',true)
uni.navigateBack({})
}, 3000)
}).catch(err => {
diff --git a/pages/wallet/bankList.vue b/pages/wallet/bankList.vue
index d69c7e0..06f86fd 100644
--- a/pages/wallet/bankList.vue
+++ b/pages/wallet/bankList.vue
@@ -1,6 +1,6 @@
-
@@ -13,8 +13,10 @@
-
+ size='50' />
+
+
+
@@ -96,6 +98,10 @@
withdrawsAccountsDelete(id).then(res => {
console.log(res)
that.lists.splice(index, 1)
+ if(that.lists.length === 0){
+ uni.navigateBack({})
+ uni.setStorageSync('refresh',true)
+ }
}).catch(err => {
this.$refs.uToast.show({
title: err.message,
@@ -147,7 +153,8 @@
z-index: 1;
.bankLogin {
- width: 80rpx;
+ width: 70rpx;
+ height: 70rpx;
opacity: .9;
}
diff --git a/pages/wallet/extract.vue b/pages/wallet/extract.vue
index 7c64fa1..42194b7 100644
--- a/pages/wallet/extract.vue
+++ b/pages/wallet/extract.vue
@@ -15,7 +15,8 @@
提现至银行卡
添加银行卡
- {{bankInfo.name?bankInfo.name:'选择银行卡'}}
+ {{bankInfo.name?bankInfo.name:'选择银行卡'}}
+
@@ -29,9 +30,9 @@
全部提现
- ≈ ¥{{total}}
+ ≈ ¥{{total.toFixed(2)}}
提现至银行卡
- 预计5- 10个工作日到账 手续费: {{tax}}%
+ 预计5- 10个工作日到账 手续费: {{tax}}%
@@ -45,19 +46,22 @@
return {
balance: 0, // 钱包能量球数量
tax: 0, // 当前手续费
- cost:1,// 每个能量球的价格
- total:0,// 约合人民币
+ cost: 1, // 每个能量球的价格
+ total: 0, // 约合人民币
card: '', // 银行卡号
withdraw_input: '', // 提现能量球数量
bank_accounts: 0,
- bankInfo:{}
+ bankInfo: {}
};
},
onLoad() {
this.getInfo()
},
- onReachBottom() {
-
+ onShow() {
+ if (uni.getStorageSync('refresh')) {
+ this.bankInfo = {}
+ this.getInfo()
+ }
},
methods: {
// 提现基本信息
@@ -67,6 +71,7 @@
this.tax = res.tax
this.cost = res.cost
this.bank_accounts = res.bank_accounts.length
+ uni.setStorageSync('refresh', false)
}).catch(err => {
uni.showToast({
title: err.message,
@@ -104,35 +109,49 @@
}
},
// 提现
- actions(){
+ actions() {
let data = {
- bank_account_id:this.bankInfo.bank_account_id,
- amount:Number(this.withdraw_input)
+ 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 === ''){
+ if (data.bank_account_id === undefined || data.bank_account_id === null || data.bank_account_id === '') {
uni.showToast({
- title:this.bank_accounts>0?'请选择银行卡':'请添加银行卡',
- icon:'none'
+ title: this.bank_accounts > 0 ? '请选择银行卡' : '请添加银行卡',
+ icon: 'none'
+ })
+ return;
+ }
+ if (data.amount === 0) {
+ uni.showToast({
+ title: '请输入能量球数量',
+ icon: 'none'
})
return;
}
uni.showModal({
- title:'温馨提示',
- content:'您是否确认提现,将会扣除' +this.tax+'%手续费' ,
- confirmColor:'#7c52fc',
- cancelColor:'#cacaca',
- cancelText:'我再想想',
- confirmText:'确认提现',
+ title: '温馨提示',
+ content: '您是否确认提现,将会扣除' + this.tax + '%手续费',
+ confirmColor: '#7c52fc',
+ cancelColor: '#cacaca',
+ cancelText: '我再想想',
+ confirmText: '确认提现',
success: (res) => {
- if(res.confirm){
- withdrawsIndex(data).then(res=>{
+ if (res.confirm) {
+ uni.showLoading({
+ title:'提交中'
+ })
+ withdrawsIndex(data).then(res => {
uni.showToast({
- title:res.message,
- icon:'none'
+ title: res,
+ icon: 'none',
+ duration:3000
})
this.withdraw_input = ''
this.total = ''
- this.getInfo()
+ setTimeout(res => {
+ this.getInfo()
+ uni.hideLoading()
+ }, 3000)
}).catch(err => {
uni.showToast({
title: err.message,
@@ -142,7 +161,7 @@
}
}
})
-
+
},
// 添加银行卡
addBanks() {
@@ -353,7 +372,7 @@
color: #cacaca;
font-size: 26rpx;
}
-
+
.total {
color: $mian-color;
margin-top: 20rpx;
diff --git a/pages/wallet/fragment.vue b/pages/wallet/fragment.vue
index 8554eb6..7179401 100644
--- a/pages/wallet/fragment.vue
+++ b/pages/wallet/fragment.vue
@@ -10,11 +10,8 @@
日账单
-
-
- 碎片个数
- {{account || '0.00'}} 个
-
+
+
+
+
+
+
+ {{date?date:'选择日期'}}
+
+
+
+
+ 全部
+ 待发放
+ 已发放
+
-
+ 当前碎片个数
+ {{score || '0.00'}} 个
@@ -34,10 +45,10 @@
- 完成任务获得碎片
- {{cointype==='in'?'+':'-'}}5
+ {{item.remark}}
+ {{item.amount}}
- 2021-12-22 12:12:12
+ {{item.created_at}}
@@ -50,15 +61,14 @@