From 1225a41de489fd84938d0c6a2db291df371d4de9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A6=E4=B9=A0=E5=BE=88=E5=B7=AE=E5=95=A6?= <17633066053@163.com> Date: Fri, 30 Sep 2022 18:36:21 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20:bug:=20=E4=BF=AE=E6=94=B9=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E5=8C=96=E9=87=91=E9=A2=9D=E5=8F=AF=E8=83=BD=E4=BC=9A?= =?UTF-8?q?=E5=87=BA=E7=8E=B0=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/m-goods-list/common.vue | 3 ++- components/m-goods-list/list.vue | 2 +- pages/navigation/search/searchPage.vue | 2 +- pages/order/fillorder.vue | 2 +- pages/product/goods.vue | 2 +- .../product/promotion/-promotion-assemble-promotions.vue | 2 +- pages/product/product/shop/-shop.vue | 2 +- pages/product/shopList.vue | 2 +- pages/tabbar/cart/cartList.vue | 2 +- pages/tabbar/home/template/tpl_goods.vue | 2 +- 10 files changed, 11 insertions(+), 10 deletions(-) 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({