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
+80 -79
View File
@@ -1,84 +1,85 @@
{ {
"id": "tb", "id": "tb",
"name": "tb", "name": "tb",
"displayName": "tb", "displayName": "tb",
"version": "1.0.2", "version": "1.0.2",
"description": "信任桥", "description": "信任桥",
"keywords": [ "keywords": [
"tb", "tb",
"信任桥" "信任桥"
], ],
"dcloudext": { "dcloudext": {
"category": [], "category": [],
"sale": { "sale": {
"regular": { "regular": {
"price": "0.00" "price": "0.00"
}, },
"sourcecode": { "sourcecode": {
"price": "0.00" "price": "0.00"
} }
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "无",
"data": "无",
"permissions": "无"
},
"npmurl": ""
}, },
"repository": "", "contact": {
"uni_modules": { "qq": ""
"platforms": { },
"cloud": { "declaration": {
"tcb": "y", "ads": "无",
"aliyun": "y" "data": "无",
}, "permissions": "无"
"client": { },
"App": { "npmurl": ""
"app-vue": "u", },
"app-nvue": "u" "repository": "",
}, "uni_modules": {
"H5-mobile": { "platforms": {
"Safari": "u", "cloud": {
"Android Browser": "u", "tcb": "y",
"微信浏览器(Android)": "u", "aliyun": "y"
"QQ浏览器(Android)": "u" },
}, "client": {
"H5-pc": { "App": {
"Chrome": "u", "app-vue": "u",
"IE": "u", "app-nvue": "u"
"Edge": "u", },
"Firefox": "u", "H5-mobile": {
"Safari": "u" "Safari": "u",
}, "Android Browser": "u",
"小程序": { "微信浏览器(Android)": "u",
"微信": "u", "QQ浏览器(Android)": "u"
"阿里": "u", },
"百度": "u", "H5-pc": {
"字节跳动": "u", "Chrome": "u",
"QQ": "u", "IE": "u",
"京东": "u" "Edge": "u",
}, "Firefox": "u",
"快应用": { "Safari": "u"
"华为": "u", },
"联盟": "u" "小程序": {
}, "微信": "u",
"Vue": { "阿里": "u",
"vue2": "u", "百度": "u",
"vue3": "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"
} }
},
"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 { getAcctFlow, getAcctMiningStat, getAcctContribution, getAcctFlowList, getBonusStat, getAcctBalance } from '@/api/finance.js';
import { getValue, BALANCE_TYPE } from '@/utils/enumUtils.js'; import { getValue, BALANCE_TYPE } from '@/utils/enumUtils.js';
import { formatDate, handleAmount } from '@/utils/index.js'; import { formatDate, handleAmount } from '@/utils/index.js';
import BigNumber from 'bignumber.js';
export default { export default {
computed: { computed: {
@@ -233,6 +235,10 @@ export default {
{ {
name: "锁定次数", name: "锁定次数",
key: "lockAmount" key: "lockAmount"
},
{
name: "预发放次数",
key: "preAmount"
} }
]; ];
} }
@@ -293,7 +299,8 @@ export default {
console.log("流水贡献值", resp); console.log("流水贡献值", resp);
if (resp && resp.bizcode === 100) { if (resp && resp.bizcode === 100) {
if (resp.data.ratio) { 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 || {}; this.headerData = resp.data || {};