把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. 敏捷BI与数据驱动机制

    大数据这件事,整体上还是说的多一些,做的稍微少一点.大数据可以是荒凉高原上波澜壮阔的机房,也可以润物细无声般融入到日常生活和工作.换句话说,大数据应该是一种文化. 在个人层面,很多人对数字和计算并不敏 ...

  2. 利用层序遍历(含空节点)和中序遍历重建二叉树 python

    给定一颗二叉树的层序遍历(不含None的形式)和中序遍历序列,利用两个序列完成对二叉树的重建. 还是通过一个例子来说明整个过程,下图所示的二叉树,层序遍历结果为[a,b,c,d,e],中序遍历结果为[ ...

  3. apt-get -f install

    http://zhidao.baidu.com/link?url=tZLEfm1Ycc1pWS67-95fXU596CtwA_1l2pPfzINUTxvOCvWdf3JZsWuZNxsxn0Jv6Om ...

  4. Django项目部署(阿里云)(1)--基本功能实现

    新博客地址:http://muker.net/django-server.html 手头需要部署一个Django项目,前面的博客也因为偷懒也没有部署,这里记录一下部署过程.ps:其实网上比较靠谱的说明 ...

  5. hiho 1612

    emmmmm?A不了?90分是什么鬼 #include<cstdio> #include<cstdlib> #include<vector> #include< ...

  6. maven搭建ssm框架问题总结

    1. Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.0:compile (default-comp ...

  7. LG3953 逛公园

    题意 策策同学特别喜欢逛公园.公园可以看成一张\(N\)个点\(M\)条边构成的有向图,且没有 自环和重边.其中1号点是公园的入口,\(N\)号点是公园的出口,每条边有一个非负权值, 代表策策经过这条 ...

  8. mix deps HEX_HTTP_CONCURRENCY=1 HEX_HTTP_TIMEOUT=120 timeout

    mix  deps.get  timeout 问题: If this happens consistently, adjust your concurrency and timeout setting ...

  9. kong 了解

      Kong 是在客户端和(微)服务间转发API通信的API网关,通过插件扩展功能.Kong 有两个主要组件: Kong Server :基于nginx  的服务器,用来接收 API 请求. Apac ...

  10. elipse中开发servlet,直接run as 时出现404错误的解决方法

    在elipse中开发servlet时,无论在IDE中运行,还是在浏览器中访问servlet时,一直报404错误, 后发现在build目录中没有生成相应的类文件,后反复采用project中的clean. ...