diff --git a/components/m-buy/goods.vue b/components/m-buy/goods.vue index a6cef91..924a9a2 100644 --- a/components/m-buy/goods.vue +++ b/components/m-buy/goods.vue @@ -209,7 +209,7 @@ if (typeof val == "undefined") { return val; } - return val.toFixed(2).split("."); + return Number(val).toFixed(2).split("."); }, closeMask() { diff --git a/components/m-goods-list/common.vue b/components/m-goods-list/common.vue index dd46e5d..fe65b55 100644 --- a/components/m-goods-list/common.vue +++ b/components/m-goods-list/common.vue @@ -44,7 +44,7 @@ return val; } - return parseInt(val).toFixed(2).split("."); + return Number(val).toFixed(2).split("."); }, // 数据去重一下 只显示一次 减免 劵 什么的 diff --git a/components/m-goods-list/list.vue b/components/m-goods-list/list.vue index 636decc..2642594 100644 --- a/components/m-goods-list/list.vue +++ b/components/m-goods-list/list.vue @@ -184,7 +184,7 @@ if (typeof val == "undefined") { return val; } - return parseInt(val).toFixed(2).split("."); + return Number(val).toFixed(2).split("."); }, // 数据去重一下 只显示一次 减免 劵 什么的 diff --git a/pages/navigation/search/searchPage.vue b/pages/navigation/search/searchPage.vue index 0de7f91..758b727 100644 --- a/pages/navigation/search/searchPage.vue +++ b/pages/navigation/search/searchPage.vue @@ -376,7 +376,7 @@ export default { if (typeof val == "undefined") { return val; } - return parseInt(val).toFixed(2).split("."); + return Number(val).toFixed(2).split("."); }, // 展示更多数据 diff --git a/pages/order/fillorder.vue b/pages/order/fillorder.vue index 238bb51..930a851 100644 --- a/pages/order/fillorder.vue +++ b/pages/order/fillorder.vue @@ -460,7 +460,7 @@ export default { if (typeof val == "undefined") { return val; } - return parseInt(val).toFixed(2).split("."); + return Number(val).toFixed(2).split("."); }, //发票回调 选择发票之后刷新购物车 async callbackInvoice(val) { diff --git a/pages/product/goods.vue b/pages/product/goods.vue index 1f59271..90a9a57 100644 --- a/pages/product/goods.vue +++ b/pages/product/goods.vue @@ -757,7 +757,7 @@ export default { if (typeof val == "undefined") { return val; } - return parseInt(val).toFixed(2).split("."); + return Number(val).toFixed(2).split("."); }, /**选择商品 */ diff --git a/pages/product/product/promotion/-promotion-assemble-promotions.vue b/pages/product/product/promotion/-promotion-assemble-promotions.vue index b007f31..aef1a4a 100644 --- a/pages/product/product/promotion/-promotion-assemble-promotions.vue +++ b/pages/product/product/promotion/-promotion-assemble-promotions.vue @@ -146,7 +146,7 @@ export default { if (typeof val == "undefined") { return val; } - return parseInt(val).toFixed(2).split("."); + return Number(val).toFixed(2).split("."); }, getCountDownTime(val) { let date = new Date(val); diff --git a/pages/product/product/shop/-shop.vue b/pages/product/product/shop/-shop.vue index 521952c..a04e234 100644 --- a/pages/product/product/shop/-shop.vue +++ b/pages/product/product/shop/-shop.vue @@ -53,7 +53,7 @@ export default { if (typeof val == "undefined") { return val; } - return parseInt(val).toFixed(2).split("."); + return Number(val).toFixed(2).split("."); }, // 点击商品 clickGoods(val) { diff --git a/pages/product/shopList.vue b/pages/product/shopList.vue index 873205d..967abf2 100644 --- a/pages/product/shopList.vue +++ b/pages/product/shopList.vue @@ -87,7 +87,7 @@ export default { if (typeof val == "undefined") { return val; } - return parseInt(val).toFixed(2).split("."); + return Number(val).toFixed(2).split("."); }, async init() { let res = await getStoreList(this.params); diff --git a/pages/tabbar/cart/cartList.vue b/pages/tabbar/cart/cartList.vue index 3bdd5ef..a0ebc9a 100644 --- a/pages/tabbar/cart/cartList.vue +++ b/pages/tabbar/cart/cartList.vue @@ -264,7 +264,7 @@ export default { if (typeof val == "undefined") { return val; } - return parseInt(val).toFixed(2).split("."); + return Number(val).toFixed(2).split("."); }, /** diff --git a/pages/tabbar/home/template/tpl_goods.vue b/pages/tabbar/home/template/tpl_goods.vue index 8d85f30..9fb7fa0 100644 --- a/pages/tabbar/home/template/tpl_goods.vue +++ b/pages/tabbar/home/template/tpl_goods.vue @@ -63,7 +63,7 @@ export default { if (typeof val == "undefined") { return val; } - return parseInt(val).toFixed(2).split("."); + return Number(val).toFixed(2).split("."); }, handleClick(item) { uni.navigateTo({