混淆,改动代码
This commit is contained in:
@@ -20,8 +20,8 @@
|
||||
</text>
|
||||
</view>
|
||||
<view class="list">
|
||||
<scroll-view @scrolltolower="scrolltolower" :refresher-enabled="refresherTriggered"
|
||||
@scrolltoupper="scrolltoupper" scroll-y="true"
|
||||
<scroll-view @scrollToLower="scrollToLower" :refresher-enabled="refresherTriggered"
|
||||
@scrollToUpper="scrollToUpper" scroll-y="true"
|
||||
style="width: 100%;height: 100%;background-color: #ffffff;padding-bottom: 30rpx;">
|
||||
<view class="list-item flex align-center justify-center" v-for="(item,index) in list" :key="index">
|
||||
<view class="list-item-box flex align-center justify-between">
|
||||
@@ -80,7 +80,7 @@
|
||||
},
|
||||
onShow() {
|
||||
this.getAmount()
|
||||
this.getList()
|
||||
this.getUserBalanceList()
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.getAmount()
|
||||
@@ -93,7 +93,7 @@
|
||||
getAmount() {
|
||||
this.$Request.getT('app/moneyDetails/selectUserMoney').then(res => {
|
||||
uni.stopPullDownRefresh()
|
||||
if (res.code == 0) {
|
||||
if (res.code === 0) {
|
||||
this.amount = res.data.amount || 0
|
||||
} else {
|
||||
this.amount = '0.00'
|
||||
@@ -106,7 +106,7 @@
|
||||
}
|
||||
this.$Request.getT('app/cash/withdraw', params).then(res => {
|
||||
console.log(res)
|
||||
if (res.code == 0) {
|
||||
if (res.code === 0) {
|
||||
// this.amount = res.data.amount
|
||||
} else {
|
||||
// this.amount = '0.00'
|
||||
@@ -120,7 +120,7 @@
|
||||
/**
|
||||
* 获取余额明细
|
||||
*/
|
||||
getList() {
|
||||
getUserBalanceList() {
|
||||
let data = {
|
||||
page: this.page,
|
||||
limit: this.limit
|
||||
@@ -129,14 +129,14 @@
|
||||
setTimeout(() => {
|
||||
this.refresherTriggered = false
|
||||
}, 1500)
|
||||
if (res.code == 0) {
|
||||
if (res.code === 0) {
|
||||
this.pages = res.data.pages
|
||||
if (this.page < this.pages) {
|
||||
this.status = 'loadmore'
|
||||
} else {
|
||||
this.status = 'nomore'
|
||||
}
|
||||
if (this.page == 1) {
|
||||
if (this.page === 1) {
|
||||
this.list = res.data.records
|
||||
} else {
|
||||
this.list = [...this.list, ...res.data.records]
|
||||
@@ -150,17 +150,17 @@
|
||||
})
|
||||
},
|
||||
//上拉刷新
|
||||
scrolltoupper() {
|
||||
scrollToUpper() {
|
||||
this.page = 1
|
||||
this.refresherTriggered = true
|
||||
this.getList()
|
||||
this.getUserBalanceList()
|
||||
},
|
||||
//加载更多
|
||||
scrolltolower() {
|
||||
scrollToLower() {
|
||||
if (this.page < this.pages) {
|
||||
this.status = 'loading'
|
||||
this.page += 1
|
||||
this.getList()
|
||||
this.getUserBalanceList()
|
||||
} else {
|
||||
this.status = 'nomore'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user