把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. 个人Blog小程序开发完毕

    今天忙了一天,算是把这个小程序弄好了,包括小程序前端页面.接口对接.后台系统.服务器架 设.域名备案.证书安装(现在阿里云的免费证书怎么审核要这么久啊,到现在还在审核中) 先上截图: 这个背景图片的替 ...

  2. SpringMVC札集(08)——文件上传

    自定义View系列教程00–推翻自己和过往,重学自定义View 自定义View系列教程01–常用工具介绍 自定义View系列教程02–onMeasure源码详尽分析 自定义View系列教程03–onL ...

  3. java.io.IOException: Unable to establish loopback connection

    1.错误描述 Starting preview server on port 8080 Modules: HTML5 (/HTML5) 2017-06-17 11:13:04.823:INFO::ma ...

  4. 层序遍历二叉树 完整层序重建二叉树 python

    给定一个二叉树的完整的层次遍历序列(包含所有节点,包括空节点),利用这个序列生成一颗二叉树. 我们首先来看怎样对一颗二叉树进行层序遍历,下图所示的二叉树层次遍历的结果为[a,b,c,d,e],在这个过 ...

  5. iOS数组排序 请求后,数组元素的排序 时间戳,最热,点赞数等

    [ZOYSessionManager dataWithUrlString:GetVideoDataComment andParameter:@{@"id":userID,@&quo ...

  6. crm--01

    需求: 将课程名称与班级综合起来 class ClassListConfig(ModelSatrk): # 自定义显示方式 def display_class(self,obj=None,is_hea ...

  7. 【集成学习】 lightgbm原理

    # lightgbm和xgboost对比: 模型精度:lightgbm≈xgboost 收敛速度:lightgbm>xgboost #

  8. nginx初步尝试

    导师要我学习下nginx,弄个简单的负载均衡出来,具体就是请求发送到nginx上,然后nginx将请求转发到后面的两个jetty应用上,这两个应用的代码是一样的,只是监听的端口不同,由于是简单尝试,因 ...

  9. tidb 安装试用&&以及安装几个问题解决

    备注:    tidb 听说已经很长时间了,一直无安装部署(主要是不像cockrouchdb 不见那么简单)   1. 环境准备(官方建议使用6台机器) // 我的机器准备(阿里云的,同时大家最好选择 ...

  10. 【转】VC 线程间通信的三种方式

    原文网址:http://my.oschina.net/laopiao/blog/94728 1.使用全局变量(窗体不适用)      实现线程间通信的方法有很多,常用的主要是通过全局变量.自定义消息和 ...