ToString(f02) 的用法

本文介绍了一种使用ToString方法将浮点数转换为特定格式字符串的技术。该技术有助于改善数据显示的清晰度,尤其是在数值精度要求较高的场景中。
 ToString("f02")能将类似1.0000转换成1.00
这是通过 http://www.hiencode.com/jjencode.html解密得到的数据const players=[{name:'凯e87-杜Q70r79',image:'durant.png',birthday:'1988-09-29',height:'208cm',weight:'108.9KG'},{name:'勒^03g17-詹Yc6eaf',image:'james.png',birthday:'1984-12-30',height:'206cm',weight:'113.4KG'},{name:'斯„82‚ac-库‘cc',image:'curry.png',birthday:'1988-03-14',height:'191cm',weight:'83.9KG'},{name:'詹Yc6eaf-哈v7b',image:'harden.png',birthday:'1989-08-26',height:'196cm',weight:'99.8KG'},{name:'扬\3ceaf-安r79b58f06S5a',image:'antetokounmpo.png',birthday:'1994-12-06',height:'211cm',weight:'109.8KG'},{name:'拉X5e\14-威eaf^03œ81Q4b',image:'westbrook.png',birthday:'1988-11-12',height:'191cm',weight:'90.7KG'},{name:'凯‘cc-欧e87',image:'irving.png',birthday:'1992-03-23',height:'188cm',weight:'88.5KG'},{name:'安N1c\3c-戴~f4eaf',image:'davis.png',birthday:'1993-03-11',height:'208cm',weight:'114.8KG'},{name:'乔\14-恩kd4_b7',image:'embiid.png',birthday:'1994-03-16',height:'213cm',weight:'127.0KG'},{name:'克–f7-汤f6ehee',image:'thompson.png',birthday:'1990-02-08',height:'198cm',weight:'97.5KG'},{name:'考te6O0a-莱f02~b3_b7',image:'leonard.png',birthday:'1991-06-29',height:'201cm',weight:'102.1KG'},{name:'达|73[89-利bc9_b7',image:'lillard.png',birthday:'1990-07-15',height:'188cm',weight:'88.5KG'},{name:'卡h8557-安N1c\3c',image:'anthony.png',birthday:'1984-05-29',height:'203cm',weight:'108KG'},{name:'尼yd1bc9-约WfaY47',image:'jokic.png',birthday:'1995-02-19',height:'213cm',weight:'128.8KG'},{name:'卡\14-安N1c\3c-唐eaf',image:'towns.png',birthday:'1995-11-15',height:'211cm',weight:'112.5KG'},{name:'克‘cceaf-保57',image:'paul.png',birthday:'1985-05-06',height:'185cm',weight:'79.4KG'},];new Vue({el:'#app',data:function(){return{players,key:'VnzXHU3MQzuTXWuzzHXtxM7ifdYdrZVWqbv'}},methods:{getToken(player){let key=CryptoJS.enc.Utf8.parse(this.key);const{name,birthday,height,weight}=player;let base64Name=CryptoJS.enc.Base64.stringify(CryptoJS.enc.Utf8.parse(name));let encrypted=CryptoJS.DES.encrypt(`${base64Name}${birthday}${height}${weight}`,key,{mode:CryptoJS.mode.ECB,padding:CryptoJS.pad.Pkcs7});return encrypted.toString()}}})
最新发布
08-22
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

感谢一路走过的人

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值