diff --git a/components/m-goods-list/common.vue b/components/m-goods-list/common.vue index c4975f8..dd46e5d 100644 --- a/components/m-goods-list/common.vue +++ b/components/m-goods-list/common.vue @@ -43,7 +43,8 @@ if (typeof val == "undefined") { return val; } - return val.toFixed(2).split("."); + + return parseInt(val).toFixed(2).split("."); }, // 数据去重一下 只显示一次 减免 劵 什么的 diff --git a/components/m-goods-list/list.vue b/components/m-goods-list/list.vue index 33d3a33..636decc 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 val.toFixed(2).split("."); + return parseInt(val).toFixed(2).split("."); }, // 数据去重一下 只显示一次 减免 劵 什么的 diff --git a/pages/navigation/search/searchPage.vue b/pages/navigation/search/searchPage.vue index 1d9fbf0..0de7f91 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 val.toFixed(2).split("."); + return parseInt(val).toFixed(2).split("."); }, // 展示更多数据 diff --git a/pages/order/fillorder.vue b/pages/order/fillorder.vue index e0c03a8..238bb51 100644 --- a/pages/order/fillorder.vue +++ b/pages/order/fillorder.vue @@ -460,7 +460,7 @@ export default { if (typeof val == "undefined") { return val; } - return val.toFixed(2).split("."); + return parseInt(val).toFixed(2).split("."); }, //发票回调 选择发票之后刷新购物车 async callbackInvoice(val) { diff --git a/pages/product/goods.vue b/pages/product/goods.vue index 76ac9e1..1f59271 100644 --- a/pages/product/goods.vue +++ b/pages/product/goods.vue @@ -757,7 +757,7 @@ export default { if (typeof val == "undefined") { return val; } - return val.toFixed(2).split("."); + return parseInt(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 625cc6e..b007f31 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 val.toFixed(2).split("."); + return parseInt(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 3220628..521952c 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 val.toFixed(2).split("."); + return parseInt(val).toFixed(2).split("."); }, // 点击商品 clickGoods(val) { diff --git a/pages/product/shopList.vue b/pages/product/shopList.vue index c91daa8..873205d 100644 --- a/pages/product/shopList.vue +++ b/pages/product/shopList.vue @@ -87,7 +87,7 @@ export default { if (typeof val == "undefined") { return val; } - return val.toFixed(2).split("."); + return parseInt(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 0842a42..3bdd5ef 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 val.toFixed(2).split("."); + return parseInt(val).toFixed(2).split("."); }, /** diff --git a/pages/tabbar/home/template/tpl_goods.vue b/pages/tabbar/home/template/tpl_goods.vue index 5bcc728..8d85f30 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 val.toFixed(2).split("."); + return parseInt(val).toFixed(2).split("."); }, handleClick(item) { uni.navigateTo({