优化代码

This commit is contained in:
wuxw 2024-06-08 18:33:00 +08:00
parent 68978fd5b3
commit a30c22432d

View File

@ -111,6 +111,7 @@
this.loadOwnerHeaderImg(); this.loadOwnerHeaderImg();
this.loadOwnerAccount(); this.loadOwnerAccount();
this.loadOwnerCoupon(); this.loadOwnerCoupon();
this.loadUserIntegral();
}, },
ckeckUserInfo: function() { ckeckUserInfo: function() {
return context.checkLoginStatus(); return context.checkLoginStatus();
@ -162,22 +163,12 @@
} }
_that.accounts = data; _that.accounts = data;
let blanceSum = 0; let blanceSum = 0;
let interSum = 0;
//let kaSum = 0;
_that.accounts.forEach((v, k) => { _that.accounts.forEach((v, k) => {
// if(v.acctType == '2005'){
// kaSum += parseFloat(v.amount);
// }
if(v.acctType == '2004'){
interSum += parseFloat(v.amount);
}
if(v.acctType == '2003'){ if(v.acctType == '2003'){
blanceSum += parseFloat(v.amount); blanceSum += parseFloat(v.amount);
} }
}) })
_that.blance = blanceSum.toFixed(2); _that.blance = blanceSum.toFixed(2);
_that.inter = interSum.toFixed(2);
//_that.ka = kaSum.toFixed(2);
}) })
} }
@ -206,6 +197,9 @@
}) })
} }
}); });
},
loadUserIntegral:function(){
}, },
showLongModel: function() { showLongModel: function() {
this.vc.navigateTo({ this.vc.navigateTo({