f
This commit is contained in:
@@ -12,7 +12,7 @@ export default defineUniPages({
|
|||||||
{ path: 'pages/agent-service-agreement', style: { navigationBarTitleText: '信息技术服务合同', navigationStyle: 'default' } },
|
{ path: 'pages/agent-service-agreement', style: { navigationBarTitleText: '信息技术服务合同', navigationStyle: 'default' } },
|
||||||
{ path: 'pages/agent-vip', auth: true, style: { navigationBarTitleText: '代理会员' } },
|
{ path: 'pages/agent-vip', auth: true, style: { navigationBarTitleText: '代理会员' } },
|
||||||
{ path: 'pages/agent-vip-apply', auth: true, style: { navigationBarTitleText: 'VIP代理申请' } },
|
{ path: 'pages/agent-vip-apply', auth: true, style: { navigationBarTitleText: 'VIP代理申请' } },
|
||||||
{ path: 'pages/agent-vip-config', auth: true, style: { navigationBarTitleText: '代理会员报告配置' } },
|
{ path: 'pages/agent-vip-config', auth: true, style: { navigationBarTitleText: '代理报告配置' } },
|
||||||
{ path: 'pages/authorization', style: { navigationBarTitleText: '授权书', navigationStyle: 'default' } },
|
{ path: 'pages/authorization', style: { navigationBarTitleText: '授权书', navigationStyle: 'default' } },
|
||||||
{ path: 'pages/help', style: { navigationBarTitleText: '帮助中心' } },
|
{ path: 'pages/help', style: { navigationBarTitleText: '帮助中心' } },
|
||||||
{ path: 'pages/help-detail', style: { navigationBarTitleText: '帮助详情' } },
|
{ path: 'pages/help-detail', style: { navigationBarTitleText: '帮助详情' } },
|
||||||
|
|||||||
@@ -3,14 +3,14 @@ export function safeTruncate(num, decimals = 2) {
|
|||||||
return '0.00'
|
return '0.00'
|
||||||
|
|
||||||
const factor = 10 ** decimals
|
const factor = 10 ** decimals
|
||||||
const scaled = Math.trunc(num * factor)
|
const scaled = Math.round(num * factor)
|
||||||
return (scaled / factor).toFixed(decimals)
|
return (scaled / factor).toFixed(decimals)
|
||||||
}
|
}
|
||||||
|
|
||||||
function toTruncatedCents(num) {
|
function toTruncatedCents(num) {
|
||||||
if (Number.isNaN(num) || !Number.isFinite(num))
|
if (Number.isNaN(num) || !Number.isFinite(num))
|
||||||
return 0
|
return 0
|
||||||
return Math.trunc((num + Number.EPSILON) * 100)
|
return Math.round(num * 100)
|
||||||
}
|
}
|
||||||
|
|
||||||
function centsToFixed(cents) {
|
function centsToFixed(cents) {
|
||||||
|
|||||||
Reference in New Issue
Block a user