Browse Source

格式化金额

xiaohaizhao 2 years ago
parent
commit
e84cbdc204
1 changed files with 3 additions and 3 deletions
  1. 3 3
      packageA/orderForm/detail.js

+ 3 - 3
packageA/orderForm/detail.js

@@ -79,7 +79,7 @@ Page({
                 title: res.msg,
                 icon: "none"
             });
-            let CND = value => currency(value, {
+            let CNY = value => currency(value, {
                 symbol: "¥",
                 precision: 2
             }).format();
@@ -90,12 +90,12 @@ Page({
             let accountclass = res.data.accountclass;
             if (accountclass.accountname) {
                 account.name = accountclass.accountname
-                account.text = `\n(余额:${CND(accountclass.balance)},信用额度:${CND(accountclass.creditquota)})`
+                account.text = `\n(余额:${CNY(accountclass.balance)},信用额度:${CNY(accountclass.creditquota)})`
             }
             this.setData({
                 detail: res.data,
                 loading: false,
-                defaultamount: CND(res.data.defaultamount),
+                defaultamount: CNY(res.data.defaultamount),
                 account
             });
             if (init) {