feat:精度丢失

This commit is contained in:
2025-08-16 18:14:11 +08:00
parent 3e01694e82
commit bed9fef247
2 changed files with 93 additions and 85 deletions
+85 -84
View File
@@ -1,84 +1,85 @@
{
"id": "tb",
"name": "tb",
"displayName": "tb",
"version": "1.0.2",
"description": "信任桥",
"keywords": [
"tb",
"信任桥"
],
"dcloudext": {
"category": [],
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "无",
"data": "无",
"permissions": "无"
},
"npmurl": ""
},
"repository": "",
"uni_modules": {
"platforms": {
"cloud": {
"tcb": "y",
"aliyun": "y"
},
"client": {
"App": {
"app-vue": "u",
"app-nvue": "u"
},
"H5-mobile": {
"Safari": "u",
"Android Browser": "u",
"微信浏览器(Android)": "u",
"QQ浏览器(Android)": "u"
},
"H5-pc": {
"Chrome": "u",
"IE": "u",
"Edge": "u",
"Firefox": "u",
"Safari": "u"
},
"小程序": {
"微信": "u",
"阿里": "u",
"百度": "u",
"字节跳动": "u",
"QQ": "u",
"京东": "u"
},
"快应用": {
"华为": "u",
"联盟": "u"
},
"Vue": {
"vue2": "u",
"vue3": "u"
}
}
}
},
"dependencies": {
"axios": "0.27.2",
"axios-adapter-uniapp": "^0.1.4",
"axios-miniprogram-adapter": "^0.3.4",
"crypto-js": "^4.2.0",
"echarts": "^5.1.2",
"dayjs": "^1.11.13",
"qs": "^6.14.0"
}
}
{
"id": "tb",
"name": "tb",
"displayName": "tb",
"version": "1.0.2",
"description": "信任桥",
"keywords": [
"tb",
"信任桥"
],
"dcloudext": {
"category": [],
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "无",
"data": "无",
"permissions": "无"
},
"npmurl": ""
},
"repository": "",
"uni_modules": {
"platforms": {
"cloud": {
"tcb": "y",
"aliyun": "y"
},
"client": {
"App": {
"app-vue": "u",
"app-nvue": "u"
},
"H5-mobile": {
"Safari": "u",
"Android Browser": "u",
"微信浏览器(Android)": "u",
"QQ浏览器(Android)": "u"
},
"H5-pc": {
"Chrome": "u",
"IE": "u",
"Edge": "u",
"Firefox": "u",
"Safari": "u"
},
"小程序": {
"微信": "u",
"阿里": "u",
"百度": "u",
"字节跳动": "u",
"QQ": "u",
"京东": "u"
},
"快应用": {
"华为": "u",
"联盟": "u"
},
"Vue": {
"vue2": "u",
"vue3": "u"
}
}
}
},
"dependencies": {
"axios": "0.27.2",
"axios-adapter-uniapp": "^0.1.4",
"axios-miniprogram-adapter": "^0.3.4",
"bignumber.js": "^9.3.1",
"crypto-js": "^4.2.0",
"dayjs": "^1.11.13",
"echarts": "^5.1.2",
"qs": "^6.14.0"
}
}
@@ -66,6 +66,8 @@ import Header from '@/components/header.vue';
import { getAcctFlow, getAcctMiningStat, getAcctContribution, getAcctFlowList, getBonusStat, getAcctBalance } from '@/api/finance.js';
import { getValue, BALANCE_TYPE } from '@/utils/enumUtils.js';
import { formatDate, handleAmount } from '@/utils/index.js';
import BigNumber from 'bignumber.js';
export default {
computed: {
@@ -233,6 +235,10 @@ export default {
{
name: "锁定次数",
key: "lockAmount"
},
{
name: "预发放次数",
key: "preAmount"
}
];
}
@@ -293,7 +299,8 @@ export default {
console.log("流水贡献值", resp);
if (resp && resp.bizcode === 100) {
if (resp.data.ratio) {
resp.data.ratio = resp.data.ratio * 100 + '%';
const ratio = new Decimal(resp.data.ratio);
resp.data.ratio = ratio.times(100).toNumber() + '%';
}
this.headerData = resp.data || {};