把number类型转化为字符串类型
let orderPayFeeStr = this.state.orderPayFee.toString();//商品价格转化为字符串
if(orderPayFeeStr.indexOf(".") != -1){
orderPayFeepointBefore = orderPayFeeStr.split(".")[0];
orderPayFeepointAfter = orderPayFeeStr.split(".")[1].length == 1?orderPayFeeStr.split(".")[1]+"0":orderPayFeeStr.split(".")[1];
}else{
orderPayFeepointBefore = orderPayFeeStr;
orderPayFeepointAfter = "00";
}
以上是react框架中用

把价钱转化为xx.xx的形式的更多相关文章

  1. com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK assets/com.xx.xx

    完整的Error 信息(关键部分) Error:Execution failed for task ':fanwe_o2o_47_mgxz_dingzhi:transformResourcesWith ...

  2. 解决:eclipse删除工程会弹出一个对话框提示“[project_name]”contains resources that are not in sync with"[workspace_name...\xx\..xx\..\xx]"

    提示“[project_name]”contains resources that are not in sync with"[workspace_name...\xx\..xx\..\xx ...

  3. sharepoint:找不到位于 http://XX.XX.XX.XX 的 Web

    自己写了个sharepoint的webservice,发不到IIS上后报错: System.IO.FileNotFoundException: 找不到位于 http://XX.XX.XX.XX 的 W ...

  4. Could not create pool connection. The DBMS driver exception was: null, message from server: "Host '192.168.XX.XX' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'

    早上打开浏览器准备登陆某个系统,发现Error 404--Not Found,有点奇怪,这个服务器应该没人用了才对,然后到weblogic后台去看日志,报如下错误: "Could not c ...

  5. HTTPConnectionPool(host='xx.xx.xx.xx', port=xx): Max retries exceeded with url:(Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x0000015A25025EB8>...))

    HTTPConnectionPool(host='xx.xx.xx.xx', port=xx): Max retries exceeded with url:(Caused by ConnectTim ...

  6. c# mac地址 和http://xx.xx.xx/ 正则表达式匹配

    Mac  :^([0-9a-fA-F]{2})(([/\s:][0-9a-fA-F]{2}){5})$ C# 书写方式 一下是允许mac中间间隔符是“:”或者“-”两种输入方式 并且我把上边的正则表达 ...

  7. (WF, Debug) System.Xaml.XamlObjectWriterException: Cannot create unknown type '{clr-namespace:xx;assembly=xx}xx'.

    Load WF 后一开始运行的时候就发现 System.Xaml.XamlObjectWriterException: Cannot create unknown type '{clr-namespa ...

  8. com.android.tools.build:gradle:X.XX.XX:gradle.jar 插件无法下载问题

    在使用Android Studio 这个IDE时,出现com.android.tools.build:gradle:X.XX.XX:gradle.jar 插件无法下载问题 可能的原因就是网速不好或者依 ...

  9. 关于“xx.xx已被OS X使用,无法打开”的问题

    Mac电脑上的文件拷贝到移动硬盘,有时候会出现“xx.xx已被OS X使用,无法打开”的问题. 解决办法: 1.打开终端(或在Mac搜索里面输入Terminal); 2.在终端里输入 xattr -l ...

  10. Navicat 连接远程数据库报错:1130 - Host "XX.XX.XX.XX" is not allowed to connect to this MySQL server

    Navicat 连接远程数据库报错:1130 - Host "XX.XX.XX.XX" is not allowed to connect to this MySQL server ...

随机推荐

  1. chrome 55 zepto tap事件出错?

    刚才升级chrome后发现的,在54.0.2840.98上点击没有问题,在新升级的55.0.2883.75 上点击后会报错Cannot read property 'trigger' of undef ...

  2. 提问:错误提示--命名空间“System.Web”中不存在类型或命名空间名称“UI”(是缺少程序集引用吗?) 如何解决??

    转自:http://topic.csdn.net/u/20080723/21/7e1e06cb-d013-4675-ba9b-9b39d49d0a0e.html 1) 添加对System.Web.dl ...

  3. matlab下kmeans及pam算法对球型数据分类练习

    clear all; clc; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %数据初始化 D ...

  4. Why I am not afraid of AI (TBC)

    Freud! Yes, according to Freud's theory, most human activities are driven by libido (or aim-inhibite ...

  5. 添加dom节点及优化

    创建并添加dom加点如何进行优化? 1.使用文档片(DocumentFragment) 可以理解为"仓库",用来保存将来可能会添加到DOM中的节点: var fragment = ...

  6. AngularX 指令(ngForof)(转载)

    该指令用于基于可迭代对象中的每一项创建相应的模板.每个实例化模板的上下文对象继承于外部的上下文对象,其值与可迭代对象对应项的值相关联. NgForOf 指令语法 * 语法糖 <li *ngFor ...

  7. 20179223《Linux内核原理与分析》第三周学习笔记

    测试3的实验: 1. 用gcc -g编译vi输入的代码 2. 在main函数中设置一个行断点 3. 在main函数增加一个空循环,循环次数为自己学号后4位,设置一个约为学号一半的条件断点 4. 提交调 ...

  8. 命令“"xxx.exe" xxx”已退出,代码为 n。这些错误是什么意思?(3 / 123 / 9009)

    命令“”xxx.exe” xxx”已退出,代码为 n. 我们在 cmd 中输入常见命令的时候,如果命令输入错误或使用错误,cmd 中会提示错误原因,帮助我们定位并解决问题.然而如果相同的命令放到了 V ...

  9. hadoop之 distcp(分布式拷贝)

    概述 distcp(分布式拷贝)是用于大规模集群内部和集群之间拷贝的工具. 它使用Map/Reduce实现文件分发,错误处理和恢复,以及报告生成. 它把文件和目录的列表作为map任务的输入,每个任务会 ...

  10. oracle版本及字符集查询

    查询oracle版本:select * from v$version; 查询oracle字符集:select * from nls_database_parameters;